-
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.
docs: Add code examples for Marketplace API endpoints (#2392)
- Loading branch information
1 parent
4ee9859
commit b605781
Showing
12 changed files
with
302 additions
and
7 deletions.
There are no files selected for viewing
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
12 changes: 12 additions & 0 deletions
12
examples/blockchain-data/api-examples-with-node/list-filters.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 listFilters( | ||
chainName: string, | ||
contractAddress: string, | ||
): Promise<blockchainData.Types.ListFiltersResult> { | ||
return await client.listFilters({ | ||
chainName, | ||
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
12 changes: 12 additions & 0 deletions
12
examples/blockchain-data/api-examples-with-node/list-stacks.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 listStacks( | ||
chainName: string, | ||
stackId: string[], | ||
): Promise<blockchainData.Types.StackBundle[]> { | ||
return await client.listStacks({ | ||
chainName, | ||
stackId, | ||
}); | ||
} |
14 changes: 14 additions & 0 deletions
14
examples/blockchain-data/api-examples-with-node/quotes-for-nfts.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,14 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
import { client } from '../lib'; | ||
|
||
export async function quotesForNFTs( | ||
chainName: string, | ||
contractAddress: string, | ||
tokenId: string[], | ||
): Promise<blockchainData.Types.QuotesForNFTsResult> { | ||
return await client.quotesForNFTs({ | ||
chainName, | ||
contractAddress, | ||
tokenId, | ||
}); | ||
} |
14 changes: 14 additions & 0 deletions
14
examples/blockchain-data/api-examples-with-node/quotes-for-stacks.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,14 @@ | ||
import { blockchainData } from '@imtbl/sdk'; | ||
import { client } from '../lib'; | ||
|
||
export async function quotesForStacks( | ||
chainName: string, | ||
contractAddress: string, | ||
stackId: string[], | ||
): Promise<blockchainData.Types.QuotesForStacksResult> { | ||
return await client.quotesForStacks({ | ||
chainName, | ||
contractAddress, | ||
stackId, | ||
}); | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/blockchain-data/api-examples-with-node/search-nfts.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 searchNFTs( | ||
chainName: string, | ||
contractAddress: string[], | ||
): Promise<blockchainData.Types.SearchNFTsResult> { | ||
return await client.searchNFTs({ | ||
chainName, | ||
contractAddress, | ||
}); | ||
} |
12 changes: 12 additions & 0 deletions
12
examples/blockchain-data/api-examples-with-node/search-stacks.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 searchStacks( | ||
chainName: string, | ||
contractAddress: string[], | ||
): Promise<blockchainData.Types.SearchStacksResult> { | ||
return await client.searchStacks({ | ||
chainName, | ||
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
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
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
Oops, something went wrong.