Last active
September 6, 2021 19:05
-
-
Save s-a-y/3ad8a4b2a6c7cdfed72c96088d91e213 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StellarSign = require('stellar-sign'); | |
const StellarSdk = require('stellar-sdk'); | |
StellarSign | |
.setHorizonUrl('https://horizon.stellar.org') | |
.useNetwork(StellarSdk.Networks.PUBLIC) | |
.requestOperation( | |
StellarSdk.Keypair.fromSecret('...'), | |
'umbre1*papayame.com', | |
StellarSdk.Operation.createAccount({ | |
destination: 'GCL245KQK5CLXMPO2JJTG36HBC4XWLGEZ5GZPKKWPE6CBOD3D2IDLOTO', | |
startingBalance: '2.01', | |
}).toXDR() | |
) | |
.then(tx => { | |
// request to create account sent to umbre1, if he accepts it - this operation will be submitted to the network. | |
console.log(tx); | |
}) | |
.catch(err => { | |
console.error(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment