Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: export nft apis #1573

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
// 🌲☀️🌲
export { buildMintTransaction } from './buildMintTransaction';
export { buildSwapTransaction } from './buildSwapTransaction';
export { buildPayTransaction } from './buildPayTransaction';
export { getMintDetails } from './getMintDetails';
export { getSwapQuote } from './getSwapQuote';
export { getTokenDetails } from './getTokenDetails';
export { getTokens } from './getTokens';
export type {
APIError,
BuildMintTransactionParams,
BuildMintTransactionResponse,
BuildPayTransactionParams,
BuildPayTransactionResponse,
BuildSwapTransaction,
BuildSwapTransactionParams,
BuildSwapTransactionResponse,
GetMintDetailsParams,
GetMintDetailsResponse,
GetSwapQuoteParams,
GetSwapQuoteResponse,
GetTokenDetailsParams,
GetTokenDetailsResponse,
GetTokensOptions,
GetTokensResponse,
} from './types';
18 changes: 18 additions & 0 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ export type RawTransactionData = {

export type SwapAPIParams = GetQuoteAPIParams | GetSwapAPIParams;

/**
* Note: exported as public Type
*/
export type GetTokenDetailsParams = {
contractAddress: Address; // The address of the token contract
tokenId?: string; // The ID of the token
Expand All @@ -161,8 +164,14 @@ export type TokenDetails = {
contractType: ContractType; // ERC721, ERC1155
};

/**
* Note: exported as public Type
*/
export type GetTokenDetailsResponse = TokenDetails | APIError;

/**
* Note: exported as public Type
*/
export type GetMintDetailsParams = {
contractAddress: Address; // The address of the token contract
takerAddress?: Address; // The address of the user
Expand All @@ -186,8 +195,14 @@ export type MintDetails = {
network: string; // The network the NFT is on
};

/**
* Note: exported as public Type
*/
export type GetMintDetailsResponse = MintDetails | APIError;

/**
* Note: exported as public Type
*/
export type BuildMintTransactionParams = {
mintAddress: Address; // The address of the token contract to mint
takerAddress: Address; // The address of the user
Expand All @@ -205,4 +220,7 @@ type MintTransaction = {
};
};

/**
* Note: exported as public Type
*/
export type BuildMintTransactionResponse = MintTransaction | APIError;