diff --git a/docs/docs/_admonitions/_deep_link.md b/docs/docs/_admonitions/_deep_link.md index e25e7dd90a..3f07e62a23 100644 --- a/docs/docs/_admonitions/_deep_link.md +++ b/docs/docs/_admonitions/_deep_link.md @@ -1,4 +1,4 @@ -:::warning OTR Request Deep Link +:::info OTR Request Deep Link The SDK provides the helper functions `getFireflyDeepLink()` and `getBloomDeepLink()` to generate deep links for OTR requests. diff --git a/docs/docs/products/nft/how-to/bulk-purchase.md b/docs/docs/products/nft/how-to/bulk-purchase.md index a562c3eed9..73ad5dab2c 100644 --- a/docs/docs/products/nft/how-to/bulk-purchase.md +++ b/docs/docs/products/nft/how-to/bulk-purchase.md @@ -9,14 +9,17 @@ tags: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +import DeepLink from '../../../_admonitions/_deep_link.md' To bulk purchase NFTs, you must call `bulkPurchase` on `dataset(Dataset.NFT)`. `bulkPurchase` takes an object of type [`NftPurchaseBulkTangleRequest`](../../../reference-api/interfaces/NftPurchaseBulkTangleRequest.md) as parameter. - ```tsx file=../../../../../packages/sdk/examples/nft/otr/bulk_purchase.ts#L11-L13 + ```tsx file=../../../../../packages/sdk/examples/nft/otr/bulk_purchase.ts#L12-L14 ``` + + To bulk purchase NFTs, you must call `bulkPurchase` on `dataset(Dataset.NFT)`. diff --git a/docs/docs/products/nft/how-to/transfer.md b/docs/docs/products/nft/how-to/transfer.md new file mode 100644 index 0000000000..01e1f23725 --- /dev/null +++ b/docs/docs/products/nft/how-to/transfer.md @@ -0,0 +1,31 @@ +--- +title: Transfer NFTs +tags: + - how-to + - transfer + - nft + - bulk +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import DeepLink from '../../../_admonitions/_deep_link.md' + + + + To transfer NFTs, you must call `transfer` on `dataset(Dataset.NFT)`. + `transfer` takes an object of type [`NftTransferTangleRequest`](../../../reference-api/interfaces/NftTransferTangleRequest.md) as parameter. + + ```tsx file=../../../../../packages/sdk/examples/nft/otr/transfer.ts#L9-L16 + ``` + + + + + To transfer NFTs, you must call `transfer` on `dataset(Dataset.NFT)`. + `transfer` takes an object of type [`NftTransferRequest`](../../../reference-api/interfaces/NftTransferRequest.md) as parameter. + + ```tsx file=../../../../../packages/sdk/examples/nft/https/transfer.ts#L19-L35 + ``` + + diff --git a/docs/sidebars.js b/docs/sidebars.js index c58777adc6..b791566a79 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -75,6 +75,7 @@ const sidebars = { 'How To': [ 'products/nft/how-to/create-collection', 'products/nft/how-to/bulk-purchase', + 'products/nft/how-to/transfer', ], } ], diff --git a/packages/sdk/examples/nft/transfer.ts/nft.transfer.ts b/packages/sdk/examples/nft/https/transfer.ts similarity index 93% rename from packages/sdk/examples/nft/transfer.ts/nft.transfer.ts rename to packages/sdk/examples/nft/https/transfer.ts index 8ebebfd718..d751c97fa4 100644 --- a/packages/sdk/examples/nft/transfer.ts/nft.transfer.ts +++ b/packages/sdk/examples/nft/https/transfer.ts @@ -16,7 +16,7 @@ async function main() { try { const signature = await walletSign(member.uid, address); - const respose = await https(origin) + const response = await https(origin) .project(SoonaverseApiKey[origin]) .dataset(Dataset.NFT) .transfer({ @@ -34,7 +34,7 @@ async function main() { }, }); - console.log(respose); + console.log(response); } catch (e) { console.log(e); return; diff --git a/packages/sdk/examples/nft/transfer.ts/nft.otr.transfer.ts b/packages/sdk/examples/nft/otr/transfer.ts similarity index 73% rename from packages/sdk/examples/nft/transfer.ts/nft.otr.transfer.ts rename to packages/sdk/examples/nft/otr/transfer.ts index 04844a5345..b655ab34aa 100644 --- a/packages/sdk/examples/nft/transfer.ts/nft.otr.transfer.ts +++ b/packages/sdk/examples/nft/otr/transfer.ts @@ -6,17 +6,17 @@ const origin = Build5.TEST; const otrAddress = Build5OtrAddress[origin]; async function main() { - const fireflyDeepling = otr(otrAddress) + const otrRequest = otr(otrAddress) .dataset(Dataset.NFT) .transfer({ transfers: [ { nft: 'build5nftid', target: 'build5memberid' }, { nft: 'build5nftid', target: 'tangleaddress' }, ], - }) - .getFireflyDeepLink(); + }); + const fireflyDeeplink = otrRequest.getFireflyDeepLink(); - console.log('Sent amount with ', fireflyDeepling); + console.log('Sent amount with ', fireflyDeeplink); } main().then(() => process.exit());