-
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.
Merge branch 'main' into TD-1677-add-bids
- Loading branch information
Showing
26 changed files
with
747 additions
and
127 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
examples/blockchain-data/api-examples-with-node/get-token.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,12 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
|
||
import { client } from '../lib'; | ||
|
||
export async function getToken( | ||
contractAddress: string, | ||
): Promise<blockchainData.Types.GetTokenResult> { | ||
return await client.getToken({ | ||
chainName: 'imtbl-zkevm-testnet', | ||
contractAddress, | ||
}); | ||
} |
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 |
---|---|---|
@@ -1,27 +1,45 @@ | ||
import { verifySuccessfulMints } from "./verify-successful-mints"; | ||
import { getChains } from "./exported-types"; | ||
import { getCollection } from "./get-collection"; | ||
import { getMetadata } from "./get-metadata"; | ||
import { getNFT } from "./get-nft"; | ||
import { listMetadata } from "./list-metadata"; | ||
import { listCollections } from "./list-collections"; | ||
import { listCollectionsByNFTOwner } from "./list-collections-by-owner"; | ||
import { listActivities } from "./list-activities"; | ||
import { listNFTsByAccountAddress } from "./list-nfts-by-account-address"; | ||
import { refreshNFTMetadata } from "./refresh-nft-metadata"; | ||
import { refreshStackedMetadata } from "./refresh-stacked-metadata"; | ||
import { verifySuccessfulMints } from './verify-successful-mints'; | ||
import { getChains } from './exported-types'; | ||
import { getCollection } from './get-collection'; | ||
import { getMetadata } from './get-metadata'; | ||
import { getNFT } from './get-nft'; | ||
import { getToken } from './get-token'; | ||
import { listAllNFTs } from './list-nfts'; | ||
import { listAllNFTOwners } from './list-all-nft-owners'; | ||
import { listChains } from './list-chains'; | ||
import { listMetadata } from './list-metadata'; | ||
import { listCollections } from './list-collections'; | ||
import { listCollectionsByNFTOwner } from './list-collections-by-owner'; | ||
import { listActivities } from './list-activities'; | ||
import { listActivitiesByActivityType } from './list-activties-by-activity-type'; | ||
import { listNFTsByAccountAddress } from './list-nfts-by-account-address'; | ||
import { listNFTsByCollection } from './list-nfts-by-collection'; | ||
import { listNFTOwnersByContractAddress } from './list-nft-owners-by-contract-address'; | ||
import { listNFTOwnersByTokenId } from './list-nft-owners-by-token-id'; | ||
import { listTokens } from './list-tokens'; | ||
import { refreshNFTMetadata } from './refresh-nft-metadata'; | ||
import { refreshStackedMetadata } from './refresh-stacked-metadata'; | ||
|
||
export { | ||
verifySuccessfulMints, | ||
getChains, | ||
getCollection, | ||
getMetadata, | ||
getNFT, | ||
getToken, | ||
listAllNFTs, | ||
listAllNFTOwners, | ||
listChains, | ||
listMetadata, | ||
listCollections, | ||
listCollectionsByNFTOwner, | ||
listActivities, | ||
listActivitiesByActivityType, | ||
listNFTsByAccountAddress, | ||
listNFTsByCollection, | ||
listNFTOwnersByContractAddress, | ||
listNFTOwnersByTokenId, | ||
listTokens, | ||
refreshNFTMetadata, | ||
refreshStackedMetadata, | ||
}; |
13 changes: 13 additions & 0 deletions
13
examples/blockchain-data/api-examples-with-node/list-activties-by-activity-type.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,13 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
import { client } from '../lib'; | ||
|
||
export async function listActivitiesByActivityType( | ||
contractAddress: string, | ||
activityType: blockchainData.Types.ActivityType, | ||
): Promise<blockchainData.Types.ListActivitiesResult> { | ||
return await client.listActivities({ | ||
chainName: 'imtbl-zkevm-testnet', | ||
contractAddress, | ||
activityType, | ||
}); | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/blockchain-data/api-examples-with-node/list-all-nft-owners.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,8 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
import { client } from '../lib'; | ||
|
||
export async function listAllNFTOwners(): Promise<blockchainData.Types.ListNFTOwnersResult> { | ||
return await client.listAllNFTOwners({ | ||
chainName: 'imtbl-zkevm-testnet', | ||
}); | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/blockchain-data/api-examples-with-node/list-chains.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 listChains( | ||
request: blockchainData.Types.ListChainsRequestParams, | ||
): Promise<blockchainData.Types.ListChainsResult> { | ||
return await client.listChains(request); | ||
} |
11 changes: 11 additions & 0 deletions
11
examples/blockchain-data/api-examples-with-node/list-nft-owners-by-contract-address.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,11 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
import { client } from '../lib'; | ||
|
||
export async function listNFTOwnersByContractAddress( | ||
contractAddress: string, | ||
): Promise<blockchainData.Types.ListNFTOwnersResult> { | ||
return await client.listNFTOwnersByContractAddress({ | ||
chainName: 'imtbl-zkevm-testnet', | ||
contractAddress, | ||
}); | ||
} |
13 changes: 13 additions & 0 deletions
13
examples/blockchain-data/api-examples-with-node/list-nft-owners-by-token-id.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,13 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
import { client } from '../lib'; | ||
|
||
export async function listNFTOwnersByTokenId( | ||
contractAddress: string, | ||
tokenId: string, | ||
): Promise<blockchainData.Types.ListNFTOwnersResult> { | ||
return await client.listNFTOwners({ | ||
chainName: 'imtbl-zkevm-testnet', | ||
contractAddress, | ||
tokenId, | ||
}); | ||
} |
13 changes: 13 additions & 0 deletions
13
examples/blockchain-data/api-examples-with-node/list-nfts-by-collection.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,13 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
import { client } from '../lib'; | ||
|
||
export async function listNFTsByCollection( | ||
contractAddress: string, | ||
tokenId: string[], | ||
): Promise<blockchainData.Types.ListNFTsResult> { | ||
return await client.listNFTs({ | ||
chainName: 'imtbl-zkevm-testnet', | ||
contractAddress, | ||
tokenId, | ||
}); | ||
} |
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,8 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
import { client } from '../lib'; | ||
|
||
export async function listAllNFTs(): Promise<blockchainData.Types.ListNFTsResult> { | ||
return await client.listAllNFTs({ | ||
chainName: 'imtbl-zkevm-testnet', | ||
}); | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/blockchain-data/api-examples-with-node/list-tokens.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 listTokens(): Promise<blockchainData.Types.ListTokensResult> { | ||
return await client.listTokens({ | ||
chainName: 'imtbl-zkevm-testnet', | ||
}); | ||
} |
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, | ||
}, | ||
], | ||
}, | ||
}); | ||
} |
Oops, something went wrong.