Native Coin
Native Coin 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 | 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:
Exchange
Description
Exchange between native coins (ETH → XTZ for ex.).
Fees will be taken from the source currency.
Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
amount | String | ✔️ | Amount of source coin to be sent | |
fromBlockchainId | String | ✔️ | Source blockchain id | |
toBlockchainId | String | ✔️ | Destination blockchain id |
Usage Example
Send to user
Description
Sends a token to another user on the platform by its user ID. The user will get a Sign Transaction widget to approve the transaction.
Parameters
Name | Type | Required | Description |
---|---|---|---|
blockchainId | String | ✔️ | Blockchain |
amount | String | ✔️ | Amount of crypto |
onClose |
| Close callback | |
onError |
| Error callback | |
onSuccess |
| Success callback | |
userId | String | ✔️ | Id of user to send crypto to |
Usage Example
Send to wallet
Description
Sends a token to another wallet by its wallet address. The user will get a Sign Transaction widget to approve the transaction.
Parameters
Name | Type | Required | Description |
---|---|---|---|
blockchainId | String | ✔️ | Blockchain |
value | String | ✔️ | Amount of crypto |
onClose |
| Close callback | |
onError |
| Error callback | |
onSuccess |
| Success callback | |
walletAddress | String | ✔️ | Address of wallet to send crypto to |
Usage Example
GET Native Coin 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 | 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:
Exchange
Description
Exchange between native coins (ETH → XTZ for ex.).
Fees will be taken from the source currency.
Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
amount | String | ✔️ | Amount of source coin to be sent | |
fromBlockchainId | String | ✔️ | Source blockchain id | |
toBlockchainId | String | ✔️ | Destination blockchain id |
Usage Example
Send to user
Description
Sends a token to another user on the platform by its user ID. The user will get a Sign Transaction widget to approve the transaction.
Parameters
Name | Type | Required | Description |
---|---|---|---|
blockchainId | String | ✔️ | Blockchain |
amount | String | ✔️ | Amount of crypto |
onClose |
| Close callback | |
onError |
| Error callback | |
onSuccess |
| Success callback | |
userId | String | ✔️ | Id of user to send crypto to |
Usage Example
Send to wallet
Description
Sends a token to another wallet by its wallet address. The user will get a Sign Transaction widget to approve the transaction.
Parameters
Name | Type | Required | Description |
---|---|---|---|
blockchainId | String | ✔️ | Blockchain |
value | String | ✔️ | Amount of crypto |
onClose |
| Close callback | |
onError |
| Error callback | |
onSuccess |
| Success callback | |
walletAddress | String | ✔️ | Address of wallet to send crypto to |
Usage Example
Last updated