Skip to content

Instantly share code, notes, and snippets.

@s-a-y
Last active September 6, 2021 19:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s-a-y/3ad8a4b2a6c7cdfed72c96088d91e213 to your computer and use it in GitHub Desktop.
Save s-a-y/3ad8a4b2a6c7cdfed72c96088d91e213 to your computer and use it in GitHub Desktop.
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