-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
77a9ec7
commit 9ac8932
Showing
9 changed files
with
302 additions
and
1 deletion.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...ockchain-data/minting-api-examples-with-node/create-erc1155-mint-request-with-metadata.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { blockchainData } from "@imtbl/sdk"; | ||
import { client } from "../lib"; | ||
|
||
export async function createMintRequestWithTokenIdAndMetadataAndAmount( | ||
chainName: string, | ||
contractAddress: string, | ||
owner_address: string, | ||
reference_id: string, | ||
token_id: string, | ||
amount: string | ||
): Promise<blockchainData.Types.CreateMintRequestResult> { | ||
return await client.createMintRequest({ | ||
chainName, | ||
contractAddress, | ||
createMintRequestRequest: { | ||
assets: [ | ||
{ | ||
owner_address, | ||
reference_id, | ||
token_id, | ||
amount, | ||
metadata: { | ||
name: "Brown Dog Red Car", | ||
description: "This SFT is a Brown Dog in a Red Car", | ||
image: "https://mt-test-2.s3.ap-southeast-2.amazonaws.com/BDRC.png", | ||
external_url: null, | ||
animation_url: null, | ||
youtube_url: null, | ||
attributes: [ | ||
{ | ||
trait_type: "Pet", | ||
value: "Dog", | ||
}, | ||
{ | ||
trait_type: "Pet Colour", | ||
value: "Brown", | ||
}, | ||
{ | ||
trait_type: "Vehicle", | ||
value: "Car", | ||
}, | ||
{ | ||
trait_type: "Vehicle Colour", | ||
value: "Red", | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
} |
26 changes: 26 additions & 0 deletions
26
examples/blockchain-data/minting-api-examples-with-node/create-erc1155-mint-request.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { blockchainData } from "@imtbl/sdk"; | ||
import { client } from "../lib"; | ||
|
||
export async function createMintRequestWithTokenIdAndMetadataAndAmount( | ||
chainName: string, | ||
contractAddress: string, | ||
owner_address: string, | ||
reference_id: string, | ||
token_id: string, | ||
amount: string | ||
): Promise<blockchainData.Types.CreateMintRequestResult> { | ||
return await client.createMintRequest({ | ||
chainName, | ||
contractAddress, | ||
createMintRequestRequest: { | ||
assets: [ | ||
{ | ||
owner_address, | ||
reference_id, | ||
token_id, | ||
amount, | ||
}, | ||
], | ||
}, | ||
}); | ||
} |
78 changes: 78 additions & 0 deletions
78
...-data/minting-api-examples-with-node/create-erc721-mint-quantity-request-with-metadata.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { blockchainData } from "@imtbl/sdk"; | ||
import { client } from "../lib"; | ||
|
||
export async function createMintRequestWithMetadata( | ||
chainName: string, | ||
contractAddress: string, | ||
owner_address: string, | ||
reference_id: string | ||
): Promise<blockchainData.Types.CreateMintRequestResult> { | ||
return await client.createMintRequest({ | ||
chainName, | ||
contractAddress, | ||
createMintRequestRequest: { | ||
assets: [ | ||
{ | ||
owner_address, | ||
reference_id, | ||
metadata: { | ||
name: "Brown Dog Green Car", | ||
description: "This NFT is a Brown Dog in a Green Car", | ||
image: "https://mt-test-2.s3.ap-southeast-2.amazonaws.com/BDGC.png", | ||
external_url: null, | ||
animation_url: null, | ||
youtube_url: null, | ||
attributes: [ | ||
{ | ||
trait_type: "Pet", | ||
value: "Dog", | ||
}, | ||
{ | ||
trait_type: "Pet Colour", | ||
value: "Brown", | ||
}, | ||
{ | ||
trait_type: "Vehicle", | ||
value: "Car", | ||
}, | ||
{ | ||
trait_type: "Vehicle Colour", | ||
value: "Green", | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
owner_address, | ||
reference_id, | ||
metadata: { | ||
name: "Brown Dog Red Car", | ||
description: "This NFT is a Brown Dog in a Red Car", | ||
image: "https://mt-test-2.s3.ap-southeast-2.amazonaws.com/BDRC.png", | ||
external_url: null, | ||
animation_url: null, | ||
youtube_url: null, | ||
attributes: [ | ||
{ | ||
trait_type: "Pet", | ||
value: "Dog", | ||
}, | ||
{ | ||
trait_type: "Pet Colour", | ||
value: "Brown", | ||
}, | ||
{ | ||
trait_type: "Vehicle", | ||
value: "Car", | ||
}, | ||
{ | ||
trait_type: "Vehicle Colour", | ||
value: "Red", | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
} |
22 changes: 22 additions & 0 deletions
22
...les/blockchain-data/minting-api-examples-with-node/create-erc721-mint-quantity-request.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { blockchainData } from "@imtbl/sdk"; | ||
import { client } from "../lib"; | ||
|
||
export async function createMintRequest( | ||
chainName: string, | ||
contractAddress: string, | ||
owner_address: string, | ||
reference_id: string | ||
): Promise<blockchainData.Types.CreateMintRequestResult> { | ||
return await client.createMintRequest({ | ||
chainName, | ||
contractAddress, | ||
createMintRequestRequest: { | ||
assets: [ | ||
{ | ||
owner_address, | ||
reference_id, | ||
}, | ||
], | ||
}, | ||
}); | ||
} |
81 changes: 81 additions & 0 deletions
81
...lockchain-data/minting-api-examples-with-node/create-erc721-mint-request-with-metadata.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import { blockchainData } from "@imtbl/sdk"; | ||
import { client } from "../lib"; | ||
|
||
export async function createMintRequestWithTokenIdAndMetadata( | ||
chainName: string, | ||
contractAddress: string, | ||
owner_address: string, | ||
reference_id: string, | ||
token_id: string | ||
): Promise<blockchainData.Types.CreateMintRequestResult> { | ||
return await client.createMintRequest({ | ||
chainName, | ||
contractAddress, | ||
createMintRequestRequest: { | ||
assets: [ | ||
{ | ||
owner_address, | ||
reference_id, | ||
token_id, | ||
metadata: { | ||
name: "Brown Dog Green Car", | ||
description: "This NFT is a Brown Dog in a Green Car", | ||
image: "https://mt-test-2.s3.ap-southeast-2.amazonaws.com/BDGC.png", | ||
external_url: null, | ||
animation_url: null, | ||
youtube_url: null, | ||
attributes: [ | ||
{ | ||
trait_type: "Pet", | ||
value: "Dog", | ||
}, | ||
{ | ||
trait_type: "Pet Colour", | ||
value: "Brown", | ||
}, | ||
{ | ||
trait_type: "Vehicle", | ||
value: "Car", | ||
}, | ||
{ | ||
trait_type: "Vehicle Colour", | ||
value: "Green", | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
owner_address, | ||
reference_id, | ||
token_id, | ||
metadata: { | ||
name: "Brown Dog Red Car", | ||
description: "This NFT is a Brown Dog in a Red Car", | ||
image: "https://mt-test-2.s3.ap-southeast-2.amazonaws.com/BDRC.png", | ||
external_url: null, | ||
animation_url: null, | ||
youtube_url: null, | ||
attributes: [ | ||
{ | ||
trait_type: "Pet", | ||
value: "Dog", | ||
}, | ||
{ | ||
trait_type: "Pet Colour", | ||
value: "Brown", | ||
}, | ||
{ | ||
trait_type: "Vehicle", | ||
value: "Car", | ||
}, | ||
{ | ||
trait_type: "Vehicle Colour", | ||
value: "Red", | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
} |
24 changes: 24 additions & 0 deletions
24
examples/blockchain-data/minting-api-examples-with-node/create-erc721-mint-request.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { blockchainData } from "@imtbl/sdk"; | ||
import { client } from "../lib"; | ||
|
||
export async function createMintRequestWithTokenId( | ||
chainName: string, | ||
contractAddress: string, | ||
owner_address: string, | ||
reference_id: string, | ||
token_id: string | ||
): Promise<blockchainData.Types.CreateMintRequestResult> { | ||
return await client.createMintRequest({ | ||
chainName, | ||
contractAddress, | ||
createMintRequestRequest: { | ||
assets: [ | ||
{ | ||
owner_address, | ||
reference_id, | ||
token_id, | ||
}, | ||
], | ||
}, | ||
}); | ||
} |
10 changes: 10 additions & 0 deletions
10
examples/blockchain-data/minting-api-examples-with-node/get-mint-request.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { blockchainData } from "@imtbl/sdk"; | ||
import { client } from "../lib"; | ||
|
||
export async function getMintRequest( | ||
chainName: string, | ||
contractAddress: string, | ||
referenceId: string | ||
): Promise<blockchainData.Types.ListMintRequestsResult> { | ||
return await client.getMintRequest({ chainName, contractAddress, referenceId }); | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/blockchain-data/minting-api-examples-with-node/list-mint-requests.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { blockchainData } from "@imtbl/sdk"; | ||
import { client } from "../lib"; | ||
|
||
export async function listMintRequests( | ||
chainName: string, | ||
contractAddress: string, | ||
): Promise<blockchainData.Types.ListMintRequestsResult> { | ||
return await client.listMintRequests({ chainName, contractAddress }); | ||
} |
This file was deleted.
Oops, something went wrong.