|
@@ 733-737 (lines=5) @@
|
| 730 |
|
$backupSeed = isset($options['backup_seed']) ? $options['backup_seed'] : self::randomBits(256); |
| 731 |
|
} |
| 732 |
|
|
| 733 |
|
if (isset($options['primary_private_key'])) { |
| 734 |
|
$options['primary_private_key'] = BlocktrailSDK::normalizeBIP32Key($options['primary_private_key']); |
| 735 |
|
} else { |
| 736 |
|
$options['primary_private_key'] = BIP32Key::create(HierarchicalKeyFactory::fromEntropy(new Buffer($primarySeed)), "m"); |
| 737 |
|
} |
| 738 |
|
|
| 739 |
|
// create primary public key from the created private key |
| 740 |
|
$options['primary_public_key'] = $options['primary_private_key']->buildKey($walletPath->keyIndexPath()->publicPath()); |
|
@@ 871-875 (lines=5) @@
|
| 868 |
|
} |
| 869 |
|
} |
| 870 |
|
|
| 871 |
|
if (isset($options['primary_private_key'])) { |
| 872 |
|
$options['primary_private_key'] = BlocktrailSDK::normalizeBIP32Key($options['primary_private_key']); |
| 873 |
|
} else { |
| 874 |
|
$options['primary_private_key'] = BIP32Key::create(HierarchicalKeyFactory::fromEntropy($primarySeed), "m"); |
| 875 |
|
} |
| 876 |
|
|
| 877 |
|
// create primary public key from the created private key |
| 878 |
|
$options['primary_public_key'] = $options['primary_private_key']->buildKey($walletPath->keyIndexPath()->publicPath()); |