@dzapio/sdk 2.0.33 → 2.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -153,6 +153,22 @@ declare const AllowanceTypes: {
153
153
  };
154
154
  type AllowanceType = (typeof AllowanceTypes)[keyof typeof AllowanceTypes];
155
155
 
156
+ declare enum AddressKind {
157
+ INVALID = "invalid",
158
+ NATIVE = "native",
159
+ TOKEN = "token",
160
+ CONTRACT = "contract",
161
+ WALLET = "wallet"
162
+ }
163
+ type AddressClassifyResult = {
164
+ valid: boolean;
165
+ kind: AddressKind;
166
+ isNative: boolean;
167
+ isToken: boolean;
168
+ isContract: boolean;
169
+ address: string;
170
+ };
171
+
156
172
  type HexString = `0x${string}`;
157
173
  type StatusResponse = keyof typeof STATUS_RESPONSE;
158
174
  type ChainData = {
@@ -458,6 +474,7 @@ type TxRequestData<T> = {
458
474
  type TradeGasBuildTxnResponse<T = TxData> = TxRequestData<T> & {
459
475
  quotes: Record<string, ParamQuotes>;
460
476
  gasless: false;
477
+ private: boolean;
461
478
  };
462
479
  type TradeBuildTxnResponse = TradeGasBuildTxnResponse & {
463
480
  data: string;
@@ -702,6 +719,10 @@ type SVMTxnDetails = {
702
719
  type: typeof chainTypes.svm;
703
720
  txnId: HexString;
704
721
  data: string[];
722
+ blockhash?: {
723
+ blockhash: string;
724
+ lastValidBlockHeight: number;
725
+ };
705
726
  estimatedGas: string;
706
727
  isJitoTx?: boolean;
707
728
  };
@@ -1787,13 +1808,19 @@ declare class DZapClient {
1787
1808
  }];
1788
1809
  getTradeQuotes(request: TradeQuotesRequest): Promise<TradeQuotesResponse>;
1789
1810
  buildTradeTxn(request: TradeBuildTxnRequest): Promise<TradeBuildTxnResponse>;
1790
- getTradeTxnStatus({ txHash, chainId }: {
1811
+ getTradeTxnStatus(params: {
1791
1812
  txHash: string;
1792
1813
  chainId: number;
1814
+ } | {
1815
+ txId: string;
1816
+ chainId: number;
1793
1817
  }): Promise<TradeStatusResponse>;
1794
- getTradeMultiTxnStatus({ txHashes, chainIds }: {
1818
+ getTradeMultiTxnStatus(params: {
1795
1819
  txHashes: string;
1796
1820
  chainIds: string;
1821
+ } | {
1822
+ txIds: string;
1823
+ chainIds: string;
1797
1824
  }): Promise<TradeStatusResponse[]>;
1798
1825
  getAllSupportedChains(): Promise<ChainData>;
1799
1826
  getAllTokens(chainId: number, source?: string, account?: string): Promise<any>;
@@ -1936,6 +1963,12 @@ declare function getTokensPairKey({ srcToken, destToken, srcChainId, destChainId
1936
1963
  destChainNativeAddress?: string;
1937
1964
  }): string;
1938
1965
 
1966
+ declare const classifyAddress: (params: {
1967
+ address: string;
1968
+ chainId: number;
1969
+ rpcUrls?: string[];
1970
+ }) => Promise<AddressClassifyResult | null>;
1971
+
1939
1972
  declare class SwapInputDataDecoder {
1940
1973
  private decodeSingleSwapData;
1941
1974
  private decodeMultiSwapData;
@@ -2382,4 +2415,4 @@ declare const citrea: {
2382
2415
  declare const customViemChains: viemChains.Chain[];
2383
2416
  declare const viemChainsById: Record<number, viemChains.Chain>;
2384
2417
 
2385
- export { type AllowanceType, AllowanceTypes, type ApiRpcResponse, type ApprovalMode, ApprovalModes, type BatchPermitCallbackParams, type BtcTxData, type BtclnTxData, type Chain, type ChainData, type ContractErrorResponse, DZapClient, DZapPermitMode, type DZapTransactionResponse, type EvmTxData, type Fee, type FeeDetails, type GaslessTradeBuildTxnResponse, type HexString, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProviderDetails, type PsbtInput, type PsbtOutput, type QuoteFilter, QuoteFilters, STATUS, type SVMTxnDetails, Services, type SignPermitResponse, type SignatureCallbackParams, SignatureExpiryInSecs, type SinglePermitCallbackParams, StatusCodes, type StepAction, type SvmTxData, type SwapInfo, SwapInputDataDecoder, type Token, type TokenInfo, type TokenPermitData, type TokenResponse, type TradeBuildTxnRequest, type TradeBuildTxnRequestData, type TradeBuildTxnResponse, type TradeGasBuildTxnResponse, type TradePath, type TradeQuotesRequest, type TradeQuotesRequestData, type TradeQuotesResponse, type TradeStatusResponse, type TradeStep, TxnStatus, type ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapIntegratorConfig, type ZapPath, type ZapPathAction, type ZapPathAsset, type ZapPool, type ZapPoolDetails, type ZapPoolDetailsRequest, type ZapPoolsRequest, type ZapPoolsResponse, type ZapPosition, type ZapPositionsRequest, type ZapPositionsResponse, type ZapProviders, type ZapQuoteRequest, type ZapQuoteResponse, type ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapStatus, type ZapStatusAsset, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
2418
+ export { type AllowanceType, AllowanceTypes, type ApiRpcResponse, type ApprovalMode, ApprovalModes, type BatchPermitCallbackParams, type BtcTxData, type BtclnTxData, type Chain, type ChainData, type ContractErrorResponse, DZapClient, DZapPermitMode, type DZapTransactionResponse, type EvmTxData, type Fee, type FeeDetails, type GaslessTradeBuildTxnResponse, type HexString, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProviderDetails, type PsbtInput, type PsbtOutput, type QuoteFilter, QuoteFilters, STATUS, type SVMTxnDetails, Services, type SignPermitResponse, type SignatureCallbackParams, SignatureExpiryInSecs, type SinglePermitCallbackParams, StatusCodes, type StepAction, type SvmTxData, type SwapInfo, SwapInputDataDecoder, type Token, type TokenInfo, type TokenPermitData, type TokenResponse, type TradeBuildTxnRequest, type TradeBuildTxnRequestData, type TradeBuildTxnResponse, type TradeGasBuildTxnResponse, type TradePath, type TradeQuotesRequest, type TradeQuotesRequestData, type TradeQuotesResponse, type TradeStatusResponse, type TradeStep, TxnStatus, type ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapIntegratorConfig, type ZapPath, type ZapPathAction, type ZapPathAsset, type ZapPool, type ZapPoolDetails, type ZapPoolDetailsRequest, type ZapPoolsRequest, type ZapPoolsResponse, type ZapPosition, type ZapPositionsRequest, type ZapPositionsResponse, type ZapProviders, type ZapQuoteRequest, type ZapQuoteResponse, type ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapStatus, type ZapStatusAsset, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
package/dist/index.d.ts CHANGED
@@ -153,6 +153,22 @@ declare const AllowanceTypes: {
153
153
  };
154
154
  type AllowanceType = (typeof AllowanceTypes)[keyof typeof AllowanceTypes];
155
155
 
156
+ declare enum AddressKind {
157
+ INVALID = "invalid",
158
+ NATIVE = "native",
159
+ TOKEN = "token",
160
+ CONTRACT = "contract",
161
+ WALLET = "wallet"
162
+ }
163
+ type AddressClassifyResult = {
164
+ valid: boolean;
165
+ kind: AddressKind;
166
+ isNative: boolean;
167
+ isToken: boolean;
168
+ isContract: boolean;
169
+ address: string;
170
+ };
171
+
156
172
  type HexString = `0x${string}`;
157
173
  type StatusResponse = keyof typeof STATUS_RESPONSE;
158
174
  type ChainData = {
@@ -458,6 +474,7 @@ type TxRequestData<T> = {
458
474
  type TradeGasBuildTxnResponse<T = TxData> = TxRequestData<T> & {
459
475
  quotes: Record<string, ParamQuotes>;
460
476
  gasless: false;
477
+ private: boolean;
461
478
  };
462
479
  type TradeBuildTxnResponse = TradeGasBuildTxnResponse & {
463
480
  data: string;
@@ -702,6 +719,10 @@ type SVMTxnDetails = {
702
719
  type: typeof chainTypes.svm;
703
720
  txnId: HexString;
704
721
  data: string[];
722
+ blockhash?: {
723
+ blockhash: string;
724
+ lastValidBlockHeight: number;
725
+ };
705
726
  estimatedGas: string;
706
727
  isJitoTx?: boolean;
707
728
  };
@@ -1787,13 +1808,19 @@ declare class DZapClient {
1787
1808
  }];
1788
1809
  getTradeQuotes(request: TradeQuotesRequest): Promise<TradeQuotesResponse>;
1789
1810
  buildTradeTxn(request: TradeBuildTxnRequest): Promise<TradeBuildTxnResponse>;
1790
- getTradeTxnStatus({ txHash, chainId }: {
1811
+ getTradeTxnStatus(params: {
1791
1812
  txHash: string;
1792
1813
  chainId: number;
1814
+ } | {
1815
+ txId: string;
1816
+ chainId: number;
1793
1817
  }): Promise<TradeStatusResponse>;
1794
- getTradeMultiTxnStatus({ txHashes, chainIds }: {
1818
+ getTradeMultiTxnStatus(params: {
1795
1819
  txHashes: string;
1796
1820
  chainIds: string;
1821
+ } | {
1822
+ txIds: string;
1823
+ chainIds: string;
1797
1824
  }): Promise<TradeStatusResponse[]>;
1798
1825
  getAllSupportedChains(): Promise<ChainData>;
1799
1826
  getAllTokens(chainId: number, source?: string, account?: string): Promise<any>;
@@ -1936,6 +1963,12 @@ declare function getTokensPairKey({ srcToken, destToken, srcChainId, destChainId
1936
1963
  destChainNativeAddress?: string;
1937
1964
  }): string;
1938
1965
 
1966
+ declare const classifyAddress: (params: {
1967
+ address: string;
1968
+ chainId: number;
1969
+ rpcUrls?: string[];
1970
+ }) => Promise<AddressClassifyResult | null>;
1971
+
1939
1972
  declare class SwapInputDataDecoder {
1940
1973
  private decodeSingleSwapData;
1941
1974
  private decodeMultiSwapData;
@@ -2382,4 +2415,4 @@ declare const citrea: {
2382
2415
  declare const customViemChains: viemChains.Chain[];
2383
2416
  declare const viemChainsById: Record<number, viemChains.Chain>;
2384
2417
 
2385
- export { type AllowanceType, AllowanceTypes, type ApiRpcResponse, type ApprovalMode, ApprovalModes, type BatchPermitCallbackParams, type BtcTxData, type BtclnTxData, type Chain, type ChainData, type ContractErrorResponse, DZapClient, DZapPermitMode, type DZapTransactionResponse, type EvmTxData, type Fee, type FeeDetails, type GaslessTradeBuildTxnResponse, type HexString, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProviderDetails, type PsbtInput, type PsbtOutput, type QuoteFilter, QuoteFilters, STATUS, type SVMTxnDetails, Services, type SignPermitResponse, type SignatureCallbackParams, SignatureExpiryInSecs, type SinglePermitCallbackParams, StatusCodes, type StepAction, type SvmTxData, type SwapInfo, SwapInputDataDecoder, type Token, type TokenInfo, type TokenPermitData, type TokenResponse, type TradeBuildTxnRequest, type TradeBuildTxnRequestData, type TradeBuildTxnResponse, type TradeGasBuildTxnResponse, type TradePath, type TradeQuotesRequest, type TradeQuotesRequestData, type TradeQuotesResponse, type TradeStatusResponse, type TradeStep, TxnStatus, type ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapIntegratorConfig, type ZapPath, type ZapPathAction, type ZapPathAsset, type ZapPool, type ZapPoolDetails, type ZapPoolDetailsRequest, type ZapPoolsRequest, type ZapPoolsResponse, type ZapPosition, type ZapPositionsRequest, type ZapPositionsResponse, type ZapProviders, type ZapQuoteRequest, type ZapQuoteResponse, type ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapStatus, type ZapStatusAsset, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
2418
+ export { type AllowanceType, AllowanceTypes, type ApiRpcResponse, type ApprovalMode, ApprovalModes, type BatchPermitCallbackParams, type BtcTxData, type BtclnTxData, type Chain, type ChainData, type ContractErrorResponse, DZapClient, DZapPermitMode, type DZapTransactionResponse, type EvmTxData, type Fee, type FeeDetails, type GaslessTradeBuildTxnResponse, type HexString, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProviderDetails, type PsbtInput, type PsbtOutput, type QuoteFilter, QuoteFilters, STATUS, type SVMTxnDetails, Services, type SignPermitResponse, type SignatureCallbackParams, SignatureExpiryInSecs, type SinglePermitCallbackParams, StatusCodes, type StepAction, type SvmTxData, type SwapInfo, SwapInputDataDecoder, type Token, type TokenInfo, type TokenPermitData, type TokenResponse, type TradeBuildTxnRequest, type TradeBuildTxnRequestData, type TradeBuildTxnResponse, type TradeGasBuildTxnResponse, type TradePath, type TradeQuotesRequest, type TradeQuotesRequestData, type TradeQuotesResponse, type TradeStatusResponse, type TradeStep, TxnStatus, type ZapBuildTxnRequest, type ZapBuildTxnResponse, type ZapBundleAction, type ZapBundleRequest, type ZapBundleSrcToken, type ZapBvmTxnDetails, type ZapChains, type ZapEvmTxnDetails, type ZapFee, type ZapIntegratorConfig, type ZapPath, type ZapPathAction, type ZapPathAsset, type ZapPool, type ZapPoolDetails, type ZapPoolDetailsRequest, type ZapPoolsRequest, type ZapPoolsResponse, type ZapPosition, type ZapPositionsRequest, type ZapPositionsResponse, type ZapProviders, type ZapQuoteRequest, type ZapQuoteResponse, type ZapRouteRequestPoolDetails, type ZapRouteRequestPositionDetails, type ZapStatus, type ZapStatusAsset, type ZapStatusRequest, type ZapStatusResponse, type ZapStatusStep, type ZapStep, type ZapTransactionStep, type ZapTxnDetails, type ZapUnderlyingToken, type ZapUnderlyingTokenWithAmount, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };