@dzapio/sdk 2.0.43 → 2.0.45
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 +48 -11
- package/dist/index.d.ts +48 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -164,6 +164,14 @@ declare const zapPathAction: {
|
|
|
164
164
|
readonly harvest: "harvest";
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
+
type ZapFee = {
|
|
168
|
+
amount: string;
|
|
169
|
+
amountUSD: string;
|
|
170
|
+
asset: ZapPathAsset;
|
|
171
|
+
included: boolean;
|
|
172
|
+
refundable: boolean;
|
|
173
|
+
};
|
|
174
|
+
|
|
167
175
|
type ZapPathAction = keyof typeof zapPathAction;
|
|
168
176
|
type ZapPathAsset = {
|
|
169
177
|
chainId: number;
|
|
@@ -423,12 +431,6 @@ type ZapChains = {
|
|
|
423
431
|
supportedProviders: string[];
|
|
424
432
|
};
|
|
425
433
|
};
|
|
426
|
-
type ZapFee = {
|
|
427
|
-
amount: string;
|
|
428
|
-
amountUSD: string;
|
|
429
|
-
asset: ZapPathAsset;
|
|
430
|
-
included: boolean;
|
|
431
|
-
};
|
|
432
434
|
type ZapUnderlyingToken = {
|
|
433
435
|
chainId: number;
|
|
434
436
|
address: HexString;
|
|
@@ -646,13 +648,48 @@ type TradeQuote = {
|
|
|
646
648
|
type TradeQuotesByProviderId = {
|
|
647
649
|
[provider: string]: TradeQuote;
|
|
648
650
|
};
|
|
649
|
-
type
|
|
650
|
-
|
|
651
|
+
type ProtocolErrorType = 'AMOUNT' | 'ROUTE' | 'SLIPPAGE' | 'UNKNOWN';
|
|
652
|
+
type ProtocolRouteReason = 'NO_ROUTE' | 'UNSUPPORTED_PAIR' | 'INSUFFICIENT_LIQUIDITY' | 'UNSUPPORTED_TOKEN' | 'UNSUPPORTED_CHAIN';
|
|
653
|
+
type ProtocolAmountReason = 'AMOUNT_TOO_LOW' | 'AMOUNT_TOO_HIGH' | 'AMOUNT_OUT_OF_RANGE';
|
|
654
|
+
type ProtocolAmountErrorDetails = {
|
|
655
|
+
providerMessage: string;
|
|
656
|
+
minAmount?: string;
|
|
657
|
+
maxAmount?: string;
|
|
658
|
+
token?: string;
|
|
659
|
+
decimals?: number;
|
|
660
|
+
};
|
|
661
|
+
type ProtocolRouteErrorDetails = {
|
|
662
|
+
providerMessage: string;
|
|
663
|
+
reason: ProtocolRouteReason;
|
|
664
|
+
};
|
|
665
|
+
type ProtocolSlippageErrorDetails = {
|
|
666
|
+
providerMessage: string;
|
|
667
|
+
recommendedSlippage?: string;
|
|
668
|
+
receivedAmount?: string;
|
|
669
|
+
expectedAmount?: string;
|
|
670
|
+
};
|
|
671
|
+
type ProtocolUnknownErrorDetails = {
|
|
672
|
+
providerMessage?: string;
|
|
673
|
+
};
|
|
674
|
+
type ProtocolErrorInfo = {
|
|
675
|
+
errorType: 'AMOUNT';
|
|
676
|
+
message: ProtocolAmountReason;
|
|
677
|
+
details: ProtocolAmountErrorDetails;
|
|
678
|
+
} | {
|
|
679
|
+
errorType: 'ROUTE';
|
|
680
|
+
message: ProtocolRouteReason;
|
|
681
|
+
details: ProtocolRouteErrorDetails;
|
|
682
|
+
} | {
|
|
683
|
+
errorType: 'SLIPPAGE';
|
|
684
|
+
message: string;
|
|
685
|
+
details: ProtocolSlippageErrorDetails;
|
|
686
|
+
} | {
|
|
687
|
+
errorType: 'UNKNOWN';
|
|
651
688
|
message: string;
|
|
652
|
-
details
|
|
689
|
+
details: ProtocolUnknownErrorDetails;
|
|
653
690
|
};
|
|
654
691
|
type UnavailableRoutes = {
|
|
655
|
-
[provider: string]:
|
|
692
|
+
[provider: string]: ProtocolErrorInfo;
|
|
656
693
|
};
|
|
657
694
|
type TradeQuotesResponse = {
|
|
658
695
|
[pair: string]: {
|
|
@@ -2496,4 +2533,4 @@ declare const robinhood: {
|
|
|
2496
2533
|
declare const customViemChains: viemChains.Chain[];
|
|
2497
2534
|
declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
2498
2535
|
|
|
2499
|
-
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
|
|
2536
|
+
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
|
@@ -164,6 +164,14 @@ declare const zapPathAction: {
|
|
|
164
164
|
readonly harvest: "harvest";
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
+
type ZapFee = {
|
|
168
|
+
amount: string;
|
|
169
|
+
amountUSD: string;
|
|
170
|
+
asset: ZapPathAsset;
|
|
171
|
+
included: boolean;
|
|
172
|
+
refundable: boolean;
|
|
173
|
+
};
|
|
174
|
+
|
|
167
175
|
type ZapPathAction = keyof typeof zapPathAction;
|
|
168
176
|
type ZapPathAsset = {
|
|
169
177
|
chainId: number;
|
|
@@ -423,12 +431,6 @@ type ZapChains = {
|
|
|
423
431
|
supportedProviders: string[];
|
|
424
432
|
};
|
|
425
433
|
};
|
|
426
|
-
type ZapFee = {
|
|
427
|
-
amount: string;
|
|
428
|
-
amountUSD: string;
|
|
429
|
-
asset: ZapPathAsset;
|
|
430
|
-
included: boolean;
|
|
431
|
-
};
|
|
432
434
|
type ZapUnderlyingToken = {
|
|
433
435
|
chainId: number;
|
|
434
436
|
address: HexString;
|
|
@@ -646,13 +648,48 @@ type TradeQuote = {
|
|
|
646
648
|
type TradeQuotesByProviderId = {
|
|
647
649
|
[provider: string]: TradeQuote;
|
|
648
650
|
};
|
|
649
|
-
type
|
|
650
|
-
|
|
651
|
+
type ProtocolErrorType = 'AMOUNT' | 'ROUTE' | 'SLIPPAGE' | 'UNKNOWN';
|
|
652
|
+
type ProtocolRouteReason = 'NO_ROUTE' | 'UNSUPPORTED_PAIR' | 'INSUFFICIENT_LIQUIDITY' | 'UNSUPPORTED_TOKEN' | 'UNSUPPORTED_CHAIN';
|
|
653
|
+
type ProtocolAmountReason = 'AMOUNT_TOO_LOW' | 'AMOUNT_TOO_HIGH' | 'AMOUNT_OUT_OF_RANGE';
|
|
654
|
+
type ProtocolAmountErrorDetails = {
|
|
655
|
+
providerMessage: string;
|
|
656
|
+
minAmount?: string;
|
|
657
|
+
maxAmount?: string;
|
|
658
|
+
token?: string;
|
|
659
|
+
decimals?: number;
|
|
660
|
+
};
|
|
661
|
+
type ProtocolRouteErrorDetails = {
|
|
662
|
+
providerMessage: string;
|
|
663
|
+
reason: ProtocolRouteReason;
|
|
664
|
+
};
|
|
665
|
+
type ProtocolSlippageErrorDetails = {
|
|
666
|
+
providerMessage: string;
|
|
667
|
+
recommendedSlippage?: string;
|
|
668
|
+
receivedAmount?: string;
|
|
669
|
+
expectedAmount?: string;
|
|
670
|
+
};
|
|
671
|
+
type ProtocolUnknownErrorDetails = {
|
|
672
|
+
providerMessage?: string;
|
|
673
|
+
};
|
|
674
|
+
type ProtocolErrorInfo = {
|
|
675
|
+
errorType: 'AMOUNT';
|
|
676
|
+
message: ProtocolAmountReason;
|
|
677
|
+
details: ProtocolAmountErrorDetails;
|
|
678
|
+
} | {
|
|
679
|
+
errorType: 'ROUTE';
|
|
680
|
+
message: ProtocolRouteReason;
|
|
681
|
+
details: ProtocolRouteErrorDetails;
|
|
682
|
+
} | {
|
|
683
|
+
errorType: 'SLIPPAGE';
|
|
684
|
+
message: string;
|
|
685
|
+
details: ProtocolSlippageErrorDetails;
|
|
686
|
+
} | {
|
|
687
|
+
errorType: 'UNKNOWN';
|
|
651
688
|
message: string;
|
|
652
|
-
details
|
|
689
|
+
details: ProtocolUnknownErrorDetails;
|
|
653
690
|
};
|
|
654
691
|
type UnavailableRoutes = {
|
|
655
|
-
[provider: string]:
|
|
692
|
+
[provider: string]: ProtocolErrorInfo;
|
|
656
693
|
};
|
|
657
694
|
type TradeQuotesResponse = {
|
|
658
695
|
[pair: string]: {
|
|
@@ -2496,4 +2533,4 @@ declare const robinhood: {
|
|
|
2496
2533
|
declare const customViemChains: viemChains.Chain[];
|
|
2497
2534
|
declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
2498
2535
|
|
|
2499
|
-
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
|
|
2536
|
+
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.45",
|
|
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",
|