@dzapio/sdk 2.0.45 → 2.0.47
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 +49 -4
- package/dist/index.d.ts +49 -4
- package/dist/index.js +36 -19
- package/dist/index.mjs +37 -21
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -718,9 +718,7 @@ type Token = {
|
|
|
718
718
|
type TokenPermitData = {
|
|
719
719
|
eip2612: {
|
|
720
720
|
supported: boolean;
|
|
721
|
-
|
|
722
|
-
domain?: TypedDataDomain;
|
|
723
|
-
};
|
|
721
|
+
domain?: TypedDataDomain;
|
|
724
722
|
};
|
|
725
723
|
permit2: {
|
|
726
724
|
supported: boolean;
|
|
@@ -2075,6 +2073,53 @@ declare function extendViemChain<Formatters extends ChainFormatters, const Base
|
|
|
2075
2073
|
|
|
2076
2074
|
declare const formatToken: <T extends HexString | string = string>(token: T, nativeTokenAddress?: T) => T;
|
|
2077
2075
|
|
|
2076
|
+
declare const arcTestnet: {
|
|
2077
|
+
blockExplorers: {
|
|
2078
|
+
readonly default: {
|
|
2079
|
+
readonly name: "ArcScan";
|
|
2080
|
+
readonly url: "https://testnet.arcscan.app";
|
|
2081
|
+
readonly apiUrl: "https://testnet.arcscan.app/api";
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
blockTime?: number | undefined | undefined;
|
|
2085
|
+
contracts: {
|
|
2086
|
+
readonly multicall3: {
|
|
2087
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2088
|
+
readonly blockCreated: 0;
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2091
|
+
ensTlds?: readonly string[] | undefined;
|
|
2092
|
+
id: 5042002;
|
|
2093
|
+
name: "Arc Testnet";
|
|
2094
|
+
nativeCurrency: {
|
|
2095
|
+
readonly name: "USDC";
|
|
2096
|
+
readonly symbol: "USDC";
|
|
2097
|
+
readonly decimals: 6;
|
|
2098
|
+
};
|
|
2099
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2100
|
+
rpcUrls: {
|
|
2101
|
+
readonly default: {
|
|
2102
|
+
readonly http: readonly ["https://rpc.testnet.arc.network", "https://rpc.quicknode.testnet.arc.network", "https://rpc.blockdaemon.testnet.arc.network", "https://rpc.drpc.testnet.arc.network"];
|
|
2103
|
+
readonly webSocket: readonly ["wss://rpc.testnet.arc.network", "wss://rpc.quicknode.testnet.arc.network"];
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
sourceId?: number | undefined | undefined;
|
|
2107
|
+
testnet: true;
|
|
2108
|
+
custom?: Record<string, unknown> | undefined;
|
|
2109
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2110
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2111
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2112
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2113
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2114
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2115
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2116
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2117
|
+
}] | undefined;
|
|
2118
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
|
|
2119
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2120
|
+
formatters?: undefined | undefined;
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2078
2123
|
declare const arthera: {
|
|
2079
2124
|
blockExplorers: {
|
|
2080
2125
|
readonly default: {
|
|
@@ -2533,4 +2578,4 @@ declare const robinhood: {
|
|
|
2533
2578
|
declare const customViemChains: viemChains.Chain[];
|
|
2534
2579
|
declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
2535
2580
|
|
|
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 };
|
|
2581
|
+
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, arcTestnet, 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
|
@@ -718,9 +718,7 @@ type Token = {
|
|
|
718
718
|
type TokenPermitData = {
|
|
719
719
|
eip2612: {
|
|
720
720
|
supported: boolean;
|
|
721
|
-
|
|
722
|
-
domain?: TypedDataDomain;
|
|
723
|
-
};
|
|
721
|
+
domain?: TypedDataDomain;
|
|
724
722
|
};
|
|
725
723
|
permit2: {
|
|
726
724
|
supported: boolean;
|
|
@@ -2075,6 +2073,53 @@ declare function extendViemChain<Formatters extends ChainFormatters, const Base
|
|
|
2075
2073
|
|
|
2076
2074
|
declare const formatToken: <T extends HexString | string = string>(token: T, nativeTokenAddress?: T) => T;
|
|
2077
2075
|
|
|
2076
|
+
declare const arcTestnet: {
|
|
2077
|
+
blockExplorers: {
|
|
2078
|
+
readonly default: {
|
|
2079
|
+
readonly name: "ArcScan";
|
|
2080
|
+
readonly url: "https://testnet.arcscan.app";
|
|
2081
|
+
readonly apiUrl: "https://testnet.arcscan.app/api";
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
blockTime?: number | undefined | undefined;
|
|
2085
|
+
contracts: {
|
|
2086
|
+
readonly multicall3: {
|
|
2087
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2088
|
+
readonly blockCreated: 0;
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2091
|
+
ensTlds?: readonly string[] | undefined;
|
|
2092
|
+
id: 5042002;
|
|
2093
|
+
name: "Arc Testnet";
|
|
2094
|
+
nativeCurrency: {
|
|
2095
|
+
readonly name: "USDC";
|
|
2096
|
+
readonly symbol: "USDC";
|
|
2097
|
+
readonly decimals: 6;
|
|
2098
|
+
};
|
|
2099
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2100
|
+
rpcUrls: {
|
|
2101
|
+
readonly default: {
|
|
2102
|
+
readonly http: readonly ["https://rpc.testnet.arc.network", "https://rpc.quicknode.testnet.arc.network", "https://rpc.blockdaemon.testnet.arc.network", "https://rpc.drpc.testnet.arc.network"];
|
|
2103
|
+
readonly webSocket: readonly ["wss://rpc.testnet.arc.network", "wss://rpc.quicknode.testnet.arc.network"];
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
sourceId?: number | undefined | undefined;
|
|
2107
|
+
testnet: true;
|
|
2108
|
+
custom?: Record<string, unknown> | undefined;
|
|
2109
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2110
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2111
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2112
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2113
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2114
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2115
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2116
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2117
|
+
}] | undefined;
|
|
2118
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
|
|
2119
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2120
|
+
formatters?: undefined | undefined;
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2078
2123
|
declare const arthera: {
|
|
2079
2124
|
blockExplorers: {
|
|
2080
2125
|
readonly default: {
|
|
@@ -2533,4 +2578,4 @@ declare const robinhood: {
|
|
|
2533
2578
|
declare const customViemChains: viemChains.Chain[];
|
|
2534
2579
|
declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
2535
2580
|
|
|
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 };
|
|
2581
|
+
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, arcTestnet, 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.js
CHANGED
|
@@ -568,6 +568,7 @@ var artheraNativeToken = "0x000000000000000000000000000000000000aA09";
|
|
|
568
568
|
var suiNativeToken = "0x2::sui::SUI";
|
|
569
569
|
var aptosNativeToken = "0x1::aptos_coin::AptosCoin";
|
|
570
570
|
var stableChainNativeToken = "0x0000000000000000000000000000000000001000";
|
|
571
|
+
var arcNativeToken = "0x3600000000000000000000000000000000000000";
|
|
571
572
|
var nativeTokens = [
|
|
572
573
|
"0x0000000000000000000000000000000000001010",
|
|
573
574
|
eFormatNativeTokenLowerCase,
|
|
@@ -580,7 +581,8 @@ var nativeTokens = [
|
|
|
580
581
|
artheraNativeToken,
|
|
581
582
|
suiNativeToken,
|
|
582
583
|
aptosNativeToken,
|
|
583
|
-
stableChainNativeToken
|
|
584
|
+
stableChainNativeToken,
|
|
585
|
+
arcNativeToken
|
|
584
586
|
];
|
|
585
587
|
|
|
586
588
|
// src/service/price/types/IPriceProvider.ts
|
|
@@ -10608,6 +10610,33 @@ var abi5 = [
|
|
|
10608
10610
|
type: "event"
|
|
10609
10611
|
}
|
|
10610
10612
|
];
|
|
10613
|
+
|
|
10614
|
+
// src/utils/extendViemChain.ts
|
|
10615
|
+
function extendViemChain(base, extension) {
|
|
10616
|
+
const chain = {
|
|
10617
|
+
formatters: void 0,
|
|
10618
|
+
fees: void 0,
|
|
10619
|
+
serializers: void 0,
|
|
10620
|
+
...base,
|
|
10621
|
+
...extension
|
|
10622
|
+
};
|
|
10623
|
+
return chain;
|
|
10624
|
+
}
|
|
10625
|
+
|
|
10626
|
+
// src/chains/definitions/arcTestnet.ts
|
|
10627
|
+
var arcTestnet = extendViemChain(viemChains.arcTestnet, {
|
|
10628
|
+
nativeCurrency: {
|
|
10629
|
+
name: "USDC",
|
|
10630
|
+
symbol: "USDC",
|
|
10631
|
+
decimals: 6
|
|
10632
|
+
},
|
|
10633
|
+
rpcUrls: {
|
|
10634
|
+
default: {
|
|
10635
|
+
...viemChains.arcTestnet.rpcUrls.default,
|
|
10636
|
+
http: [...viemChains.arcTestnet.rpcUrls.default.http, "https://rpc.drpc.testnet.arc.network"]
|
|
10637
|
+
}
|
|
10638
|
+
}
|
|
10639
|
+
});
|
|
10611
10640
|
var arthera = /* @__PURE__ */ viem.defineChain({
|
|
10612
10641
|
id: 10242,
|
|
10613
10642
|
name: "Arthera",
|
|
@@ -10656,20 +10685,6 @@ var astralisTestnet = /* @__PURE__ */ viem.defineChain({
|
|
|
10656
10685
|
}
|
|
10657
10686
|
}
|
|
10658
10687
|
});
|
|
10659
|
-
|
|
10660
|
-
// src/utils/extendViemChain.ts
|
|
10661
|
-
function extendViemChain(base, extension) {
|
|
10662
|
-
const chain = {
|
|
10663
|
-
formatters: void 0,
|
|
10664
|
-
fees: void 0,
|
|
10665
|
-
serializers: void 0,
|
|
10666
|
-
...base,
|
|
10667
|
-
...extension
|
|
10668
|
-
};
|
|
10669
|
-
return chain;
|
|
10670
|
-
}
|
|
10671
|
-
|
|
10672
|
-
// src/chains/definitions/citrea.ts
|
|
10673
10688
|
var citrea = extendViemChain(viemChains.citrea, {
|
|
10674
10689
|
contracts: {
|
|
10675
10690
|
multicall3: {
|
|
@@ -10851,7 +10866,8 @@ var customViemChains = [
|
|
|
10851
10866
|
tempo,
|
|
10852
10867
|
hemi,
|
|
10853
10868
|
citrea,
|
|
10854
|
-
robinhood
|
|
10869
|
+
robinhood,
|
|
10870
|
+
arcTestnet
|
|
10855
10871
|
];
|
|
10856
10872
|
var viemChainsById = [...Object.values(viemChains__namespace), ...customViemChains].reduce((acc, chainData) => {
|
|
10857
10873
|
return chainData.id ? {
|
|
@@ -12833,7 +12849,7 @@ var checkEIP2612PermitSupport = async ({
|
|
|
12833
12849
|
};
|
|
12834
12850
|
};
|
|
12835
12851
|
var getEIP2612PermitSignature = async (params) => {
|
|
12836
|
-
var _a, _b, _c
|
|
12852
|
+
var _a, _b, _c;
|
|
12837
12853
|
try {
|
|
12838
12854
|
const {
|
|
12839
12855
|
chainId,
|
|
@@ -12850,7 +12866,7 @@ var getEIP2612PermitSignature = async (params) => {
|
|
|
12850
12866
|
} = params;
|
|
12851
12867
|
const { address } = token;
|
|
12852
12868
|
const amount = token.amount ? BigInt(token.amount) : viem.maxUint256;
|
|
12853
|
-
const domain = ((
|
|
12869
|
+
const domain = ((_b = (_a = token.permit) == null ? void 0 : _a.eip2612) == null ? void 0 : _b.domain) ?? {
|
|
12854
12870
|
name,
|
|
12855
12871
|
version,
|
|
12856
12872
|
chainId,
|
|
@@ -12885,7 +12901,7 @@ var getEIP2612PermitSignature = async (params) => {
|
|
|
12885
12901
|
};
|
|
12886
12902
|
} catch (error) {
|
|
12887
12903
|
console.log("Error generating permit signature:", error);
|
|
12888
|
-
if (((
|
|
12904
|
+
if (((_c = error == null ? void 0 : error.cause) == null ? void 0 : _c.code) === 4001 /* UserRejectedRequest */ || (error == null ? void 0 : error.code) === 4001 /* UserRejectedRequest */) {
|
|
12889
12905
|
return { status: "rejected" /* rejected */, code: 4001 /* UserRejectedRequest */ };
|
|
12890
12906
|
}
|
|
12891
12907
|
return { status: "error" /* error */, code: 500 /* Error */ };
|
|
@@ -17052,6 +17068,7 @@ exports.SignatureExpiryInSecs = SignatureExpiryInSecs;
|
|
|
17052
17068
|
exports.StatusCodes = StatusCodes;
|
|
17053
17069
|
exports.SwapInputDataDecoder = SwapInputDataDecoder;
|
|
17054
17070
|
exports.TxnStatus = TxnStatus;
|
|
17071
|
+
exports.arcTestnet = arcTestnet;
|
|
17055
17072
|
exports.arthera = arthera;
|
|
17056
17073
|
exports.astralisTestnet = astralisTestnet;
|
|
17057
17074
|
exports.checkEIP2612PermitSupport = checkEIP2612PermitSupport;
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { encodeAbiParameters, parseAbiParameters, keccak256, encodePacked, strin
|
|
|
2
2
|
import Axios from 'axios';
|
|
3
3
|
import { Signer, ethers } from 'ethers';
|
|
4
4
|
import * as viemChains from 'viem/chains';
|
|
5
|
-
import { tempo as tempo$1, hemi as hemi$1, citrea as citrea$1 } from 'viem/chains';
|
|
5
|
+
import { arcTestnet as arcTestnet$1, tempo as tempo$1, hemi as hemi$1, citrea as citrea$1 } from 'viem/chains';
|
|
6
6
|
import { decodeFunctionData, getAction } from 'viem/utils';
|
|
7
7
|
import { waitForCallsStatus, sendCalls } from 'viem/actions';
|
|
8
8
|
import Decimal from 'decimal.js';
|
|
@@ -542,6 +542,7 @@ var artheraNativeToken = "0x000000000000000000000000000000000000aA09";
|
|
|
542
542
|
var suiNativeToken = "0x2::sui::SUI";
|
|
543
543
|
var aptosNativeToken = "0x1::aptos_coin::AptosCoin";
|
|
544
544
|
var stableChainNativeToken = "0x0000000000000000000000000000000000001000";
|
|
545
|
+
var arcNativeToken = "0x3600000000000000000000000000000000000000";
|
|
545
546
|
var nativeTokens = [
|
|
546
547
|
"0x0000000000000000000000000000000000001010",
|
|
547
548
|
eFormatNativeTokenLowerCase,
|
|
@@ -554,7 +555,8 @@ var nativeTokens = [
|
|
|
554
555
|
artheraNativeToken,
|
|
555
556
|
suiNativeToken,
|
|
556
557
|
aptosNativeToken,
|
|
557
|
-
stableChainNativeToken
|
|
558
|
+
stableChainNativeToken,
|
|
559
|
+
arcNativeToken
|
|
558
560
|
];
|
|
559
561
|
|
|
560
562
|
// src/service/price/types/IPriceProvider.ts
|
|
@@ -10582,6 +10584,33 @@ var abi5 = [
|
|
|
10582
10584
|
type: "event"
|
|
10583
10585
|
}
|
|
10584
10586
|
];
|
|
10587
|
+
|
|
10588
|
+
// src/utils/extendViemChain.ts
|
|
10589
|
+
function extendViemChain(base, extension) {
|
|
10590
|
+
const chain = {
|
|
10591
|
+
formatters: void 0,
|
|
10592
|
+
fees: void 0,
|
|
10593
|
+
serializers: void 0,
|
|
10594
|
+
...base,
|
|
10595
|
+
...extension
|
|
10596
|
+
};
|
|
10597
|
+
return chain;
|
|
10598
|
+
}
|
|
10599
|
+
|
|
10600
|
+
// src/chains/definitions/arcTestnet.ts
|
|
10601
|
+
var arcTestnet = extendViemChain(arcTestnet$1, {
|
|
10602
|
+
nativeCurrency: {
|
|
10603
|
+
name: "USDC",
|
|
10604
|
+
symbol: "USDC",
|
|
10605
|
+
decimals: 6
|
|
10606
|
+
},
|
|
10607
|
+
rpcUrls: {
|
|
10608
|
+
default: {
|
|
10609
|
+
...arcTestnet$1.rpcUrls.default,
|
|
10610
|
+
http: [...arcTestnet$1.rpcUrls.default.http, "https://rpc.drpc.testnet.arc.network"]
|
|
10611
|
+
}
|
|
10612
|
+
}
|
|
10613
|
+
});
|
|
10585
10614
|
var arthera = /* @__PURE__ */ defineChain({
|
|
10586
10615
|
id: 10242,
|
|
10587
10616
|
name: "Arthera",
|
|
@@ -10630,20 +10659,6 @@ var astralisTestnet = /* @__PURE__ */ defineChain({
|
|
|
10630
10659
|
}
|
|
10631
10660
|
}
|
|
10632
10661
|
});
|
|
10633
|
-
|
|
10634
|
-
// src/utils/extendViemChain.ts
|
|
10635
|
-
function extendViemChain(base, extension) {
|
|
10636
|
-
const chain = {
|
|
10637
|
-
formatters: void 0,
|
|
10638
|
-
fees: void 0,
|
|
10639
|
-
serializers: void 0,
|
|
10640
|
-
...base,
|
|
10641
|
-
...extension
|
|
10642
|
-
};
|
|
10643
|
-
return chain;
|
|
10644
|
-
}
|
|
10645
|
-
|
|
10646
|
-
// src/chains/definitions/citrea.ts
|
|
10647
10662
|
var citrea = extendViemChain(citrea$1, {
|
|
10648
10663
|
contracts: {
|
|
10649
10664
|
multicall3: {
|
|
@@ -10825,7 +10840,8 @@ var customViemChains = [
|
|
|
10825
10840
|
tempo,
|
|
10826
10841
|
hemi,
|
|
10827
10842
|
citrea,
|
|
10828
|
-
robinhood
|
|
10843
|
+
robinhood,
|
|
10844
|
+
arcTestnet
|
|
10829
10845
|
];
|
|
10830
10846
|
var viemChainsById = [...Object.values(viemChains), ...customViemChains].reduce((acc, chainData) => {
|
|
10831
10847
|
return chainData.id ? {
|
|
@@ -12807,7 +12823,7 @@ var checkEIP2612PermitSupport = async ({
|
|
|
12807
12823
|
};
|
|
12808
12824
|
};
|
|
12809
12825
|
var getEIP2612PermitSignature = async (params) => {
|
|
12810
|
-
var _a, _b, _c
|
|
12826
|
+
var _a, _b, _c;
|
|
12811
12827
|
try {
|
|
12812
12828
|
const {
|
|
12813
12829
|
chainId,
|
|
@@ -12824,7 +12840,7 @@ var getEIP2612PermitSignature = async (params) => {
|
|
|
12824
12840
|
} = params;
|
|
12825
12841
|
const { address } = token;
|
|
12826
12842
|
const amount = token.amount ? BigInt(token.amount) : maxUint256;
|
|
12827
|
-
const domain = ((
|
|
12843
|
+
const domain = ((_b = (_a = token.permit) == null ? void 0 : _a.eip2612) == null ? void 0 : _b.domain) ?? {
|
|
12828
12844
|
name,
|
|
12829
12845
|
version,
|
|
12830
12846
|
chainId,
|
|
@@ -12859,7 +12875,7 @@ var getEIP2612PermitSignature = async (params) => {
|
|
|
12859
12875
|
};
|
|
12860
12876
|
} catch (error) {
|
|
12861
12877
|
console.log("Error generating permit signature:", error);
|
|
12862
|
-
if (((
|
|
12878
|
+
if (((_c = error == null ? void 0 : error.cause) == null ? void 0 : _c.code) === 4001 /* UserRejectedRequest */ || (error == null ? void 0 : error.code) === 4001 /* UserRejectedRequest */) {
|
|
12863
12879
|
return { status: "rejected" /* rejected */, code: 4001 /* UserRejectedRequest */ };
|
|
12864
12880
|
}
|
|
12865
12881
|
return { status: "error" /* error */, code: 500 /* Error */ };
|
|
@@ -17013,4 +17029,4 @@ var zapPathAction = {
|
|
|
17013
17029
|
harvest: "harvest"
|
|
17014
17030
|
};
|
|
17015
17031
|
|
|
17016
|
-
export { AllowanceTypes, ApprovalModes, dZapClient_default as DZapClient, DZapPermitMode, OtherAbis, PermitTypes, QuoteFilters, STATUS, Services, SignatureExpiryInSecs, StatusCodes, SwapInputDataDecoder, TxnStatus, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, classifyAddress, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, robinhood, stableChain, tempo, viemChainsById, zapPathAction, zapStepAction };
|
|
17032
|
+
export { AllowanceTypes, ApprovalModes, dZapClient_default as DZapClient, DZapPermitMode, OtherAbis, PermitTypes, QuoteFilters, STATUS, Services, SignatureExpiryInSecs, StatusCodes, SwapInputDataDecoder, TxnStatus, arcTestnet, 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.47",
|
|
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",
|