@dzapio/sdk 2.0.42 → 2.0.44
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 +46 -2
- package/dist/index.d.ts +46 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -644,7 +644,50 @@ type TradeQuote = {
|
|
|
644
644
|
additionalInfo?: AdditionalInfo;
|
|
645
645
|
};
|
|
646
646
|
type TradeQuotesByProviderId = {
|
|
647
|
-
[
|
|
647
|
+
[provider: string]: TradeQuote;
|
|
648
|
+
};
|
|
649
|
+
type ProtocolErrorType = 'AMOUNT' | 'ROUTE' | 'SLIPPAGE' | 'UNKNOWN';
|
|
650
|
+
type ProtocolRouteReason = 'NO_ROUTE' | 'UNSUPPORTED_PAIR' | 'INSUFFICIENT_LIQUIDITY' | 'UNSUPPORTED_TOKEN' | 'UNSUPPORTED_CHAIN';
|
|
651
|
+
type ProtocolAmountReason = 'AMOUNT_TOO_LOW' | 'AMOUNT_TOO_HIGH' | 'AMOUNT_OUT_OF_RANGE';
|
|
652
|
+
type ProtocolAmountErrorDetails = {
|
|
653
|
+
providerMessage: string;
|
|
654
|
+
minAmount?: string;
|
|
655
|
+
maxAmount?: string;
|
|
656
|
+
token?: string;
|
|
657
|
+
decimals?: number;
|
|
658
|
+
};
|
|
659
|
+
type ProtocolRouteErrorDetails = {
|
|
660
|
+
providerMessage: string;
|
|
661
|
+
reason: ProtocolRouteReason;
|
|
662
|
+
};
|
|
663
|
+
type ProtocolSlippageErrorDetails = {
|
|
664
|
+
providerMessage: string;
|
|
665
|
+
recommendedSlippage?: string;
|
|
666
|
+
receivedAmount?: string;
|
|
667
|
+
expectedAmount?: string;
|
|
668
|
+
};
|
|
669
|
+
type ProtocolUnknownErrorDetails = {
|
|
670
|
+
providerMessage?: string;
|
|
671
|
+
};
|
|
672
|
+
type ProtocolErrorInfo = {
|
|
673
|
+
errorType: 'AMOUNT';
|
|
674
|
+
message: ProtocolAmountReason;
|
|
675
|
+
details: ProtocolAmountErrorDetails;
|
|
676
|
+
} | {
|
|
677
|
+
errorType: 'ROUTE';
|
|
678
|
+
message: ProtocolRouteReason;
|
|
679
|
+
details: ProtocolRouteErrorDetails;
|
|
680
|
+
} | {
|
|
681
|
+
errorType: 'SLIPPAGE';
|
|
682
|
+
message: string;
|
|
683
|
+
details: ProtocolSlippageErrorDetails;
|
|
684
|
+
} | {
|
|
685
|
+
errorType: 'UNKNOWN';
|
|
686
|
+
message: string;
|
|
687
|
+
details: ProtocolUnknownErrorDetails;
|
|
688
|
+
};
|
|
689
|
+
type UnavailableRoutes = {
|
|
690
|
+
[provider: string]: ProtocolErrorInfo;
|
|
648
691
|
};
|
|
649
692
|
type TradeQuotesResponse = {
|
|
650
693
|
[pair: string]: {
|
|
@@ -655,6 +698,7 @@ type TradeQuotesResponse = {
|
|
|
655
698
|
bestReturnSource: string;
|
|
656
699
|
questSource?: string;
|
|
657
700
|
quoteRates?: TradeQuotesByProviderId;
|
|
701
|
+
unavailableRoutes?: UnavailableRoutes;
|
|
658
702
|
tokensWithoutPrice: Record<number, string[]>;
|
|
659
703
|
};
|
|
660
704
|
};
|
|
@@ -2487,4 +2531,4 @@ declare const robinhood: {
|
|
|
2487
2531
|
declare const customViemChains: viemChains.Chain[];
|
|
2488
2532
|
declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
2489
2533
|
|
|
2490
|
-
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, type HyperLiquidTxData, 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, robinhood, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
|
|
2534
|
+
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, type HyperLiquidTxData, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProtocolAmountErrorDetails, type ProtocolAmountReason, type ProtocolErrorInfo, type ProtocolErrorType, type ProtocolRouteErrorDetails, type ProtocolRouteReason, type ProtocolSlippageErrorDetails, type ProtocolUnknownErrorDetails, 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 UnavailableRoutes, 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, robinhood, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
|
package/dist/index.d.ts
CHANGED
|
@@ -644,7 +644,50 @@ type TradeQuote = {
|
|
|
644
644
|
additionalInfo?: AdditionalInfo;
|
|
645
645
|
};
|
|
646
646
|
type TradeQuotesByProviderId = {
|
|
647
|
-
[
|
|
647
|
+
[provider: string]: TradeQuote;
|
|
648
|
+
};
|
|
649
|
+
type ProtocolErrorType = 'AMOUNT' | 'ROUTE' | 'SLIPPAGE' | 'UNKNOWN';
|
|
650
|
+
type ProtocolRouteReason = 'NO_ROUTE' | 'UNSUPPORTED_PAIR' | 'INSUFFICIENT_LIQUIDITY' | 'UNSUPPORTED_TOKEN' | 'UNSUPPORTED_CHAIN';
|
|
651
|
+
type ProtocolAmountReason = 'AMOUNT_TOO_LOW' | 'AMOUNT_TOO_HIGH' | 'AMOUNT_OUT_OF_RANGE';
|
|
652
|
+
type ProtocolAmountErrorDetails = {
|
|
653
|
+
providerMessage: string;
|
|
654
|
+
minAmount?: string;
|
|
655
|
+
maxAmount?: string;
|
|
656
|
+
token?: string;
|
|
657
|
+
decimals?: number;
|
|
658
|
+
};
|
|
659
|
+
type ProtocolRouteErrorDetails = {
|
|
660
|
+
providerMessage: string;
|
|
661
|
+
reason: ProtocolRouteReason;
|
|
662
|
+
};
|
|
663
|
+
type ProtocolSlippageErrorDetails = {
|
|
664
|
+
providerMessage: string;
|
|
665
|
+
recommendedSlippage?: string;
|
|
666
|
+
receivedAmount?: string;
|
|
667
|
+
expectedAmount?: string;
|
|
668
|
+
};
|
|
669
|
+
type ProtocolUnknownErrorDetails = {
|
|
670
|
+
providerMessage?: string;
|
|
671
|
+
};
|
|
672
|
+
type ProtocolErrorInfo = {
|
|
673
|
+
errorType: 'AMOUNT';
|
|
674
|
+
message: ProtocolAmountReason;
|
|
675
|
+
details: ProtocolAmountErrorDetails;
|
|
676
|
+
} | {
|
|
677
|
+
errorType: 'ROUTE';
|
|
678
|
+
message: ProtocolRouteReason;
|
|
679
|
+
details: ProtocolRouteErrorDetails;
|
|
680
|
+
} | {
|
|
681
|
+
errorType: 'SLIPPAGE';
|
|
682
|
+
message: string;
|
|
683
|
+
details: ProtocolSlippageErrorDetails;
|
|
684
|
+
} | {
|
|
685
|
+
errorType: 'UNKNOWN';
|
|
686
|
+
message: string;
|
|
687
|
+
details: ProtocolUnknownErrorDetails;
|
|
688
|
+
};
|
|
689
|
+
type UnavailableRoutes = {
|
|
690
|
+
[provider: string]: ProtocolErrorInfo;
|
|
648
691
|
};
|
|
649
692
|
type TradeQuotesResponse = {
|
|
650
693
|
[pair: string]: {
|
|
@@ -655,6 +698,7 @@ type TradeQuotesResponse = {
|
|
|
655
698
|
bestReturnSource: string;
|
|
656
699
|
questSource?: string;
|
|
657
700
|
quoteRates?: TradeQuotesByProviderId;
|
|
701
|
+
unavailableRoutes?: UnavailableRoutes;
|
|
658
702
|
tokensWithoutPrice: Record<number, string[]>;
|
|
659
703
|
};
|
|
660
704
|
};
|
|
@@ -2487,4 +2531,4 @@ declare const robinhood: {
|
|
|
2487
2531
|
declare const customViemChains: viemChains.Chain[];
|
|
2488
2532
|
declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
2489
2533
|
|
|
2490
|
-
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, type HyperLiquidTxData, 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, robinhood, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
|
|
2534
|
+
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, type HyperLiquidTxData, OtherAbis, type ParamQuotes, type PermitMode, PermitTypes, type ProtocolAmountErrorDetails, type ProtocolAmountReason, type ProtocolErrorInfo, type ProtocolErrorType, type ProtocolRouteErrorDetails, type ProtocolRouteReason, type ProtocolSlippageErrorDetails, type ProtocolUnknownErrorDetails, 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 UnavailableRoutes, 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, robinhood, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dzapio/sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.44",
|
|
4
4
|
"description": "A TypeScript/JavaScript SDK for interacting with the DZap protocol, providing utilities for DeFi operations including Swaps, Bridges, and Zaps.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"source": "src/index.ts",
|