From generating an NFT to selling at a fixed price.
Through this tutorial, you will be able to go through a basic fixed price transaction of using an NFT on the Rinkeby network.
0.Prerequistes
- An access token is needed, which is provided by contacting Kyuzan Inc.
- An access token to the Rinkeby network is needed using Fortmatic
- #how-to-get-eth-for-rinkebytest-envを参考に Rinkeby の ETH を取得する
1.Installation
% npm i @kyuzan/mint-sdk-js
2. Initializing the SDK
import { MintSDK } from '@kyuzan/mint-sdk-js'
const sdk = new MintSDK({
'YOUR_ACCESS_KEY',
[4],
{
fortmatic: {
key: 'YOUR_FORTMATIC_KEY',
},
}
})
3. Acquiring the item list

const items = sdk.getItems();
3. Getting each item information and past transaction data individually

const item = sdk.getItemById("hoo");
Getting past transaction history data

const itemLogs = sdk.getItemLogs("hoo");
4. Bidding on an Item
To bit on an item, it is necessary for the User to connect their wallet.
Wallet connection

await sdk.isWalletConnect(); // false
await sdk.connectWallet();
await sdk.isWalletConnect(); // true
Bidding

await sdk.sendTxBuyItem("itemId", "jp");
The second parameter must be the User's current country of residence, which is necessary for consumption tax procedures. Asking the users country of residence can be done through UI provided in the frontend.
5. Recieving the Item using MINT

const tokens = await sdk.getTokensByAddress("0x11111...");