@dzapio/sdk 2.0.30 → 2.0.32
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 +428 -3
- package/dist/index.d.ts +428 -3
- package/dist/index.js +57 -2
- package/dist/index.mjs +46 -4
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
|
-
import { WalletCallReceipt as WalletCallReceipt$1, TypedDataDomain, Prettify, WalletClient, TransactionReceipt } from 'viem';
|
|
2
|
+
import { WalletCallReceipt as WalletCallReceipt$1, TypedDataDomain, Prettify, WalletClient, TransactionReceipt, ChainFormatters, Chain as Chain$1, Assign } from 'viem';
|
|
3
3
|
import { Signer } from 'ethers';
|
|
4
|
+
import * as viemChains from 'viem/chains';
|
|
5
|
+
import { Chain as Chain$2 } from 'viem/chains';
|
|
4
6
|
|
|
5
7
|
declare const STATUS: {
|
|
6
8
|
pending: string;
|
|
@@ -268,6 +270,7 @@ type ProtocolFilter = {
|
|
|
268
270
|
type TradeQuotesRequest = {
|
|
269
271
|
fromChain: number;
|
|
270
272
|
gasless?: boolean;
|
|
273
|
+
private?: boolean;
|
|
271
274
|
data: TradeQuotesRequestData[];
|
|
272
275
|
disableEstimation?: boolean;
|
|
273
276
|
account?: string;
|
|
@@ -393,6 +396,7 @@ type TradeBuildTxnRequest = {
|
|
|
393
396
|
refundee: HexString;
|
|
394
397
|
fromChain: number;
|
|
395
398
|
gasless: boolean;
|
|
399
|
+
private?: boolean;
|
|
396
400
|
disableEstimation?: boolean;
|
|
397
401
|
data: TradeBuildTxnRequestData[];
|
|
398
402
|
hasPermit2ApprovalForAllTokens?: boolean;
|
|
@@ -438,7 +442,12 @@ type BtcTxData = {
|
|
|
438
442
|
outputs: PsbtOutput[];
|
|
439
443
|
feeRate: number;
|
|
440
444
|
};
|
|
441
|
-
type
|
|
445
|
+
type BtclnTxData = {
|
|
446
|
+
paymentRequestType: 'bolt11';
|
|
447
|
+
paymentRequest: string;
|
|
448
|
+
paymentExpiry: number;
|
|
449
|
+
};
|
|
450
|
+
type TxData = EvmTxData | SvmTxData | BtcTxData | BtclnTxData;
|
|
442
451
|
type TxRequestData<T> = {
|
|
443
452
|
status: typeof STATUS.success;
|
|
444
453
|
txId: string;
|
|
@@ -464,6 +473,7 @@ type TradeBuildTxnResponse = TradeGasBuildTxnResponse & {
|
|
|
464
473
|
outputs: PsbtOutput[];
|
|
465
474
|
feeRate: number;
|
|
466
475
|
};
|
|
476
|
+
btclnTxData?: BtclnTxData;
|
|
467
477
|
additionalInfo: Record<string, Record<string, unknown>>;
|
|
468
478
|
updatedQuotes: Record<string, string>;
|
|
469
479
|
};
|
|
@@ -1954,6 +1964,421 @@ declare const checkEIP2612PermitSupport: ({ address, chainId, rpcUrls, owner, pe
|
|
|
1954
1964
|
};
|
|
1955
1965
|
}>;
|
|
1956
1966
|
|
|
1967
|
+
declare function extendViemChain<Formatters extends ChainFormatters, const Base extends Chain$1<ChainFormatters>, const Extension extends Partial<Chain$1<Formatters>>>(base: Base, extension: Extension): Prettify<Assign<Chain$1<undefined>, Assign<Base, Extension>>>;
|
|
1968
|
+
|
|
1957
1969
|
declare const formatToken: <T extends HexString | string = string>(token: T, nativeTokenAddress?: T) => T;
|
|
1958
1970
|
|
|
1959
|
-
|
|
1971
|
+
declare const arthera: {
|
|
1972
|
+
blockExplorers: {
|
|
1973
|
+
readonly default: {
|
|
1974
|
+
readonly name: "Arthera Scan";
|
|
1975
|
+
readonly url: "https://explorer.arthera.net";
|
|
1976
|
+
};
|
|
1977
|
+
};
|
|
1978
|
+
blockTime?: number | undefined | undefined;
|
|
1979
|
+
contracts: {
|
|
1980
|
+
readonly multicall3: {
|
|
1981
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
1982
|
+
readonly blockCreated: 4502791;
|
|
1983
|
+
};
|
|
1984
|
+
};
|
|
1985
|
+
ensTlds?: readonly string[] | undefined;
|
|
1986
|
+
id: 10242;
|
|
1987
|
+
name: "Arthera";
|
|
1988
|
+
nativeCurrency: {
|
|
1989
|
+
readonly decimals: 18;
|
|
1990
|
+
readonly name: "AA";
|
|
1991
|
+
readonly symbol: "AA";
|
|
1992
|
+
};
|
|
1993
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
1994
|
+
rpcUrls: {
|
|
1995
|
+
readonly default: {
|
|
1996
|
+
readonly http: readonly ["https://rpc.arthera.net"];
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
sourceId?: number | undefined | undefined;
|
|
2000
|
+
testnet?: boolean | undefined | undefined;
|
|
2001
|
+
custom?: Record<string, unknown> | undefined;
|
|
2002
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2003
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2004
|
+
formatters?: undefined;
|
|
2005
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2006
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2007
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2008
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2009
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2010
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2011
|
+
}] | undefined;
|
|
2012
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2013
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
declare const astralisTestnet: {
|
|
2017
|
+
blockExplorers: {
|
|
2018
|
+
readonly default: {
|
|
2019
|
+
readonly name: "Astralis Testnet Explorer";
|
|
2020
|
+
readonly url: "https://test-explorer.astralischain.com";
|
|
2021
|
+
};
|
|
2022
|
+
};
|
|
2023
|
+
blockTime?: number | undefined | undefined;
|
|
2024
|
+
contracts: {
|
|
2025
|
+
readonly multicall3: {
|
|
2026
|
+
readonly address: "0xd74bAE15b413e0a90A7B2C1723F4A9c15cb49f73";
|
|
2027
|
+
readonly blockCreated: 260214;
|
|
2028
|
+
};
|
|
2029
|
+
};
|
|
2030
|
+
ensTlds?: readonly string[] | undefined;
|
|
2031
|
+
id: 71261;
|
|
2032
|
+
name: "Astralis Chain";
|
|
2033
|
+
nativeCurrency: {
|
|
2034
|
+
readonly decimals: 18;
|
|
2035
|
+
readonly name: "ASTCH";
|
|
2036
|
+
readonly symbol: "ASTCH";
|
|
2037
|
+
};
|
|
2038
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2039
|
+
rpcUrls: {
|
|
2040
|
+
readonly default: {
|
|
2041
|
+
readonly http: readonly ["https://test-rpc.astralischain.com"];
|
|
2042
|
+
};
|
|
2043
|
+
};
|
|
2044
|
+
sourceId?: number | undefined | undefined;
|
|
2045
|
+
testnet?: boolean | undefined | undefined;
|
|
2046
|
+
custom?: Record<string, unknown> | undefined;
|
|
2047
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2048
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2049
|
+
formatters?: undefined;
|
|
2050
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2051
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2052
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2053
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2054
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2055
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2056
|
+
}] | undefined;
|
|
2057
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2058
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2059
|
+
};
|
|
2060
|
+
|
|
2061
|
+
declare const fiveIre: {
|
|
2062
|
+
blockExplorers: {
|
|
2063
|
+
readonly default: {
|
|
2064
|
+
readonly name: "5ire Scan";
|
|
2065
|
+
readonly url: "https://5irescan.io";
|
|
2066
|
+
};
|
|
2067
|
+
};
|
|
2068
|
+
blockTime?: number | undefined | undefined;
|
|
2069
|
+
contracts: {
|
|
2070
|
+
readonly multicall3: {
|
|
2071
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2072
|
+
readonly blockCreated: 47416;
|
|
2073
|
+
};
|
|
2074
|
+
};
|
|
2075
|
+
ensTlds?: readonly string[] | undefined;
|
|
2076
|
+
id: 995;
|
|
2077
|
+
name: "5ire";
|
|
2078
|
+
nativeCurrency: {
|
|
2079
|
+
readonly decimals: 18;
|
|
2080
|
+
readonly name: "5ire";
|
|
2081
|
+
readonly symbol: "5ire";
|
|
2082
|
+
};
|
|
2083
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2084
|
+
rpcUrls: {
|
|
2085
|
+
readonly default: {
|
|
2086
|
+
readonly http: readonly ["https://rpc.5ire.network"];
|
|
2087
|
+
};
|
|
2088
|
+
};
|
|
2089
|
+
sourceId?: number | undefined | undefined;
|
|
2090
|
+
testnet?: boolean | undefined | undefined;
|
|
2091
|
+
custom?: Record<string, unknown> | undefined;
|
|
2092
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2093
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2094
|
+
formatters?: undefined;
|
|
2095
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2096
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2097
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2098
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2099
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2100
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2101
|
+
}] | undefined;
|
|
2102
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2103
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2104
|
+
};
|
|
2105
|
+
|
|
2106
|
+
declare const hemi: {
|
|
2107
|
+
blockExplorers: {
|
|
2108
|
+
readonly default: {
|
|
2109
|
+
readonly name: "blockscout";
|
|
2110
|
+
readonly url: "https://explorer.hemi.xyz";
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2113
|
+
blockTime: 12000;
|
|
2114
|
+
contracts: {
|
|
2115
|
+
readonly multicall3: {
|
|
2116
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2117
|
+
readonly blockCreated: 4502791;
|
|
2118
|
+
};
|
|
2119
|
+
};
|
|
2120
|
+
ensTlds?: readonly string[] | undefined;
|
|
2121
|
+
id: 43111;
|
|
2122
|
+
name: "Hemi";
|
|
2123
|
+
nativeCurrency: {
|
|
2124
|
+
readonly name: "Ether";
|
|
2125
|
+
readonly symbol: "ETH";
|
|
2126
|
+
readonly decimals: 18;
|
|
2127
|
+
};
|
|
2128
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2129
|
+
rpcUrls: {
|
|
2130
|
+
readonly default: {
|
|
2131
|
+
readonly http: readonly ["https://rpc.hemi.network/rpc"];
|
|
2132
|
+
};
|
|
2133
|
+
};
|
|
2134
|
+
sourceId?: number | undefined | undefined;
|
|
2135
|
+
testnet: false;
|
|
2136
|
+
custom?: Record<string, unknown> | undefined;
|
|
2137
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2138
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2139
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2140
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2141
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2142
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2143
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2144
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2145
|
+
}] | undefined;
|
|
2146
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
|
|
2147
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2148
|
+
formatters?: undefined | undefined;
|
|
2149
|
+
readonly network: "Hemi";
|
|
2150
|
+
};
|
|
2151
|
+
|
|
2152
|
+
declare const hyperEvm: {
|
|
2153
|
+
blockExplorers: {
|
|
2154
|
+
readonly default: {
|
|
2155
|
+
readonly name: "HyperEVMScan";
|
|
2156
|
+
readonly url: "https://hyperevmscan.io/";
|
|
2157
|
+
};
|
|
2158
|
+
};
|
|
2159
|
+
blockTime?: number | undefined | undefined;
|
|
2160
|
+
contracts: {
|
|
2161
|
+
readonly multicall3: {
|
|
2162
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2163
|
+
readonly blockCreated: 13051;
|
|
2164
|
+
};
|
|
2165
|
+
};
|
|
2166
|
+
ensTlds?: readonly string[] | undefined;
|
|
2167
|
+
id: 999;
|
|
2168
|
+
name: "HyperEVM";
|
|
2169
|
+
nativeCurrency: {
|
|
2170
|
+
readonly name: "HYPE";
|
|
2171
|
+
readonly symbol: "HYPE";
|
|
2172
|
+
readonly decimals: 18;
|
|
2173
|
+
};
|
|
2174
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2175
|
+
rpcUrls: {
|
|
2176
|
+
readonly default: {
|
|
2177
|
+
readonly http: readonly ["https://rpc.hyperliquid.xyz/evm", "https://rpc.hypurrscan.io", "https://hyperliquid-json-rpc.stakely.io"];
|
|
2178
|
+
};
|
|
2179
|
+
};
|
|
2180
|
+
sourceId?: number | undefined | undefined;
|
|
2181
|
+
testnet?: boolean | undefined | undefined;
|
|
2182
|
+
custom?: Record<string, unknown> | undefined;
|
|
2183
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2184
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2185
|
+
formatters?: undefined;
|
|
2186
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2187
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2188
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2189
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2190
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2191
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2192
|
+
}] | undefined;
|
|
2193
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2194
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
declare const hyperliquid: {
|
|
2198
|
+
blockExplorers: {
|
|
2199
|
+
readonly default: {
|
|
2200
|
+
readonly name: "Hyperliquid Scan";
|
|
2201
|
+
readonly url: "https://app.hyperliquid.xyz/explorer";
|
|
2202
|
+
};
|
|
2203
|
+
};
|
|
2204
|
+
blockTime?: number | undefined | undefined;
|
|
2205
|
+
contracts: {
|
|
2206
|
+
readonly multicall3: {
|
|
2207
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2208
|
+
readonly blockCreated: 13051;
|
|
2209
|
+
};
|
|
2210
|
+
};
|
|
2211
|
+
ensTlds?: readonly string[] | undefined;
|
|
2212
|
+
id: 998;
|
|
2213
|
+
name: "Hyperliquid";
|
|
2214
|
+
nativeCurrency: {
|
|
2215
|
+
readonly name: "HYPE";
|
|
2216
|
+
readonly symbol: "HYPE";
|
|
2217
|
+
readonly decimals: 18;
|
|
2218
|
+
};
|
|
2219
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2220
|
+
rpcUrls: {
|
|
2221
|
+
readonly default: {
|
|
2222
|
+
readonly http: readonly ["https://li.quest/v1/rpc/1337"];
|
|
2223
|
+
};
|
|
2224
|
+
};
|
|
2225
|
+
sourceId?: number | undefined | undefined;
|
|
2226
|
+
testnet?: boolean | undefined | undefined;
|
|
2227
|
+
custom?: Record<string, unknown> | undefined;
|
|
2228
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2229
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2230
|
+
formatters?: undefined;
|
|
2231
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2232
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2233
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2234
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2235
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2236
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2237
|
+
}] | undefined;
|
|
2238
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2239
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2240
|
+
};
|
|
2241
|
+
|
|
2242
|
+
declare const pushTestnet: {
|
|
2243
|
+
blockExplorers: {
|
|
2244
|
+
readonly default: {
|
|
2245
|
+
readonly name: "Push Testnet Scan";
|
|
2246
|
+
readonly url: "https://donut.push.network";
|
|
2247
|
+
};
|
|
2248
|
+
};
|
|
2249
|
+
blockTime?: number | undefined | undefined;
|
|
2250
|
+
contracts: {
|
|
2251
|
+
readonly multicall3: {
|
|
2252
|
+
readonly address: "0xd74bAE15b413e0a90A7B2C1723F4A9c15cb49f73";
|
|
2253
|
+
readonly blockCreated: 209259;
|
|
2254
|
+
};
|
|
2255
|
+
};
|
|
2256
|
+
ensTlds?: readonly string[] | undefined;
|
|
2257
|
+
id: 42101;
|
|
2258
|
+
name: "Push Testnet";
|
|
2259
|
+
nativeCurrency: {
|
|
2260
|
+
readonly decimals: 18;
|
|
2261
|
+
readonly name: "PC";
|
|
2262
|
+
readonly symbol: "PC";
|
|
2263
|
+
};
|
|
2264
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2265
|
+
rpcUrls: {
|
|
2266
|
+
readonly default: {
|
|
2267
|
+
readonly http: readonly ["https://evm.rpc-testnet-donut-node1.push.org"];
|
|
2268
|
+
};
|
|
2269
|
+
};
|
|
2270
|
+
sourceId?: number | undefined | undefined;
|
|
2271
|
+
testnet?: boolean | undefined | undefined;
|
|
2272
|
+
custom?: Record<string, unknown> | undefined;
|
|
2273
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2274
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2275
|
+
formatters?: undefined;
|
|
2276
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2277
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2278
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2279
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2280
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2281
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2282
|
+
}] | undefined;
|
|
2283
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2284
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2285
|
+
};
|
|
2286
|
+
|
|
2287
|
+
declare const stableChain: {
|
|
2288
|
+
blockExplorers: {
|
|
2289
|
+
readonly default: {
|
|
2290
|
+
readonly name: "Stablescan";
|
|
2291
|
+
readonly url: "https://stablescan.xyz";
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
blockTime?: number | undefined | undefined;
|
|
2295
|
+
contracts: {
|
|
2296
|
+
readonly multicall3: {
|
|
2297
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2298
|
+
readonly blockCreated: 2423647;
|
|
2299
|
+
};
|
|
2300
|
+
};
|
|
2301
|
+
ensTlds?: readonly string[] | undefined;
|
|
2302
|
+
id: 988;
|
|
2303
|
+
name: "Stable";
|
|
2304
|
+
nativeCurrency: {
|
|
2305
|
+
readonly name: "GUSDT";
|
|
2306
|
+
readonly symbol: "gUSDT";
|
|
2307
|
+
readonly decimals: 18;
|
|
2308
|
+
};
|
|
2309
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2310
|
+
rpcUrls: {
|
|
2311
|
+
readonly default: {
|
|
2312
|
+
readonly http: readonly ["https://rpc.stable.xyz"];
|
|
2313
|
+
readonly webSocket: readonly ["wss://rpc.stable.xyz"];
|
|
2314
|
+
};
|
|
2315
|
+
};
|
|
2316
|
+
sourceId?: number | undefined | undefined;
|
|
2317
|
+
testnet?: boolean | undefined | undefined;
|
|
2318
|
+
custom?: Record<string, unknown> | undefined;
|
|
2319
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2320
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2321
|
+
formatters?: undefined;
|
|
2322
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2323
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2324
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2325
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2326
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2327
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2328
|
+
}] | undefined;
|
|
2329
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2330
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2331
|
+
};
|
|
2332
|
+
|
|
2333
|
+
declare const tempo: Chain$2;
|
|
2334
|
+
|
|
2335
|
+
declare const citrea: {
|
|
2336
|
+
blockExplorers: {
|
|
2337
|
+
readonly default: {
|
|
2338
|
+
readonly name: "Citrea Explorer";
|
|
2339
|
+
readonly url: "https://explorer.mainnet.citrea.xyz";
|
|
2340
|
+
readonly apiUrl: "https://explorer.mainnet.citrea.xyz/api";
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
blockTime?: number | undefined | undefined;
|
|
2344
|
+
contracts: {
|
|
2345
|
+
readonly multicall3: {
|
|
2346
|
+
readonly address: "0xA738e84fdE890Bc60b99AF7ccE43990E534304de";
|
|
2347
|
+
readonly blockCreated: 2450100;
|
|
2348
|
+
};
|
|
2349
|
+
};
|
|
2350
|
+
ensTlds?: readonly string[] | undefined;
|
|
2351
|
+
id: 4114;
|
|
2352
|
+
name: "Citrea Mainnet";
|
|
2353
|
+
nativeCurrency: {
|
|
2354
|
+
readonly name: "Citrea Bitcoin";
|
|
2355
|
+
readonly symbol: "cBTC";
|
|
2356
|
+
readonly decimals: 18;
|
|
2357
|
+
};
|
|
2358
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2359
|
+
rpcUrls: {
|
|
2360
|
+
readonly default: {
|
|
2361
|
+
readonly http: readonly ["https://rpc.mainnet.citrea.xyz"];
|
|
2362
|
+
};
|
|
2363
|
+
};
|
|
2364
|
+
sourceId?: number | undefined | undefined;
|
|
2365
|
+
testnet: false;
|
|
2366
|
+
custom?: Record<string, unknown> | undefined;
|
|
2367
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2368
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2369
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2370
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2371
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2372
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2373
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2374
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2375
|
+
}] | undefined;
|
|
2376
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
|
|
2377
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2378
|
+
formatters?: undefined | undefined;
|
|
2379
|
+
};
|
|
2380
|
+
|
|
2381
|
+
declare const customViemChains: viemChains.Chain[];
|
|
2382
|
+
declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
2383
|
+
|
|
2384
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
|
-
import { WalletCallReceipt as WalletCallReceipt$1, TypedDataDomain, Prettify, WalletClient, TransactionReceipt } from 'viem';
|
|
2
|
+
import { WalletCallReceipt as WalletCallReceipt$1, TypedDataDomain, Prettify, WalletClient, TransactionReceipt, ChainFormatters, Chain as Chain$1, Assign } from 'viem';
|
|
3
3
|
import { Signer } from 'ethers';
|
|
4
|
+
import * as viemChains from 'viem/chains';
|
|
5
|
+
import { Chain as Chain$2 } from 'viem/chains';
|
|
4
6
|
|
|
5
7
|
declare const STATUS: {
|
|
6
8
|
pending: string;
|
|
@@ -268,6 +270,7 @@ type ProtocolFilter = {
|
|
|
268
270
|
type TradeQuotesRequest = {
|
|
269
271
|
fromChain: number;
|
|
270
272
|
gasless?: boolean;
|
|
273
|
+
private?: boolean;
|
|
271
274
|
data: TradeQuotesRequestData[];
|
|
272
275
|
disableEstimation?: boolean;
|
|
273
276
|
account?: string;
|
|
@@ -393,6 +396,7 @@ type TradeBuildTxnRequest = {
|
|
|
393
396
|
refundee: HexString;
|
|
394
397
|
fromChain: number;
|
|
395
398
|
gasless: boolean;
|
|
399
|
+
private?: boolean;
|
|
396
400
|
disableEstimation?: boolean;
|
|
397
401
|
data: TradeBuildTxnRequestData[];
|
|
398
402
|
hasPermit2ApprovalForAllTokens?: boolean;
|
|
@@ -438,7 +442,12 @@ type BtcTxData = {
|
|
|
438
442
|
outputs: PsbtOutput[];
|
|
439
443
|
feeRate: number;
|
|
440
444
|
};
|
|
441
|
-
type
|
|
445
|
+
type BtclnTxData = {
|
|
446
|
+
paymentRequestType: 'bolt11';
|
|
447
|
+
paymentRequest: string;
|
|
448
|
+
paymentExpiry: number;
|
|
449
|
+
};
|
|
450
|
+
type TxData = EvmTxData | SvmTxData | BtcTxData | BtclnTxData;
|
|
442
451
|
type TxRequestData<T> = {
|
|
443
452
|
status: typeof STATUS.success;
|
|
444
453
|
txId: string;
|
|
@@ -464,6 +473,7 @@ type TradeBuildTxnResponse = TradeGasBuildTxnResponse & {
|
|
|
464
473
|
outputs: PsbtOutput[];
|
|
465
474
|
feeRate: number;
|
|
466
475
|
};
|
|
476
|
+
btclnTxData?: BtclnTxData;
|
|
467
477
|
additionalInfo: Record<string, Record<string, unknown>>;
|
|
468
478
|
updatedQuotes: Record<string, string>;
|
|
469
479
|
};
|
|
@@ -1954,6 +1964,421 @@ declare const checkEIP2612PermitSupport: ({ address, chainId, rpcUrls, owner, pe
|
|
|
1954
1964
|
};
|
|
1955
1965
|
}>;
|
|
1956
1966
|
|
|
1967
|
+
declare function extendViemChain<Formatters extends ChainFormatters, const Base extends Chain$1<ChainFormatters>, const Extension extends Partial<Chain$1<Formatters>>>(base: Base, extension: Extension): Prettify<Assign<Chain$1<undefined>, Assign<Base, Extension>>>;
|
|
1968
|
+
|
|
1957
1969
|
declare const formatToken: <T extends HexString | string = string>(token: T, nativeTokenAddress?: T) => T;
|
|
1958
1970
|
|
|
1959
|
-
|
|
1971
|
+
declare const arthera: {
|
|
1972
|
+
blockExplorers: {
|
|
1973
|
+
readonly default: {
|
|
1974
|
+
readonly name: "Arthera Scan";
|
|
1975
|
+
readonly url: "https://explorer.arthera.net";
|
|
1976
|
+
};
|
|
1977
|
+
};
|
|
1978
|
+
blockTime?: number | undefined | undefined;
|
|
1979
|
+
contracts: {
|
|
1980
|
+
readonly multicall3: {
|
|
1981
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
1982
|
+
readonly blockCreated: 4502791;
|
|
1983
|
+
};
|
|
1984
|
+
};
|
|
1985
|
+
ensTlds?: readonly string[] | undefined;
|
|
1986
|
+
id: 10242;
|
|
1987
|
+
name: "Arthera";
|
|
1988
|
+
nativeCurrency: {
|
|
1989
|
+
readonly decimals: 18;
|
|
1990
|
+
readonly name: "AA";
|
|
1991
|
+
readonly symbol: "AA";
|
|
1992
|
+
};
|
|
1993
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
1994
|
+
rpcUrls: {
|
|
1995
|
+
readonly default: {
|
|
1996
|
+
readonly http: readonly ["https://rpc.arthera.net"];
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
sourceId?: number | undefined | undefined;
|
|
2000
|
+
testnet?: boolean | undefined | undefined;
|
|
2001
|
+
custom?: Record<string, unknown> | undefined;
|
|
2002
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2003
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2004
|
+
formatters?: undefined;
|
|
2005
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2006
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2007
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2008
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2009
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2010
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2011
|
+
}] | undefined;
|
|
2012
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2013
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
declare const astralisTestnet: {
|
|
2017
|
+
blockExplorers: {
|
|
2018
|
+
readonly default: {
|
|
2019
|
+
readonly name: "Astralis Testnet Explorer";
|
|
2020
|
+
readonly url: "https://test-explorer.astralischain.com";
|
|
2021
|
+
};
|
|
2022
|
+
};
|
|
2023
|
+
blockTime?: number | undefined | undefined;
|
|
2024
|
+
contracts: {
|
|
2025
|
+
readonly multicall3: {
|
|
2026
|
+
readonly address: "0xd74bAE15b413e0a90A7B2C1723F4A9c15cb49f73";
|
|
2027
|
+
readonly blockCreated: 260214;
|
|
2028
|
+
};
|
|
2029
|
+
};
|
|
2030
|
+
ensTlds?: readonly string[] | undefined;
|
|
2031
|
+
id: 71261;
|
|
2032
|
+
name: "Astralis Chain";
|
|
2033
|
+
nativeCurrency: {
|
|
2034
|
+
readonly decimals: 18;
|
|
2035
|
+
readonly name: "ASTCH";
|
|
2036
|
+
readonly symbol: "ASTCH";
|
|
2037
|
+
};
|
|
2038
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2039
|
+
rpcUrls: {
|
|
2040
|
+
readonly default: {
|
|
2041
|
+
readonly http: readonly ["https://test-rpc.astralischain.com"];
|
|
2042
|
+
};
|
|
2043
|
+
};
|
|
2044
|
+
sourceId?: number | undefined | undefined;
|
|
2045
|
+
testnet?: boolean | undefined | undefined;
|
|
2046
|
+
custom?: Record<string, unknown> | undefined;
|
|
2047
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2048
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2049
|
+
formatters?: undefined;
|
|
2050
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2051
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2052
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2053
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2054
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2055
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2056
|
+
}] | undefined;
|
|
2057
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2058
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2059
|
+
};
|
|
2060
|
+
|
|
2061
|
+
declare const fiveIre: {
|
|
2062
|
+
blockExplorers: {
|
|
2063
|
+
readonly default: {
|
|
2064
|
+
readonly name: "5ire Scan";
|
|
2065
|
+
readonly url: "https://5irescan.io";
|
|
2066
|
+
};
|
|
2067
|
+
};
|
|
2068
|
+
blockTime?: number | undefined | undefined;
|
|
2069
|
+
contracts: {
|
|
2070
|
+
readonly multicall3: {
|
|
2071
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2072
|
+
readonly blockCreated: 47416;
|
|
2073
|
+
};
|
|
2074
|
+
};
|
|
2075
|
+
ensTlds?: readonly string[] | undefined;
|
|
2076
|
+
id: 995;
|
|
2077
|
+
name: "5ire";
|
|
2078
|
+
nativeCurrency: {
|
|
2079
|
+
readonly decimals: 18;
|
|
2080
|
+
readonly name: "5ire";
|
|
2081
|
+
readonly symbol: "5ire";
|
|
2082
|
+
};
|
|
2083
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2084
|
+
rpcUrls: {
|
|
2085
|
+
readonly default: {
|
|
2086
|
+
readonly http: readonly ["https://rpc.5ire.network"];
|
|
2087
|
+
};
|
|
2088
|
+
};
|
|
2089
|
+
sourceId?: number | undefined | undefined;
|
|
2090
|
+
testnet?: boolean | undefined | undefined;
|
|
2091
|
+
custom?: Record<string, unknown> | undefined;
|
|
2092
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2093
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2094
|
+
formatters?: undefined;
|
|
2095
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2096
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2097
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2098
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2099
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2100
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2101
|
+
}] | undefined;
|
|
2102
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2103
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2104
|
+
};
|
|
2105
|
+
|
|
2106
|
+
declare const hemi: {
|
|
2107
|
+
blockExplorers: {
|
|
2108
|
+
readonly default: {
|
|
2109
|
+
readonly name: "blockscout";
|
|
2110
|
+
readonly url: "https://explorer.hemi.xyz";
|
|
2111
|
+
};
|
|
2112
|
+
};
|
|
2113
|
+
blockTime: 12000;
|
|
2114
|
+
contracts: {
|
|
2115
|
+
readonly multicall3: {
|
|
2116
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2117
|
+
readonly blockCreated: 4502791;
|
|
2118
|
+
};
|
|
2119
|
+
};
|
|
2120
|
+
ensTlds?: readonly string[] | undefined;
|
|
2121
|
+
id: 43111;
|
|
2122
|
+
name: "Hemi";
|
|
2123
|
+
nativeCurrency: {
|
|
2124
|
+
readonly name: "Ether";
|
|
2125
|
+
readonly symbol: "ETH";
|
|
2126
|
+
readonly decimals: 18;
|
|
2127
|
+
};
|
|
2128
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2129
|
+
rpcUrls: {
|
|
2130
|
+
readonly default: {
|
|
2131
|
+
readonly http: readonly ["https://rpc.hemi.network/rpc"];
|
|
2132
|
+
};
|
|
2133
|
+
};
|
|
2134
|
+
sourceId?: number | undefined | undefined;
|
|
2135
|
+
testnet: false;
|
|
2136
|
+
custom?: Record<string, unknown> | undefined;
|
|
2137
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2138
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2139
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2140
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2141
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2142
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2143
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2144
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2145
|
+
}] | undefined;
|
|
2146
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
|
|
2147
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2148
|
+
formatters?: undefined | undefined;
|
|
2149
|
+
readonly network: "Hemi";
|
|
2150
|
+
};
|
|
2151
|
+
|
|
2152
|
+
declare const hyperEvm: {
|
|
2153
|
+
blockExplorers: {
|
|
2154
|
+
readonly default: {
|
|
2155
|
+
readonly name: "HyperEVMScan";
|
|
2156
|
+
readonly url: "https://hyperevmscan.io/";
|
|
2157
|
+
};
|
|
2158
|
+
};
|
|
2159
|
+
blockTime?: number | undefined | undefined;
|
|
2160
|
+
contracts: {
|
|
2161
|
+
readonly multicall3: {
|
|
2162
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2163
|
+
readonly blockCreated: 13051;
|
|
2164
|
+
};
|
|
2165
|
+
};
|
|
2166
|
+
ensTlds?: readonly string[] | undefined;
|
|
2167
|
+
id: 999;
|
|
2168
|
+
name: "HyperEVM";
|
|
2169
|
+
nativeCurrency: {
|
|
2170
|
+
readonly name: "HYPE";
|
|
2171
|
+
readonly symbol: "HYPE";
|
|
2172
|
+
readonly decimals: 18;
|
|
2173
|
+
};
|
|
2174
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2175
|
+
rpcUrls: {
|
|
2176
|
+
readonly default: {
|
|
2177
|
+
readonly http: readonly ["https://rpc.hyperliquid.xyz/evm", "https://rpc.hypurrscan.io", "https://hyperliquid-json-rpc.stakely.io"];
|
|
2178
|
+
};
|
|
2179
|
+
};
|
|
2180
|
+
sourceId?: number | undefined | undefined;
|
|
2181
|
+
testnet?: boolean | undefined | undefined;
|
|
2182
|
+
custom?: Record<string, unknown> | undefined;
|
|
2183
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2184
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2185
|
+
formatters?: undefined;
|
|
2186
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2187
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2188
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2189
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2190
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2191
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2192
|
+
}] | undefined;
|
|
2193
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2194
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
declare const hyperliquid: {
|
|
2198
|
+
blockExplorers: {
|
|
2199
|
+
readonly default: {
|
|
2200
|
+
readonly name: "Hyperliquid Scan";
|
|
2201
|
+
readonly url: "https://app.hyperliquid.xyz/explorer";
|
|
2202
|
+
};
|
|
2203
|
+
};
|
|
2204
|
+
blockTime?: number | undefined | undefined;
|
|
2205
|
+
contracts: {
|
|
2206
|
+
readonly multicall3: {
|
|
2207
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2208
|
+
readonly blockCreated: 13051;
|
|
2209
|
+
};
|
|
2210
|
+
};
|
|
2211
|
+
ensTlds?: readonly string[] | undefined;
|
|
2212
|
+
id: 998;
|
|
2213
|
+
name: "Hyperliquid";
|
|
2214
|
+
nativeCurrency: {
|
|
2215
|
+
readonly name: "HYPE";
|
|
2216
|
+
readonly symbol: "HYPE";
|
|
2217
|
+
readonly decimals: 18;
|
|
2218
|
+
};
|
|
2219
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2220
|
+
rpcUrls: {
|
|
2221
|
+
readonly default: {
|
|
2222
|
+
readonly http: readonly ["https://li.quest/v1/rpc/1337"];
|
|
2223
|
+
};
|
|
2224
|
+
};
|
|
2225
|
+
sourceId?: number | undefined | undefined;
|
|
2226
|
+
testnet?: boolean | undefined | undefined;
|
|
2227
|
+
custom?: Record<string, unknown> | undefined;
|
|
2228
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2229
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2230
|
+
formatters?: undefined;
|
|
2231
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2232
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2233
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2234
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2235
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2236
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2237
|
+
}] | undefined;
|
|
2238
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2239
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2240
|
+
};
|
|
2241
|
+
|
|
2242
|
+
declare const pushTestnet: {
|
|
2243
|
+
blockExplorers: {
|
|
2244
|
+
readonly default: {
|
|
2245
|
+
readonly name: "Push Testnet Scan";
|
|
2246
|
+
readonly url: "https://donut.push.network";
|
|
2247
|
+
};
|
|
2248
|
+
};
|
|
2249
|
+
blockTime?: number | undefined | undefined;
|
|
2250
|
+
contracts: {
|
|
2251
|
+
readonly multicall3: {
|
|
2252
|
+
readonly address: "0xd74bAE15b413e0a90A7B2C1723F4A9c15cb49f73";
|
|
2253
|
+
readonly blockCreated: 209259;
|
|
2254
|
+
};
|
|
2255
|
+
};
|
|
2256
|
+
ensTlds?: readonly string[] | undefined;
|
|
2257
|
+
id: 42101;
|
|
2258
|
+
name: "Push Testnet";
|
|
2259
|
+
nativeCurrency: {
|
|
2260
|
+
readonly decimals: 18;
|
|
2261
|
+
readonly name: "PC";
|
|
2262
|
+
readonly symbol: "PC";
|
|
2263
|
+
};
|
|
2264
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2265
|
+
rpcUrls: {
|
|
2266
|
+
readonly default: {
|
|
2267
|
+
readonly http: readonly ["https://evm.rpc-testnet-donut-node1.push.org"];
|
|
2268
|
+
};
|
|
2269
|
+
};
|
|
2270
|
+
sourceId?: number | undefined | undefined;
|
|
2271
|
+
testnet?: boolean | undefined | undefined;
|
|
2272
|
+
custom?: Record<string, unknown> | undefined;
|
|
2273
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2274
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2275
|
+
formatters?: undefined;
|
|
2276
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2277
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2278
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2279
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2280
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2281
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2282
|
+
}] | undefined;
|
|
2283
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2284
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2285
|
+
};
|
|
2286
|
+
|
|
2287
|
+
declare const stableChain: {
|
|
2288
|
+
blockExplorers: {
|
|
2289
|
+
readonly default: {
|
|
2290
|
+
readonly name: "Stablescan";
|
|
2291
|
+
readonly url: "https://stablescan.xyz";
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
blockTime?: number | undefined | undefined;
|
|
2295
|
+
contracts: {
|
|
2296
|
+
readonly multicall3: {
|
|
2297
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
2298
|
+
readonly blockCreated: 2423647;
|
|
2299
|
+
};
|
|
2300
|
+
};
|
|
2301
|
+
ensTlds?: readonly string[] | undefined;
|
|
2302
|
+
id: 988;
|
|
2303
|
+
name: "Stable";
|
|
2304
|
+
nativeCurrency: {
|
|
2305
|
+
readonly name: "GUSDT";
|
|
2306
|
+
readonly symbol: "gUSDT";
|
|
2307
|
+
readonly decimals: 18;
|
|
2308
|
+
};
|
|
2309
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2310
|
+
rpcUrls: {
|
|
2311
|
+
readonly default: {
|
|
2312
|
+
readonly http: readonly ["https://rpc.stable.xyz"];
|
|
2313
|
+
readonly webSocket: readonly ["wss://rpc.stable.xyz"];
|
|
2314
|
+
};
|
|
2315
|
+
};
|
|
2316
|
+
sourceId?: number | undefined | undefined;
|
|
2317
|
+
testnet?: boolean | undefined | undefined;
|
|
2318
|
+
custom?: Record<string, unknown> | undefined;
|
|
2319
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2320
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2321
|
+
formatters?: undefined;
|
|
2322
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2323
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2324
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2325
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2326
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2327
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2328
|
+
}] | undefined;
|
|
2329
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
|
|
2330
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2331
|
+
};
|
|
2332
|
+
|
|
2333
|
+
declare const tempo: Chain$2;
|
|
2334
|
+
|
|
2335
|
+
declare const citrea: {
|
|
2336
|
+
blockExplorers: {
|
|
2337
|
+
readonly default: {
|
|
2338
|
+
readonly name: "Citrea Explorer";
|
|
2339
|
+
readonly url: "https://explorer.mainnet.citrea.xyz";
|
|
2340
|
+
readonly apiUrl: "https://explorer.mainnet.citrea.xyz/api";
|
|
2341
|
+
};
|
|
2342
|
+
};
|
|
2343
|
+
blockTime?: number | undefined | undefined;
|
|
2344
|
+
contracts: {
|
|
2345
|
+
readonly multicall3: {
|
|
2346
|
+
readonly address: "0xA738e84fdE890Bc60b99AF7ccE43990E534304de";
|
|
2347
|
+
readonly blockCreated: 2450100;
|
|
2348
|
+
};
|
|
2349
|
+
};
|
|
2350
|
+
ensTlds?: readonly string[] | undefined;
|
|
2351
|
+
id: 4114;
|
|
2352
|
+
name: "Citrea Mainnet";
|
|
2353
|
+
nativeCurrency: {
|
|
2354
|
+
readonly name: "Citrea Bitcoin";
|
|
2355
|
+
readonly symbol: "cBTC";
|
|
2356
|
+
readonly decimals: 18;
|
|
2357
|
+
};
|
|
2358
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
2359
|
+
rpcUrls: {
|
|
2360
|
+
readonly default: {
|
|
2361
|
+
readonly http: readonly ["https://rpc.mainnet.citrea.xyz"];
|
|
2362
|
+
};
|
|
2363
|
+
};
|
|
2364
|
+
sourceId?: number | undefined | undefined;
|
|
2365
|
+
testnet: false;
|
|
2366
|
+
custom?: Record<string, unknown> | undefined;
|
|
2367
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
2368
|
+
fees?: viem.ChainFees<undefined> | undefined;
|
|
2369
|
+
prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2370
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2371
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
|
|
2372
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
2373
|
+
}) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
|
|
2374
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
2375
|
+
}] | undefined;
|
|
2376
|
+
serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable<bigint, number>> | undefined;
|
|
2377
|
+
verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
|
|
2378
|
+
formatters?: undefined | undefined;
|
|
2379
|
+
};
|
|
2380
|
+
|
|
2381
|
+
declare const customViemChains: viemChains.Chain[];
|
|
2382
|
+
declare const viemChainsById: Record<number, viemChains.Chain>;
|
|
2383
|
+
|
|
2384
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -10680,6 +10680,28 @@ var fiveIre = /* @__PURE__ */ viem.defineChain({
|
|
|
10680
10680
|
}
|
|
10681
10681
|
}
|
|
10682
10682
|
});
|
|
10683
|
+
|
|
10684
|
+
// src/utils/extendViemChain.ts
|
|
10685
|
+
function extendViemChain(base, extension) {
|
|
10686
|
+
const chain = {
|
|
10687
|
+
formatters: void 0,
|
|
10688
|
+
fees: void 0,
|
|
10689
|
+
serializers: void 0,
|
|
10690
|
+
...base,
|
|
10691
|
+
...extension
|
|
10692
|
+
};
|
|
10693
|
+
return chain;
|
|
10694
|
+
}
|
|
10695
|
+
|
|
10696
|
+
// src/chains/definitions/hemi.ts
|
|
10697
|
+
var hemi = extendViemChain(viemChains.hemi, {
|
|
10698
|
+
contracts: {
|
|
10699
|
+
multicall3: {
|
|
10700
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
10701
|
+
blockCreated: 4502791
|
|
10702
|
+
}
|
|
10703
|
+
}
|
|
10704
|
+
});
|
|
10683
10705
|
var hyperEvm = /* @__PURE__ */ viem.defineChain({
|
|
10684
10706
|
id: 999,
|
|
10685
10707
|
name: "HyperEVM",
|
|
@@ -10784,9 +10806,28 @@ var tempo = viemChains.tempo.extend({
|
|
|
10784
10806
|
}
|
|
10785
10807
|
}
|
|
10786
10808
|
});
|
|
10809
|
+
var citrea = extendViemChain(viemChains.citrea, {
|
|
10810
|
+
contracts: {
|
|
10811
|
+
multicall3: {
|
|
10812
|
+
address: "0xA738e84fdE890Bc60b99AF7ccE43990E534304de",
|
|
10813
|
+
blockCreated: 2450100
|
|
10814
|
+
}
|
|
10815
|
+
}
|
|
10816
|
+
});
|
|
10787
10817
|
|
|
10788
10818
|
// src/chains/index.ts
|
|
10789
|
-
var customViemChains = [
|
|
10819
|
+
var customViemChains = [
|
|
10820
|
+
fiveIre,
|
|
10821
|
+
arthera,
|
|
10822
|
+
hyperEvm,
|
|
10823
|
+
hyperliquid,
|
|
10824
|
+
stableChain,
|
|
10825
|
+
pushTestnet,
|
|
10826
|
+
astralisTestnet,
|
|
10827
|
+
tempo,
|
|
10828
|
+
hemi,
|
|
10829
|
+
citrea
|
|
10830
|
+
];
|
|
10790
10831
|
var viemChainsById = [...Object.values(viemChains__namespace), ...customViemChains].reduce((acc, chainData) => {
|
|
10791
10832
|
return chainData.id ? {
|
|
10792
10833
|
...acc,
|
|
@@ -12846,7 +12887,8 @@ var exclusiveChainIds = {
|
|
|
12846
12887
|
hyperLiquid: 998,
|
|
12847
12888
|
citrea: 4114,
|
|
12848
12889
|
pushTestnet: 42101,
|
|
12849
|
-
astralisTestnet: 71261
|
|
12890
|
+
astralisTestnet: 71261,
|
|
12891
|
+
btcln: 1002
|
|
12850
12892
|
};
|
|
12851
12893
|
|
|
12852
12894
|
// src/constants/contract.ts
|
|
@@ -16396,10 +16438,23 @@ exports.SignatureExpiryInSecs = SignatureExpiryInSecs;
|
|
|
16396
16438
|
exports.StatusCodes = StatusCodes;
|
|
16397
16439
|
exports.SwapInputDataDecoder = SwapInputDataDecoder;
|
|
16398
16440
|
exports.TxnStatus = TxnStatus;
|
|
16441
|
+
exports.arthera = arthera;
|
|
16442
|
+
exports.astralisTestnet = astralisTestnet;
|
|
16399
16443
|
exports.checkEIP2612PermitSupport = checkEIP2612PermitSupport;
|
|
16444
|
+
exports.citrea = citrea;
|
|
16400
16445
|
exports.contractErrorActions = contractErrorActions;
|
|
16446
|
+
exports.customViemChains = customViemChains;
|
|
16401
16447
|
exports.erc20Functions = erc20Functions;
|
|
16448
|
+
exports.extendViemChain = extendViemChain;
|
|
16449
|
+
exports.fiveIre = fiveIre;
|
|
16402
16450
|
exports.formatToken = formatToken;
|
|
16403
16451
|
exports.getTokensPairKey = getTokensPairKey;
|
|
16452
|
+
exports.hemi = hemi;
|
|
16453
|
+
exports.hyperEvm = hyperEvm;
|
|
16454
|
+
exports.hyperliquid = hyperliquid;
|
|
16455
|
+
exports.pushTestnet = pushTestnet;
|
|
16456
|
+
exports.stableChain = stableChain;
|
|
16457
|
+
exports.tempo = tempo;
|
|
16458
|
+
exports.viemChainsById = viemChainsById;
|
|
16404
16459
|
exports.zapPathAction = zapPathAction;
|
|
16405
16460
|
exports.zapStepAction = zapStepAction;
|
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 } from 'viem/chains';
|
|
5
|
+
import { 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';
|
|
@@ -10655,6 +10655,28 @@ var fiveIre = /* @__PURE__ */ defineChain({
|
|
|
10655
10655
|
}
|
|
10656
10656
|
}
|
|
10657
10657
|
});
|
|
10658
|
+
|
|
10659
|
+
// src/utils/extendViemChain.ts
|
|
10660
|
+
function extendViemChain(base, extension) {
|
|
10661
|
+
const chain = {
|
|
10662
|
+
formatters: void 0,
|
|
10663
|
+
fees: void 0,
|
|
10664
|
+
serializers: void 0,
|
|
10665
|
+
...base,
|
|
10666
|
+
...extension
|
|
10667
|
+
};
|
|
10668
|
+
return chain;
|
|
10669
|
+
}
|
|
10670
|
+
|
|
10671
|
+
// src/chains/definitions/hemi.ts
|
|
10672
|
+
var hemi = extendViemChain(hemi$1, {
|
|
10673
|
+
contracts: {
|
|
10674
|
+
multicall3: {
|
|
10675
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
10676
|
+
blockCreated: 4502791
|
|
10677
|
+
}
|
|
10678
|
+
}
|
|
10679
|
+
});
|
|
10658
10680
|
var hyperEvm = /* @__PURE__ */ defineChain({
|
|
10659
10681
|
id: 999,
|
|
10660
10682
|
name: "HyperEVM",
|
|
@@ -10759,9 +10781,28 @@ var tempo = tempo$1.extend({
|
|
|
10759
10781
|
}
|
|
10760
10782
|
}
|
|
10761
10783
|
});
|
|
10784
|
+
var citrea = extendViemChain(citrea$1, {
|
|
10785
|
+
contracts: {
|
|
10786
|
+
multicall3: {
|
|
10787
|
+
address: "0xA738e84fdE890Bc60b99AF7ccE43990E534304de",
|
|
10788
|
+
blockCreated: 2450100
|
|
10789
|
+
}
|
|
10790
|
+
}
|
|
10791
|
+
});
|
|
10762
10792
|
|
|
10763
10793
|
// src/chains/index.ts
|
|
10764
|
-
var customViemChains = [
|
|
10794
|
+
var customViemChains = [
|
|
10795
|
+
fiveIre,
|
|
10796
|
+
arthera,
|
|
10797
|
+
hyperEvm,
|
|
10798
|
+
hyperliquid,
|
|
10799
|
+
stableChain,
|
|
10800
|
+
pushTestnet,
|
|
10801
|
+
astralisTestnet,
|
|
10802
|
+
tempo,
|
|
10803
|
+
hemi,
|
|
10804
|
+
citrea
|
|
10805
|
+
];
|
|
10765
10806
|
var viemChainsById = [...Object.values(viemChains), ...customViemChains].reduce((acc, chainData) => {
|
|
10766
10807
|
return chainData.id ? {
|
|
10767
10808
|
...acc,
|
|
@@ -12821,7 +12862,8 @@ var exclusiveChainIds = {
|
|
|
12821
12862
|
hyperLiquid: 998,
|
|
12822
12863
|
citrea: 4114,
|
|
12823
12864
|
pushTestnet: 42101,
|
|
12824
|
-
astralisTestnet: 71261
|
|
12865
|
+
astralisTestnet: 71261,
|
|
12866
|
+
btcln: 1002
|
|
12825
12867
|
};
|
|
12826
12868
|
|
|
12827
12869
|
// src/constants/contract.ts
|
|
@@ -16358,4 +16400,4 @@ var zapPathAction = {
|
|
|
16358
16400
|
harvest: "harvest"
|
|
16359
16401
|
};
|
|
16360
16402
|
|
|
16361
|
-
export { AllowanceTypes, ApprovalModes, dZapClient_default as DZapClient, DZapPermitMode, OtherAbis, PermitTypes, QuoteFilters, STATUS, Services, SignatureExpiryInSecs, StatusCodes, SwapInputDataDecoder, TxnStatus, checkEIP2612PermitSupport, contractErrorActions, erc20Functions, formatToken, getTokensPairKey, zapPathAction, zapStepAction };
|
|
16403
|
+
export { AllowanceTypes, ApprovalModes, dZapClient_default as DZapClient, DZapPermitMode, OtherAbis, PermitTypes, QuoteFilters, STATUS, Services, SignatureExpiryInSecs, StatusCodes, SwapInputDataDecoder, TxnStatus, arthera, astralisTestnet, checkEIP2612PermitSupport, citrea, contractErrorActions, customViemChains, erc20Functions, extendViemChain, fiveIre, formatToken, getTokensPairKey, hemi, hyperEvm, hyperliquid, pushTestnet, 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.32",
|
|
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",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"decimal.js": "^10.4.3",
|
|
109
109
|
"node-cache": "^5.1.2",
|
|
110
110
|
"ethers": "5.7.2",
|
|
111
|
-
"viem": "2.
|
|
111
|
+
"viem": "2.48.4"
|
|
112
112
|
},
|
|
113
113
|
"repository": {
|
|
114
114
|
"type": "git",
|