@dfns/sdk
Advanced tools
Comparing version 0.5.6-alpha.8 to 0.5.6-alpha.9
@@ -13,3 +13,4 @@ import { DfnsApiClientOptions } from '../../types/generic'; | ||
listAccounts(request: T.ListAccountsRequest): Promise<T.ListAccountsResponse>; | ||
listAssetWithdrawalNetworks(request: T.ListAssetWithdrawalNetworksRequest): Promise<T.ListAssetWithdrawalNetworksResponse>; | ||
listExchanges(request?: T.ListExchangesRequest): Promise<T.ListExchangesResponse>; | ||
} |
@@ -92,2 +92,13 @@ "use strict"; | ||
} | ||
async listAssetWithdrawalNetworks(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts/:accountId/assets/:asset/withdrawal-networks', { | ||
path: request ?? {}, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async listExchanges(request) { | ||
@@ -94,0 +105,0 @@ const path = (0, url_1.buildPathAndQuery)('/exchanges', { |
@@ -18,3 +18,4 @@ import { SignUserActionChallengeRequest, UserActionChallengeResponse } from '../../baseAuthApi'; | ||
listAccounts(request: T.ListAccountsRequest): Promise<T.ListAccountsResponse>; | ||
listAssetWithdrawalNetworks(request: T.ListAssetWithdrawalNetworksRequest): Promise<T.ListAssetWithdrawalNetworksResponse>; | ||
listExchanges(request?: T.ListExchangesRequest): Promise<T.ListExchangesResponse>; | ||
} |
@@ -152,2 +152,13 @@ "use strict"; | ||
} | ||
async listAssetWithdrawalNetworks(request) { | ||
const path = (0, url_1.buildPathAndQuery)('/exchanges/:exchangeId/accounts/:accountId/assets/:asset/withdrawal-networks', { | ||
path: request ?? {}, | ||
query: {}, | ||
}); | ||
const response = await (0, fetch_1.simpleFetch)(path, { | ||
method: 'GET', | ||
apiOptions: this.apiOptions, | ||
}); | ||
return response.json(); | ||
} | ||
async listExchanges(request) { | ||
@@ -154,0 +165,0 @@ const path = (0, url_1.buildPathAndQuery)('/exchanges', { |
@@ -339,27 +339,2 @@ export type CreateDepositBody = { | ||
balance: string; | ||
networks: (({ | ||
kind: "Native"; | ||
} | { | ||
kind: "Asa"; | ||
assetId: string; | ||
} | { | ||
kind: "Erc20" | "Trc20"; | ||
contract: string; | ||
} | { | ||
kind: "Sep41"; | ||
issuer: string; | ||
assetCode: string; | ||
} | { | ||
kind: "Trc10"; | ||
tokenId: string; | ||
} | { | ||
kind: "Spl" | "Spl2022"; | ||
mint: string; | ||
} | { | ||
kind: "Tep74"; | ||
master: string; | ||
}) & { | ||
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Kaspa" | "KaspaTestnet11" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Origyn" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark"; | ||
decimals: number; | ||
})[]; | ||
}[]; | ||
@@ -390,2 +365,33 @@ nextPageToken?: string | undefined; | ||
}; | ||
export type ListAssetWithdrawalNetworksParams = { | ||
exchangeId: string; | ||
accountId: string; | ||
asset: string; | ||
}; | ||
export type ListAssetWithdrawalNetworksResponse = (({ | ||
kind: "Native"; | ||
} | { | ||
kind: "Asa"; | ||
assetId: string; | ||
} | { | ||
kind: "Erc20" | "Trc20"; | ||
contract: string; | ||
} | { | ||
kind: "Sep41"; | ||
issuer: string; | ||
assetCode: string; | ||
} | { | ||
kind: "Trc10"; | ||
tokenId: string; | ||
} | { | ||
kind: "Spl" | "Spl2022"; | ||
mint: string; | ||
} | { | ||
kind: "Tep74"; | ||
master: string; | ||
}) & { | ||
network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Celo" | "CeloAlfajores" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "FantomOpera" | "FantomTestnet" | "InternetComputer" | "Kaspa" | "KaspaTestnet11" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Origyn" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Solana" | "SolanaDevnet" | "Stellar" | "StellarTestnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark"; | ||
decimals: number; | ||
})[]; | ||
export type ListAssetWithdrawalNetworksRequest = ListAssetWithdrawalNetworksParams; | ||
export type ListExchangesQuery = { | ||
@@ -392,0 +398,0 @@ limit?: number | undefined; |
{ | ||
"name": "@dfns/sdk", | ||
"version": "0.5.6-alpha.8", | ||
"version": "0.5.6-alpha.9", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "buffer": "6.0.3", |
584219
14729