Skip to content

Instantly share code, notes, and snippets.

@bluepnume
Last active May 17, 2021 04:29
Show Gist options
  • Save bluepnume/2051413fb9f02a74dd712a508c241b56 to your computer and use it in GitHub Desktop.
Save bluepnume/2051413fb9f02a74dd712a508c241b56 to your computer and use it in GitHub Desktop.
const send = async (receiver : string, amount : number, fee : number) : Promise<void> => {
const signedTransaction = await signAndPack({
sender: await keypair.publicKey,
receiver,
amount,
fee
}, await keypair.publicKey, await keypair.privateKey)
await network.broadcast('ADD_TRANSACTION', signedTransaction);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment