NFT
NFT 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:
Buy with Fiat
Description
Returns a URL of a widget where the user can buy an NFT using a credit / debit card. See the NFT Checkout integration guidelines for more details about this feature.
Parameters
Name | Type | Required | Description |
---|---|---|---|
nftId | String | ✔️ | The ID of the NFT, the widget will collect the data to present the NFT from the backend |
onError |
| The error that was generated | |
onSuccess |
| Transaction Hash | |
onClose |
| null |
Send to user
Description
Send an NFT 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 | Default | Description |
---|---|---|---|---|
blockchainId | String | ✔️ | Blockchain | |
tokenAddress | String | ✔️ | NFT contract address | |
onClose |
| Close callback | ||
onError |
| Error callback | ||
onSuccess |
| Success callback | ||
tokenId | String | ✔️ | NFT token id | |
userId | String | ✔️ | Id of user to send NFT to |
Send to wallet
Description
Send an NFT to another wallet by its wallet address. The user will get a Sign Transaction widget to approve the transaction.
Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
blockchainId | String | ✔️ | Blockchain | |
tokenAddress | String | ✔️ | NFT contract address | |
onClose |
| Close callback | ||
onError |
| Error callback | ||
onSuccess |
| Success callback | ||
tokenId | String | ✔️ | NFT token id | |
walletAddress | String | ✔️ | Address of wallet to send NFT to |
Post Method Widgets and Modals
Mutation Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
widget parameters | Widget parameters |
Send NFT to user
Description
Displays a modal for sending a NFT to a user with a specified address and amount, by using your internal user ID.
Callback Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
blockchainId | String | ✔️ | Blockchain | |
contractAddress | String | ✔️ | NFT contract address | |
tokenId | String | ✔️ | NFT token Id | |
userId | String | ✔️ | Id of user to send crypto to |
Send NFT to wallet
Description
Displays a modal for sending coins to an address with a specified amount.
Callback Parameters
Name | Type | Required | Default | Description |
---|---|---|---|---|
blockchainId | String | ✔️ | Blockchain | |
tokenAddress | String | ✔️ | NFT contract address | |
tokenId | String | ✔️ | NFT token Id | |
walletAddress | String | ✔️ | address of wallet to send crypto to |
Usage Example
Last updated