1 | let ScryptaCore = require('../src/index.js')
|
2 | let scrypta = new ScryptaCore
|
3 |
|
4 |
|
5 | async function send(amount = 0.001){
|
6 | return new Promise(async response => {
|
7 | let prv = 'Sq9GWa9vyM1HghsnVan5UJhtx2GumTaLBTHgDhCW4abjzZLmsYmr'
|
8 | let pub = 'LdRQokR1i3XDtj1V3jnCRqMPrVc7sYkeE2'
|
9 | let sidechain = '6RQ54yHx2dARWkN8Biiw3gDjb4sB5hSHSH'
|
10 | let to = 'LchzGX6vqmanceCzNUMTk5cmnt1p6knGgT'
|
11 | let password = 'password'
|
12 | scrypta.usePlanum(sidechain)
|
13 | await scrypta.importPrivateKey(prv, password)
|
14 | let tx = await scrypta.sendPlanumAsset(pub, password, to, amount)
|
15 | console.log('SXID IS ' + tx)
|
16 | response(tx)
|
17 | })
|
18 | }
|
19 | var i = 1
|
20 | async function runtest(){
|
21 | let amount = i / 1000
|
22 | console.log('SENDING ' + amount)
|
23 | await send(amount)
|
24 | i++
|
25 | runtest()
|
26 | }
|
27 | runtest()
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
\ | No newline at end of file |