Created
April 12, 2022 16:22
-
-
Save janniks/a427207480695a4f8c69ca526d09757a to your computer and use it in GitHub Desktop.
transfer — Stacks Signing
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
import { openSTXTransfer } from "@stacks/connect"; | |
import { StacksTestnet } from "@stacks/network"; | |
openSTXTransfer({ | |
recipient: "ST2EB9WEQNR9P0K28D2DC352TM75YG3K0GT7V13CV", | |
amount: "100", | |
memo: "Reimbursement", | |
network: new StacksTestnet(), // for mainnet, `new StacksMainnet()` | |
appDetails: { | |
name: "My App", | |
icon: window.location.origin + "/my-app-logo.svg", | |
}, | |
onFinish: (data) => { | |
console.log("Stacks Transaction:", data.stacksTransaction); | |
console.log("Transaction ID:", data.txId); | |
console.log("Raw transaction:", data.txRaw); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment