deemru / WavesKit

Waves Platform Development Kit for PHP
https://packagist.org/packages/deemru/waveskit
MIT License
24 stars 8 forks source link

Get Address #12

Closed fabiomattes2016 closed 5 years ago

fabiomattes2016 commented 5 years ago

How can I get an address using the phrase seed?

And how can I get the private key using the seed phrase?

deemru commented 5 years ago

How can I get an address using the phrase seed?


// MAINNET
$wk = new WavesKit();
$wk->setSeed( 'manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add' );
$address = $wk->getAddress();
$wk->log( $address );

// TESTNET $wk = new WavesKit( 'T' ); $wk->setSeed( 'manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add' ); $address = $wk->getAddress(); $wk->log( $address );


> And how can I get the private key using the seed phrase?
```php
$wk = new WavesKit();
$wk->setSeed( 'manage manual recall harvest series desert melt police rose hollow moral pledge kitten position add' );
$privateKeyBase58 = $wk->getPrivateKey( false );
$wk->log( $privateKeyBase58 );
fabiomattes2016 commented 5 years ago

Tank you