Skip to content

Commit

Permalink
fix: export nft apis (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessey authored Nov 4, 2024
1 parent ea2a16e commit 2985add
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
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;

0 comments on commit 2985add

Please sign in to comment.