@dzapio/sdk 2.0.34 → 2.0.36

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 = {
@@ -422,6 +438,7 @@ type ParamQuotes = {
422
438
  provider: string;
423
439
  minDestAmount: string;
424
440
  priceImpact?: string | null;
441
+ duration?: string;
425
442
  };
426
443
  type EvmTxData = {
427
444
  from: HexString;
@@ -1797,12 +1814,14 @@ declare class DZapClient {
1797
1814
  chainId: number;
1798
1815
  } | {
1799
1816
  txId: string;
1817
+ chainId: number;
1800
1818
  }): Promise<TradeStatusResponse>;
1801
1819
  getTradeMultiTxnStatus(params: {
1802
1820
  txHashes: string;
1803
1821
  chainIds: string;
1804
1822
  } | {
1805
1823
  txIds: string;
1824
+ chainIds: string;
1806
1825
  }): Promise<TradeStatusResponse[]>;
1807
1826
  getAllSupportedChains(): Promise<ChainData>;
1808
1827
  getAllTokens(chainId: number, source?: string, account?: string): Promise<any>;
@@ -1945,6 +1964,12 @@ declare function getTokensPairKey({ srcToken, destToken, srcChainId, destChainId
1945
1964
  destChainNativeAddress?: string;
1946
1965
  }): string;
1947
1966
 
1967
+ declare const classifyAddress: (params: {
1968
+ address: string;
1969
+ chainId: number;
1970
+ rpcUrls?: string[];
1971
+ }) => Promise<AddressClassifyResult | null>;
1972
+
1948
1973
  declare class SwapInputDataDecoder {
1949
1974
  private decodeSingleSwapData;
1950
1975
  private decodeMultiSwapData;
@@ -2391,4 +2416,4 @@ declare const citrea: {
2391
2416
  declare const customViemChains: viemChains.Chain[];
2392
2417
  declare const viemChainsById: Record<number, viemChains.Chain>;
2393
2418
 
2394
- 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 };
2419
+ 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 = {
@@ -422,6 +438,7 @@ type ParamQuotes = {
422
438
  provider: string;
423
439
  minDestAmount: string;
424
440
  priceImpact?: string | null;
441
+ duration?: string;
425
442
  };
426
443
  type EvmTxData = {
427
444
  from: HexString;
@@ -1797,12 +1814,14 @@ declare class DZapClient {
1797
1814
  chainId: number;
1798
1815
  } | {
1799
1816
  txId: string;
1817
+ chainId: number;
1800
1818
  }): Promise<TradeStatusResponse>;
1801
1819
  getTradeMultiTxnStatus(params: {
1802
1820
  txHashes: string;
1803
1821
  chainIds: string;
1804
1822
  } | {
1805
1823
  txIds: string;
1824
+ chainIds: string;
1806
1825
  }): Promise<TradeStatusResponse[]>;
1807
1826
  getAllSupportedChains(): Promise<ChainData>;
1808
1827
  getAllTokens(chainId: number, source?: string, account?: string): Promise<any>;
@@ -1945,6 +1964,12 @@ declare function getTokensPairKey({ srcToken, destToken, srcChainId, destChainId
1945
1964
  destChainNativeAddress?: string;
1946
1965
  }): string;
1947
1966
 
1967
+ declare const classifyAddress: (params: {
1968
+ address: string;
1969
+ chainId: number;
1970
+ rpcUrls?: string[];
1971
+ }) => Promise<AddressClassifyResult | null>;
1972
+
1948
1973
  declare class SwapInputDataDecoder {
1949
1974
  private decodeSingleSwapData;
1950
1975
  private decodeMultiSwapData;
@@ -2391,4 +2416,4 @@ declare const citrea: {
2391
2416
  declare const customViemChains: viemChains.Chain[];
2392
2417
  declare const viemChainsById: Record<number, viemChains.Chain>;
2393
2418
 
2394
- 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 };
2419
+ 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 };