Transaction
Transaction React Widgets and Modals
Get Method Widgets and Modals
To use the widgets in React components you need to import the Widget
component:
Every widget has an optional parameter called settings
.
Name | Type | Required | Default | Description |
---|---|---|---|---|
fullScreen | Boolean | true | Should widget be shown fullscreen | |
hideMenu | Boolean | true | Deprecated | |
preventClose | Boolean | true | Hides close button |
You can provide them to the widget like this:
Batch transaction
Description
Sign and send a batched transaction to the chain. This function is used to maintain an ACID property on the chain for several transactions that need to be sent together. The function will display + a widget for the user to sign the transaction. The user can learn about all the transactions that they are about to sign - but will only need to approve it once.
Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
Transactions | String | ✔️ | The JSON object of the batched transactions | |
BlockchainId | any | ✔️ | Blockchain to send the trnasaction to |
Send
Description
Send a raw transaction to the blockchain. This method is used mainly to control smart contracts. Returns a URL of a widget for a modal where the user can approve the transaction.
Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
blockchainId | String | ✔️ | Blockchain ID | |
payload | any | ✔️ | Transaction payload | |
onClose |
| Close callback | ||
onError |
| Error callback |
Return type
Usage Example
Last updated