@qntx/wallet-engine 0.13.0 → 0.14.0
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/README.md +1057 -20
- package/dist/apps-fiat24.d.mts +202 -0
- package/dist/apps-fiat24.mjs +1378 -0
- package/dist/apps-fiat24.mjs.map +1 -0
- package/dist/apps-hyperliquid.d.mts +549 -0
- package/dist/apps-hyperliquid.mjs +2742 -0
- package/dist/apps-hyperliquid.mjs.map +1 -0
- package/dist/apps-polymarket.d.mts +729 -0
- package/dist/apps-polymarket.mjs +3786 -0
- package/dist/apps-polymarket.mjs.map +1 -0
- package/dist/apps.d.mts +136 -0
- package/dist/apps.mjs +535 -0
- package/dist/apps.mjs.map +1 -0
- package/dist/connect-BY1C5ZRI.mjs +210 -0
- package/dist/connect-BY1C5ZRI.mjs.map +1 -0
- package/dist/connect.d.mts +17 -9
- package/dist/connect.mjs +3 -185
- package/dist/{errors-CQnlTc1i.d.mts → controller-DpNVHVsj.d.mts} +1093 -758
- package/dist/controller-rMnaxKAH.mjs +46 -0
- package/dist/controller-rMnaxKAH.mjs.map +1 -0
- package/dist/decimal-COJ4g8qy.mjs +38 -0
- package/dist/decimal-COJ4g8qy.mjs.map +1 -0
- package/dist/eligibility-BfM9ybYZ.mjs +48 -0
- package/dist/eligibility-BfM9ybYZ.mjs.map +1 -0
- package/dist/engine-Dic_kkEr.d.mts +1829 -0
- package/dist/errors-B8W-hoYW.d.mts +7 -0
- package/dist/errors-horUy5k1.mjs +24 -0
- package/dist/errors-horUy5k1.mjs.map +1 -0
- package/dist/gateway-contract.d.mts +3 -608
- package/dist/gateway-contract.mjs +1467 -161
- package/dist/gateway-contract.mjs.map +1 -1
- package/dist/idb.d.mts +5 -0
- package/dist/idb.mjs +122 -46
- package/dist/idb.mjs.map +1 -1
- package/dist/index-vBgfOFIh.d.mts +2227 -0
- package/dist/index.d.mts +58 -618
- package/dist/index.mjs +21963 -6836
- package/dist/index.mjs.map +1 -1
- package/dist/json-BDwV38cj.mjs +15 -0
- package/dist/json-BDwV38cj.mjs.map +1 -0
- package/dist/link-Ceq8Dggp.mjs +139 -0
- package/dist/link-Ceq8Dggp.mjs.map +1 -0
- package/dist/primitives-DbSHLZKq.mjs +31 -0
- package/dist/primitives-DbSHLZKq.mjs.map +1 -0
- package/dist/push-message-AQuzoNFY.d.mts +84 -0
- package/dist/push-message-kbnH1A5w.mjs +142 -0
- package/dist/push-message-kbnH1A5w.mjs.map +1 -0
- package/dist/push.d.mts +13 -0
- package/dist/push.mjs +70 -0
- package/dist/push.mjs.map +1 -0
- package/dist/qr.d.mts +292 -0
- package/dist/qr.mjs +1725 -0
- package/dist/qr.mjs.map +1 -0
- package/dist/registry-CbtwcxkX.mjs +374 -0
- package/dist/registry-CbtwcxkX.mjs.map +1 -0
- package/dist/risk-DyABgg4W.mjs +757 -0
- package/dist/risk-DyABgg4W.mjs.map +1 -0
- package/dist/session-CNJFLarP.mjs +18 -0
- package/dist/session-CNJFLarP.mjs.map +1 -0
- package/dist/socket-ChG9JRT_.mjs +110 -0
- package/dist/socket-ChG9JRT_.mjs.map +1 -0
- package/dist/spi-BrTw5s98.d.mts +3 -0
- package/dist/timer-Cdk5rGM2.mjs +43 -0
- package/dist/timer-Cdk5rGM2.mjs.map +1 -0
- package/dist/types-BpvioFGo.d.mts +258 -0
- package/dist/types-DbftVZ3I.mjs +90 -0
- package/dist/types-DbftVZ3I.mjs.map +1 -0
- package/dist/walletconnect.d.mts +86 -0
- package/dist/walletconnect.mjs +1507 -0
- package/dist/walletconnect.mjs.map +1 -0
- package/dist/webln-BgrtPXpG.mjs +2593 -0
- package/dist/webln-BgrtPXpG.mjs.map +1 -0
- package/dist/webln-Bllk_xJ2.d.mts +666 -0
- package/package.json +92 -19
- package/dist/connect.mjs.map +0 -1
- package/dist/registry-DwguKWvt.d.mts +0 -27
- package/dist/registry-oorLoGtz.mjs +0 -120
- package/dist/registry-oorLoGtz.mjs.map +0 -1
- package/dist/webln-DKqCnqx1.mjs +0 -3677
- package/dist/webln-DKqCnqx1.mjs.map +0 -1
|
@@ -1,608 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
export
|
|
4
|
-
export declare const PROVIDERS_HEADER = "x-gateway-providers";
|
|
5
|
-
/** 128 random bits as lowercase hex — generated once per install, unrelated to wallet secrets. */
|
|
6
|
-
export declare const installId: z.ZodMiniString<string>;
|
|
7
|
-
/** CAIP-2 chain id: `namespace:reference`. */
|
|
8
|
-
export declare const caip2: z.ZodMiniString<string>;
|
|
9
|
-
export type Caip2 = z.infer<typeof caip2>;
|
|
10
|
-
export type InstallId = z.infer<typeof installId>;
|
|
11
|
-
export declare const GATEWAY_ERRORS: readonly ["invalid-request", "unknown-network", "not-found", "rate-limited", "unavailable", "internal"];
|
|
12
|
-
export declare const gatewayError: z.ZodMiniObject<{
|
|
13
|
-
error: z.ZodMiniEnum<{
|
|
14
|
-
internal: "internal";
|
|
15
|
-
"invalid-request": "invalid-request";
|
|
16
|
-
"not-found": "not-found";
|
|
17
|
-
"rate-limited": "rate-limited";
|
|
18
|
-
unavailable: "unavailable";
|
|
19
|
-
"unknown-network": "unknown-network";
|
|
20
|
-
}>;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
export type GatewayErrorCode = (typeof GATEWAY_ERRORS)[number];
|
|
23
|
-
export type HttpMethod = "GET" | "POST" | "DELETE";
|
|
24
|
-
export type Endpoint<Req extends z.ZodMiniType, Res extends z.ZodMiniType> = {
|
|
25
|
-
readonly method: HttpMethod;
|
|
26
|
-
readonly path: string;
|
|
27
|
-
readonly request: Req;
|
|
28
|
-
readonly response: Res;
|
|
29
|
-
};
|
|
30
|
-
/** One gateway route: its verb, versioned path template, and request/response schemas. */
|
|
31
|
-
export declare function endpoint<Req extends z.ZodMiniType, Res extends z.ZodMiniType>(method: HttpMethod, path: `/v1/${string}`, request: Req, response: Res): Endpoint<Req, Res>;
|
|
32
|
-
/** `value` typed by `schema`, or `undefined` when it does not satisfy it. */
|
|
33
|
-
export declare function parseWith<S extends z.ZodMiniType>(schema: S, value: unknown): z.output<S> | undefined;
|
|
34
|
-
/** Whether `value` satisfies `schema` — lets consumers validate without importing zod. */
|
|
35
|
-
export declare function accepts(schema: z.ZodMiniType, value: unknown): boolean;
|
|
36
|
-
export declare const healthRequest: z.ZodMiniUndefined;
|
|
37
|
-
export declare const healthResponse: z.ZodMiniObject<{
|
|
38
|
-
status: z.ZodMiniLiteral<"ok">;
|
|
39
|
-
}, z.core.$strip>;
|
|
40
|
-
export declare const health: Endpoint<z.ZodMiniUndefined, z.ZodMiniObject<{
|
|
41
|
-
status: z.ZodMiniLiteral<"ok">;
|
|
42
|
-
}, z.core.$strip>>;
|
|
43
|
-
/** One JSON-RPC call plus nothing else: batches may carry at most this many entries. */
|
|
44
|
-
export declare const RPC_BATCH_MAX = 20;
|
|
45
|
-
/** Read-only EVM methods plus `eth_sendRawTransaction`. Anything not listed is rejected. */
|
|
46
|
-
export declare const EVM_RPC_METHODS: readonly ["eth_blobBaseFee", "eth_blockNumber", "eth_call", "eth_chainId", "eth_createAccessList", "eth_estimateGas", "eth_feeHistory", "eth_gasPrice", "eth_getBalance", "eth_getBlockByHash", "eth_getBlockByNumber", "eth_getBlockReceipts", "eth_getBlockTransactionCountByHash", "eth_getBlockTransactionCountByNumber", "eth_getCode", "eth_getProof", "eth_getStorageAt", "eth_getTransactionByBlockHashAndIndex", "eth_getTransactionByBlockNumberAndIndex", "eth_getTransactionByHash", "eth_getTransactionCount", "eth_getTransactionReceipt", "eth_maxPriorityFeePerGas", "eth_sendRawTransaction", "eth_simulateV1", "net_version", "web3_clientVersion"];
|
|
47
|
-
/** Read-only Solana methods plus `sendTransaction`. Anything not listed is rejected. */
|
|
48
|
-
export declare const SOLANA_RPC_METHODS: readonly ["getAccountInfo", "getBalance", "getBlock", "getBlockHeight", "getBlockTime", "getEpochInfo", "getFeeForMessage", "getGenesisHash", "getLatestBlockhash", "getMinimumBalanceForRentExemption", "getMultipleAccounts", "getRecentPrioritizationFees", "getSignatureStatuses", "getSignaturesForAddress", "getSlot", "getTokenAccountBalance", "getTokenAccountsByOwner", "getTokenSupply", "getTransaction", "getVersion", "isBlockhashValid", "sendTransaction", "simulateTransaction"];
|
|
49
|
-
export type EvmRpcMethod = (typeof EVM_RPC_METHODS)[number];
|
|
50
|
-
export type SolanaRpcMethod = (typeof SOLANA_RPC_METHODS)[number];
|
|
51
|
-
export declare const jsonRpcId: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
52
|
-
/** Method-agnostic wire shape of a call or batch (the gateway narrows by family). */
|
|
53
|
-
export declare const rpcRequest: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
54
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
55
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
56
|
-
method: z.ZodMiniString<string>;
|
|
57
|
-
params: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>>;
|
|
58
|
-
}, z.core.$strip>, z.ZodMiniArray<z.ZodMiniObject<{
|
|
59
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
60
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
61
|
-
method: z.ZodMiniString<string>;
|
|
62
|
-
params: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>>;
|
|
63
|
-
}, z.core.$strip>>]>;
|
|
64
|
-
export declare const evmRpcRequest: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
65
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
66
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
67
|
-
method: z.ZodMiniEnum<{
|
|
68
|
-
eth_blobBaseFee: "eth_blobBaseFee";
|
|
69
|
-
eth_blockNumber: "eth_blockNumber";
|
|
70
|
-
eth_call: "eth_call";
|
|
71
|
-
eth_chainId: "eth_chainId";
|
|
72
|
-
eth_createAccessList: "eth_createAccessList";
|
|
73
|
-
eth_estimateGas: "eth_estimateGas";
|
|
74
|
-
eth_feeHistory: "eth_feeHistory";
|
|
75
|
-
eth_gasPrice: "eth_gasPrice";
|
|
76
|
-
eth_getBalance: "eth_getBalance";
|
|
77
|
-
eth_getBlockByHash: "eth_getBlockByHash";
|
|
78
|
-
eth_getBlockByNumber: "eth_getBlockByNumber";
|
|
79
|
-
eth_getBlockReceipts: "eth_getBlockReceipts";
|
|
80
|
-
eth_getBlockTransactionCountByHash: "eth_getBlockTransactionCountByHash";
|
|
81
|
-
eth_getBlockTransactionCountByNumber: "eth_getBlockTransactionCountByNumber";
|
|
82
|
-
eth_getCode: "eth_getCode";
|
|
83
|
-
eth_getProof: "eth_getProof";
|
|
84
|
-
eth_getStorageAt: "eth_getStorageAt";
|
|
85
|
-
eth_getTransactionByBlockHashAndIndex: "eth_getTransactionByBlockHashAndIndex";
|
|
86
|
-
eth_getTransactionByBlockNumberAndIndex: "eth_getTransactionByBlockNumberAndIndex";
|
|
87
|
-
eth_getTransactionByHash: "eth_getTransactionByHash";
|
|
88
|
-
eth_getTransactionCount: "eth_getTransactionCount";
|
|
89
|
-
eth_getTransactionReceipt: "eth_getTransactionReceipt";
|
|
90
|
-
eth_maxPriorityFeePerGas: "eth_maxPriorityFeePerGas";
|
|
91
|
-
eth_sendRawTransaction: "eth_sendRawTransaction";
|
|
92
|
-
eth_simulateV1: "eth_simulateV1";
|
|
93
|
-
net_version: "net_version";
|
|
94
|
-
web3_clientVersion: "web3_clientVersion";
|
|
95
|
-
}>;
|
|
96
|
-
params: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>>;
|
|
97
|
-
}, z.core.$strip>, z.ZodMiniArray<z.ZodMiniObject<{
|
|
98
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
99
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
100
|
-
method: z.ZodMiniEnum<{
|
|
101
|
-
eth_blobBaseFee: "eth_blobBaseFee";
|
|
102
|
-
eth_blockNumber: "eth_blockNumber";
|
|
103
|
-
eth_call: "eth_call";
|
|
104
|
-
eth_chainId: "eth_chainId";
|
|
105
|
-
eth_createAccessList: "eth_createAccessList";
|
|
106
|
-
eth_estimateGas: "eth_estimateGas";
|
|
107
|
-
eth_feeHistory: "eth_feeHistory";
|
|
108
|
-
eth_gasPrice: "eth_gasPrice";
|
|
109
|
-
eth_getBalance: "eth_getBalance";
|
|
110
|
-
eth_getBlockByHash: "eth_getBlockByHash";
|
|
111
|
-
eth_getBlockByNumber: "eth_getBlockByNumber";
|
|
112
|
-
eth_getBlockReceipts: "eth_getBlockReceipts";
|
|
113
|
-
eth_getBlockTransactionCountByHash: "eth_getBlockTransactionCountByHash";
|
|
114
|
-
eth_getBlockTransactionCountByNumber: "eth_getBlockTransactionCountByNumber";
|
|
115
|
-
eth_getCode: "eth_getCode";
|
|
116
|
-
eth_getProof: "eth_getProof";
|
|
117
|
-
eth_getStorageAt: "eth_getStorageAt";
|
|
118
|
-
eth_getTransactionByBlockHashAndIndex: "eth_getTransactionByBlockHashAndIndex";
|
|
119
|
-
eth_getTransactionByBlockNumberAndIndex: "eth_getTransactionByBlockNumberAndIndex";
|
|
120
|
-
eth_getTransactionByHash: "eth_getTransactionByHash";
|
|
121
|
-
eth_getTransactionCount: "eth_getTransactionCount";
|
|
122
|
-
eth_getTransactionReceipt: "eth_getTransactionReceipt";
|
|
123
|
-
eth_maxPriorityFeePerGas: "eth_maxPriorityFeePerGas";
|
|
124
|
-
eth_sendRawTransaction: "eth_sendRawTransaction";
|
|
125
|
-
eth_simulateV1: "eth_simulateV1";
|
|
126
|
-
net_version: "net_version";
|
|
127
|
-
web3_clientVersion: "web3_clientVersion";
|
|
128
|
-
}>;
|
|
129
|
-
params: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>>;
|
|
130
|
-
}, z.core.$strip>>]>;
|
|
131
|
-
export declare const solanaRpcRequest: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
132
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
133
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
134
|
-
method: z.ZodMiniEnum<{
|
|
135
|
-
getAccountInfo: "getAccountInfo";
|
|
136
|
-
getBalance: "getBalance";
|
|
137
|
-
getBlock: "getBlock";
|
|
138
|
-
getBlockHeight: "getBlockHeight";
|
|
139
|
-
getBlockTime: "getBlockTime";
|
|
140
|
-
getEpochInfo: "getEpochInfo";
|
|
141
|
-
getFeeForMessage: "getFeeForMessage";
|
|
142
|
-
getGenesisHash: "getGenesisHash";
|
|
143
|
-
getLatestBlockhash: "getLatestBlockhash";
|
|
144
|
-
getMinimumBalanceForRentExemption: "getMinimumBalanceForRentExemption";
|
|
145
|
-
getMultipleAccounts: "getMultipleAccounts";
|
|
146
|
-
getRecentPrioritizationFees: "getRecentPrioritizationFees";
|
|
147
|
-
getSignatureStatuses: "getSignatureStatuses";
|
|
148
|
-
getSignaturesForAddress: "getSignaturesForAddress";
|
|
149
|
-
getSlot: "getSlot";
|
|
150
|
-
getTokenAccountBalance: "getTokenAccountBalance";
|
|
151
|
-
getTokenAccountsByOwner: "getTokenAccountsByOwner";
|
|
152
|
-
getTokenSupply: "getTokenSupply";
|
|
153
|
-
getTransaction: "getTransaction";
|
|
154
|
-
getVersion: "getVersion";
|
|
155
|
-
isBlockhashValid: "isBlockhashValid";
|
|
156
|
-
sendTransaction: "sendTransaction";
|
|
157
|
-
simulateTransaction: "simulateTransaction";
|
|
158
|
-
}>;
|
|
159
|
-
params: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>>;
|
|
160
|
-
}, z.core.$strip>, z.ZodMiniArray<z.ZodMiniObject<{
|
|
161
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
162
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
163
|
-
method: z.ZodMiniEnum<{
|
|
164
|
-
getAccountInfo: "getAccountInfo";
|
|
165
|
-
getBalance: "getBalance";
|
|
166
|
-
getBlock: "getBlock";
|
|
167
|
-
getBlockHeight: "getBlockHeight";
|
|
168
|
-
getBlockTime: "getBlockTime";
|
|
169
|
-
getEpochInfo: "getEpochInfo";
|
|
170
|
-
getFeeForMessage: "getFeeForMessage";
|
|
171
|
-
getGenesisHash: "getGenesisHash";
|
|
172
|
-
getLatestBlockhash: "getLatestBlockhash";
|
|
173
|
-
getMinimumBalanceForRentExemption: "getMinimumBalanceForRentExemption";
|
|
174
|
-
getMultipleAccounts: "getMultipleAccounts";
|
|
175
|
-
getRecentPrioritizationFees: "getRecentPrioritizationFees";
|
|
176
|
-
getSignatureStatuses: "getSignatureStatuses";
|
|
177
|
-
getSignaturesForAddress: "getSignaturesForAddress";
|
|
178
|
-
getSlot: "getSlot";
|
|
179
|
-
getTokenAccountBalance: "getTokenAccountBalance";
|
|
180
|
-
getTokenAccountsByOwner: "getTokenAccountsByOwner";
|
|
181
|
-
getTokenSupply: "getTokenSupply";
|
|
182
|
-
getTransaction: "getTransaction";
|
|
183
|
-
getVersion: "getVersion";
|
|
184
|
-
isBlockhashValid: "isBlockhashValid";
|
|
185
|
-
sendTransaction: "sendTransaction";
|
|
186
|
-
simulateTransaction: "simulateTransaction";
|
|
187
|
-
}>;
|
|
188
|
-
params: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>>;
|
|
189
|
-
}, z.core.$strip>>]>;
|
|
190
|
-
export declare const jsonRpcResponse: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
191
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
192
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
193
|
-
result: z.ZodMiniUnknown;
|
|
194
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
195
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
196
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
197
|
-
error: z.ZodMiniObject<{
|
|
198
|
-
code: z.ZodMiniInt;
|
|
199
|
-
message: z.ZodMiniString<string>;
|
|
200
|
-
data: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
201
|
-
}, z.core.$strip>;
|
|
202
|
-
}, z.core.$strip>]>;
|
|
203
|
-
export declare const rpcResponse: z.ZodMiniUnion<readonly [z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
204
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
205
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
206
|
-
result: z.ZodMiniUnknown;
|
|
207
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
208
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
209
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
210
|
-
error: z.ZodMiniObject<{
|
|
211
|
-
code: z.ZodMiniInt;
|
|
212
|
-
message: z.ZodMiniString<string>;
|
|
213
|
-
data: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
214
|
-
}, z.core.$strip>;
|
|
215
|
-
}, z.core.$strip>]>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
216
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
217
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
218
|
-
result: z.ZodMiniUnknown;
|
|
219
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
220
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
221
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
222
|
-
error: z.ZodMiniObject<{
|
|
223
|
-
code: z.ZodMiniInt;
|
|
224
|
-
message: z.ZodMiniString<string>;
|
|
225
|
-
data: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
226
|
-
}, z.core.$strip>;
|
|
227
|
-
}, z.core.$strip>]>>]>;
|
|
228
|
-
export declare const rpc: Endpoint<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
229
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
230
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
231
|
-
method: z.ZodMiniString<string>;
|
|
232
|
-
params: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>>;
|
|
233
|
-
}, z.core.$strip>, z.ZodMiniArray<z.ZodMiniObject<{
|
|
234
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
235
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
236
|
-
method: z.ZodMiniString<string>;
|
|
237
|
-
params: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniArray<z.ZodMiniUnknown>, z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>]>>;
|
|
238
|
-
}, z.core.$strip>>]>, z.ZodMiniUnion<readonly [z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
239
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
240
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
241
|
-
result: z.ZodMiniUnknown;
|
|
242
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
243
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
244
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
245
|
-
error: z.ZodMiniObject<{
|
|
246
|
-
code: z.ZodMiniInt;
|
|
247
|
-
message: z.ZodMiniString<string>;
|
|
248
|
-
data: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
249
|
-
}, z.core.$strip>;
|
|
250
|
-
}, z.core.$strip>]>, z.ZodMiniArray<z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
251
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
252
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
253
|
-
result: z.ZodMiniUnknown;
|
|
254
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
255
|
-
jsonrpc: z.ZodMiniLiteral<"2.0">;
|
|
256
|
-
id: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNumber<number>, z.ZodMiniNull]>;
|
|
257
|
-
error: z.ZodMiniObject<{
|
|
258
|
-
code: z.ZodMiniInt;
|
|
259
|
-
message: z.ZodMiniString<string>;
|
|
260
|
-
data: z.ZodMiniOptional<z.ZodMiniUnknown>;
|
|
261
|
-
}, z.core.$strip>;
|
|
262
|
-
}, z.core.$strip>]>>]>>;
|
|
263
|
-
/** The JSON-RPC URL path for one network. */
|
|
264
|
-
export declare const rpcPath: (caip2: string) => string;
|
|
265
|
-
type EsploraRoute = {
|
|
266
|
-
readonly method: "GET" | "POST";
|
|
267
|
-
readonly pattern: RegExp;
|
|
268
|
-
};
|
|
269
|
-
/** The Esplora surface the engine uses; every other path is rejected. */
|
|
270
|
-
export declare const ESPLORA_ROUTES: ReadonlyArray<EsploraRoute>;
|
|
271
|
-
/** `path` is the Esplora path after `/v1/esplora/:caip2`, with a leading slash and no query. */
|
|
272
|
-
export declare const esploraPathAllowed: (method: string, path: string) => boolean;
|
|
273
|
-
export declare const esploraGet: Endpoint<z.ZodMiniUndefined, z.ZodMiniUnknown>;
|
|
274
|
-
/** The Esplora base path for one network; allow-listed paths are appended to it. */
|
|
275
|
-
export declare const esploraBasePath: (caip2: string) => string;
|
|
276
|
-
export declare const esploraPost: Endpoint<z.ZodMiniString<string>, z.ZodMiniString<string>>;
|
|
277
|
-
export declare const servedNetworksRequest: z.ZodMiniUndefined;
|
|
278
|
-
/** The networks the gateway actually serves, in its configured order. */
|
|
279
|
-
export declare const servedNetworksResponse: z.ZodMiniObject<{
|
|
280
|
-
networks: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
281
|
-
}, z.core.$strip>;
|
|
282
|
-
export declare const servedNetworks: Endpoint<z.ZodMiniUndefined, z.ZodMiniObject<{
|
|
283
|
-
networks: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
284
|
-
}, z.core.$strip>>;
|
|
285
|
-
export declare const networksPath: string;
|
|
286
|
-
export declare const PHISHING_HASH_BYTES = 8;
|
|
287
|
-
export declare const PHISHING_MAX_PATH_SEGMENTS = 8;
|
|
288
|
-
/** One list entry as its lookup key, or `undefined` when the entry is not a usable host or path. */
|
|
289
|
-
export declare function phishingKey(entry: string): string | undefined;
|
|
290
|
-
/** The first 8 bytes of SHA-256 over the UTF-8 key. */
|
|
291
|
-
export declare function phishingHash(key: string): Uint8Array;
|
|
292
|
-
/** Lookup keys for a page URL, most specific first; empty for anything but http(s). */
|
|
293
|
-
export declare function phishingCandidates(url: string): ReadonlyArray<string>;
|
|
294
|
-
export declare const phishingListRequest: z.ZodMiniObject<{
|
|
295
|
-
since: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
296
|
-
}, z.core.$strip>;
|
|
297
|
-
export declare const phishingListResponse: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
298
|
-
kind: z.ZodMiniLiteral<"current">;
|
|
299
|
-
version: z.ZodMiniNumber<number>;
|
|
300
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
301
|
-
kind: z.ZodMiniLiteral<"diff">;
|
|
302
|
-
from: z.ZodMiniNumber<number>;
|
|
303
|
-
version: z.ZodMiniNumber<number>;
|
|
304
|
-
deny: z.ZodMiniObject<{
|
|
305
|
-
add: z.ZodMiniString<string>;
|
|
306
|
-
remove: z.ZodMiniString<string>;
|
|
307
|
-
}, z.core.$strip>;
|
|
308
|
-
allow: z.ZodMiniObject<{
|
|
309
|
-
add: z.ZodMiniString<string>;
|
|
310
|
-
remove: z.ZodMiniString<string>;
|
|
311
|
-
}, z.core.$strip>;
|
|
312
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
313
|
-
kind: z.ZodMiniLiteral<"snapshot">;
|
|
314
|
-
version: z.ZodMiniNumber<number>;
|
|
315
|
-
deny: z.ZodMiniString<string>;
|
|
316
|
-
allow: z.ZodMiniString<string>;
|
|
317
|
-
}, z.core.$strip>], "kind">;
|
|
318
|
-
export type PhishingListResponse = z.infer<typeof phishingListResponse>;
|
|
319
|
-
export declare const phishingList: Endpoint<z.ZodMiniObject<{
|
|
320
|
-
since: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
321
|
-
}, z.core.$strip>, z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
322
|
-
kind: z.ZodMiniLiteral<"current">;
|
|
323
|
-
version: z.ZodMiniNumber<number>;
|
|
324
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
325
|
-
kind: z.ZodMiniLiteral<"diff">;
|
|
326
|
-
from: z.ZodMiniNumber<number>;
|
|
327
|
-
version: z.ZodMiniNumber<number>;
|
|
328
|
-
deny: z.ZodMiniObject<{
|
|
329
|
-
add: z.ZodMiniString<string>;
|
|
330
|
-
remove: z.ZodMiniString<string>;
|
|
331
|
-
}, z.core.$strip>;
|
|
332
|
-
allow: z.ZodMiniObject<{
|
|
333
|
-
add: z.ZodMiniString<string>;
|
|
334
|
-
remove: z.ZodMiniString<string>;
|
|
335
|
-
}, z.core.$strip>;
|
|
336
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
337
|
-
kind: z.ZodMiniLiteral<"snapshot">;
|
|
338
|
-
version: z.ZodMiniNumber<number>;
|
|
339
|
-
deny: z.ZodMiniString<string>;
|
|
340
|
-
allow: z.ZodMiniString<string>;
|
|
341
|
-
}, z.core.$strip>], "kind">>;
|
|
342
|
-
export declare const phishingListPath: string;
|
|
343
|
-
/** Strictly ascending 8-byte hashes, concatenated: a sorted set. */
|
|
344
|
-
export type HashList = Uint8Array;
|
|
345
|
-
declare const size: (list: HashList) => number;
|
|
346
|
-
export declare const hashCount: typeof size;
|
|
347
|
-
/**
|
|
348
|
-
* A base64 hash list, or `undefined` when it is not whole 8-byte hashes in strictly ascending
|
|
349
|
-
* order.
|
|
350
|
-
*/
|
|
351
|
-
export declare function decodeHashList(encoded: string): HashList | undefined;
|
|
352
|
-
/** The sorted set of `hashes`, duplicates removed. */
|
|
353
|
-
export declare function hashList(hashes: Iterable<Uint8Array>): HashList;
|
|
354
|
-
export declare const encodeHashList: (list: HashList) => string;
|
|
355
|
-
export declare function contains(list: HashList, hash: Uint8Array): boolean;
|
|
356
|
-
export declare const union: (a: HashList, b: HashList) => HashList;
|
|
357
|
-
/** The hashes of `a` that are not in `b`. */
|
|
358
|
-
export declare const difference: (a: HashList, b: HashList) => HashList;
|
|
359
|
-
/** `(list − remove) ∪ add`. */
|
|
360
|
-
export declare const applyDiff: (list: HashList, add: HashList, remove: HashList) => HashList;
|
|
361
|
-
/** The native-token sentinel 0x uses for sell and buy tokens. */
|
|
362
|
-
export declare const ZEROX_NATIVE_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
363
|
-
/** The `swapQuote` request: which exact-in sell on which chain, for which taker, at what slippage. */
|
|
364
|
-
export declare const swapQuoteRequest: z.ZodMiniObject<{
|
|
365
|
-
network: z.ZodMiniString<string>;
|
|
366
|
-
sellToken: z.ZodMiniString<string>;
|
|
367
|
-
buyToken: z.ZodMiniString<string>;
|
|
368
|
-
sellAmount: z.ZodMiniString<string>;
|
|
369
|
-
taker: z.ZodMiniString<string>;
|
|
370
|
-
slippageBps: z.ZodMiniNumber<unknown>;
|
|
371
|
-
}, z.core.$strip>;
|
|
372
|
-
export declare const swapQuoteResponse: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
373
|
-
liquidity: z.ZodMiniLiteral<true>;
|
|
374
|
-
provider: z.ZodMiniLiteral<"0x">;
|
|
375
|
-
sellToken: z.ZodMiniString<string>;
|
|
376
|
-
buyToken: z.ZodMiniString<string>;
|
|
377
|
-
sellAmount: z.ZodMiniString<string>;
|
|
378
|
-
buyAmount: z.ZodMiniString<string>;
|
|
379
|
-
minBuyAmount: z.ZodMiniString<string>;
|
|
380
|
-
allowanceTarget: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
|
|
381
|
-
transaction: z.ZodMiniObject<{
|
|
382
|
-
to: z.ZodMiniString<string>;
|
|
383
|
-
data: z.ZodMiniString<string>;
|
|
384
|
-
value: z.ZodMiniString<string>;
|
|
385
|
-
gas: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
|
|
386
|
-
}, z.core.$strip>;
|
|
387
|
-
fees: z.ZodMiniObject<{
|
|
388
|
-
integrator: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
389
|
-
token: z.ZodMiniString<string>;
|
|
390
|
-
amount: z.ZodMiniString<string>;
|
|
391
|
-
}, z.core.$strip>, z.ZodMiniNull]>;
|
|
392
|
-
zeroEx: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
393
|
-
token: z.ZodMiniString<string>;
|
|
394
|
-
amount: z.ZodMiniString<string>;
|
|
395
|
-
}, z.core.$strip>, z.ZodMiniNull]>;
|
|
396
|
-
}, z.core.$strip>;
|
|
397
|
-
blockNumber: z.ZodMiniString<string>;
|
|
398
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
399
|
-
liquidity: z.ZodMiniLiteral<false>;
|
|
400
|
-
}, z.core.$strip>]>;
|
|
401
|
-
export declare const swapQuote: Endpoint<z.ZodMiniObject<{
|
|
402
|
-
network: z.ZodMiniString<string>;
|
|
403
|
-
sellToken: z.ZodMiniString<string>;
|
|
404
|
-
buyToken: z.ZodMiniString<string>;
|
|
405
|
-
sellAmount: z.ZodMiniString<string>;
|
|
406
|
-
taker: z.ZodMiniString<string>;
|
|
407
|
-
slippageBps: z.ZodMiniNumber<unknown>;
|
|
408
|
-
}, z.core.$strip>, z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
409
|
-
liquidity: z.ZodMiniLiteral<true>;
|
|
410
|
-
provider: z.ZodMiniLiteral<"0x">;
|
|
411
|
-
sellToken: z.ZodMiniString<string>;
|
|
412
|
-
buyToken: z.ZodMiniString<string>;
|
|
413
|
-
sellAmount: z.ZodMiniString<string>;
|
|
414
|
-
buyAmount: z.ZodMiniString<string>;
|
|
415
|
-
minBuyAmount: z.ZodMiniString<string>;
|
|
416
|
-
allowanceTarget: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
|
|
417
|
-
transaction: z.ZodMiniObject<{
|
|
418
|
-
to: z.ZodMiniString<string>;
|
|
419
|
-
data: z.ZodMiniString<string>;
|
|
420
|
-
value: z.ZodMiniString<string>;
|
|
421
|
-
gas: z.ZodMiniUnion<readonly [z.ZodMiniString<string>, z.ZodMiniNull]>;
|
|
422
|
-
}, z.core.$strip>;
|
|
423
|
-
fees: z.ZodMiniObject<{
|
|
424
|
-
integrator: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
425
|
-
token: z.ZodMiniString<string>;
|
|
426
|
-
amount: z.ZodMiniString<string>;
|
|
427
|
-
}, z.core.$strip>, z.ZodMiniNull]>;
|
|
428
|
-
zeroEx: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
429
|
-
token: z.ZodMiniString<string>;
|
|
430
|
-
amount: z.ZodMiniString<string>;
|
|
431
|
-
}, z.core.$strip>, z.ZodMiniNull]>;
|
|
432
|
-
}, z.core.$strip>;
|
|
433
|
-
blockNumber: z.ZodMiniString<string>;
|
|
434
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
435
|
-
liquidity: z.ZodMiniLiteral<false>;
|
|
436
|
-
}, z.core.$strip>]>>;
|
|
437
|
-
export type SwapQuoteRequest = z.infer<typeof swapQuoteRequest>;
|
|
438
|
-
export type SwapQuoteResponse = z.infer<typeof swapQuoteResponse>;
|
|
439
|
-
/** Jupiter is mainnet-only — every other Solana CAIP-2 id is a client error. */
|
|
440
|
-
export declare const SOLANA_MAINNET = "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
|
|
441
|
-
/** The `swapQuoteSolana` request: an exact-in mint pair for a taker on Solana mainnet. */
|
|
442
|
-
export declare const swapQuoteSolanaRequest: z.ZodMiniObject<{
|
|
443
|
-
network: z.ZodMiniLiteral<"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp">;
|
|
444
|
-
inputMint: z.ZodMiniString<string>;
|
|
445
|
-
outputMint: z.ZodMiniString<string>;
|
|
446
|
-
amount: z.ZodMiniString<string>;
|
|
447
|
-
taker: z.ZodMiniString<string>;
|
|
448
|
-
slippageBps: z.ZodMiniNumber<unknown>;
|
|
449
|
-
}, z.core.$strip>;
|
|
450
|
-
/** One Solana instruction as the wire carries it — base64 data, plain account flags. */
|
|
451
|
-
export declare const solanaInstruction: z.ZodMiniObject<{
|
|
452
|
-
programId: z.ZodMiniString<string>;
|
|
453
|
-
accounts: z.ZodMiniArray<z.ZodMiniObject<{
|
|
454
|
-
address: z.ZodMiniString<string>;
|
|
455
|
-
signer: z.ZodMiniBoolean<boolean>;
|
|
456
|
-
writable: z.ZodMiniBoolean<boolean>;
|
|
457
|
-
}, z.core.$strip>>;
|
|
458
|
-
data: z.ZodMiniString<string>;
|
|
459
|
-
}, z.core.$strip>;
|
|
460
|
-
export declare const swapQuoteSolanaResponse: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
461
|
-
liquidity: z.ZodMiniLiteral<true>;
|
|
462
|
-
provider: z.ZodMiniLiteral<"jupiter">;
|
|
463
|
-
inputMint: z.ZodMiniString<string>;
|
|
464
|
-
outputMint: z.ZodMiniString<string>;
|
|
465
|
-
inAmount: z.ZodMiniString<string>;
|
|
466
|
-
outAmount: z.ZodMiniString<string>;
|
|
467
|
-
otherAmountThreshold: z.ZodMiniString<string>;
|
|
468
|
-
slippageBps: z.ZodMiniNumber<unknown>;
|
|
469
|
-
setup: z.ZodMiniArray<z.ZodMiniObject<{
|
|
470
|
-
programId: z.ZodMiniString<string>;
|
|
471
|
-
accounts: z.ZodMiniArray<z.ZodMiniObject<{
|
|
472
|
-
address: z.ZodMiniString<string>;
|
|
473
|
-
signer: z.ZodMiniBoolean<boolean>;
|
|
474
|
-
writable: z.ZodMiniBoolean<boolean>;
|
|
475
|
-
}, z.core.$strip>>;
|
|
476
|
-
data: z.ZodMiniString<string>;
|
|
477
|
-
}, z.core.$strip>>;
|
|
478
|
-
swap: z.ZodMiniObject<{
|
|
479
|
-
programId: z.ZodMiniString<string>;
|
|
480
|
-
accounts: z.ZodMiniArray<z.ZodMiniObject<{
|
|
481
|
-
address: z.ZodMiniString<string>;
|
|
482
|
-
signer: z.ZodMiniBoolean<boolean>;
|
|
483
|
-
writable: z.ZodMiniBoolean<boolean>;
|
|
484
|
-
}, z.core.$strip>>;
|
|
485
|
-
data: z.ZodMiniString<string>;
|
|
486
|
-
}, z.core.$strip>;
|
|
487
|
-
cleanup: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
488
|
-
programId: z.ZodMiniString<string>;
|
|
489
|
-
accounts: z.ZodMiniArray<z.ZodMiniObject<{
|
|
490
|
-
address: z.ZodMiniString<string>;
|
|
491
|
-
signer: z.ZodMiniBoolean<boolean>;
|
|
492
|
-
writable: z.ZodMiniBoolean<boolean>;
|
|
493
|
-
}, z.core.$strip>>;
|
|
494
|
-
data: z.ZodMiniString<string>;
|
|
495
|
-
}, z.core.$strip>, z.ZodMiniNull]>;
|
|
496
|
-
lookupTables: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
497
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
498
|
-
liquidity: z.ZodMiniLiteral<false>;
|
|
499
|
-
}, z.core.$strip>]>;
|
|
500
|
-
export declare const swapQuoteSolana: Endpoint<z.ZodMiniObject<{
|
|
501
|
-
network: z.ZodMiniLiteral<"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp">;
|
|
502
|
-
inputMint: z.ZodMiniString<string>;
|
|
503
|
-
outputMint: z.ZodMiniString<string>;
|
|
504
|
-
amount: z.ZodMiniString<string>;
|
|
505
|
-
taker: z.ZodMiniString<string>;
|
|
506
|
-
slippageBps: z.ZodMiniNumber<unknown>;
|
|
507
|
-
}, z.core.$strip>, z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
508
|
-
liquidity: z.ZodMiniLiteral<true>;
|
|
509
|
-
provider: z.ZodMiniLiteral<"jupiter">;
|
|
510
|
-
inputMint: z.ZodMiniString<string>;
|
|
511
|
-
outputMint: z.ZodMiniString<string>;
|
|
512
|
-
inAmount: z.ZodMiniString<string>;
|
|
513
|
-
outAmount: z.ZodMiniString<string>;
|
|
514
|
-
otherAmountThreshold: z.ZodMiniString<string>;
|
|
515
|
-
slippageBps: z.ZodMiniNumber<unknown>;
|
|
516
|
-
setup: z.ZodMiniArray<z.ZodMiniObject<{
|
|
517
|
-
programId: z.ZodMiniString<string>;
|
|
518
|
-
accounts: z.ZodMiniArray<z.ZodMiniObject<{
|
|
519
|
-
address: z.ZodMiniString<string>;
|
|
520
|
-
signer: z.ZodMiniBoolean<boolean>;
|
|
521
|
-
writable: z.ZodMiniBoolean<boolean>;
|
|
522
|
-
}, z.core.$strip>>;
|
|
523
|
-
data: z.ZodMiniString<string>;
|
|
524
|
-
}, z.core.$strip>>;
|
|
525
|
-
swap: z.ZodMiniObject<{
|
|
526
|
-
programId: z.ZodMiniString<string>;
|
|
527
|
-
accounts: z.ZodMiniArray<z.ZodMiniObject<{
|
|
528
|
-
address: z.ZodMiniString<string>;
|
|
529
|
-
signer: z.ZodMiniBoolean<boolean>;
|
|
530
|
-
writable: z.ZodMiniBoolean<boolean>;
|
|
531
|
-
}, z.core.$strip>>;
|
|
532
|
-
data: z.ZodMiniString<string>;
|
|
533
|
-
}, z.core.$strip>;
|
|
534
|
-
cleanup: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
535
|
-
programId: z.ZodMiniString<string>;
|
|
536
|
-
accounts: z.ZodMiniArray<z.ZodMiniObject<{
|
|
537
|
-
address: z.ZodMiniString<string>;
|
|
538
|
-
signer: z.ZodMiniBoolean<boolean>;
|
|
539
|
-
writable: z.ZodMiniBoolean<boolean>;
|
|
540
|
-
}, z.core.$strip>>;
|
|
541
|
-
data: z.ZodMiniString<string>;
|
|
542
|
-
}, z.core.$strip>, z.ZodMiniNull]>;
|
|
543
|
-
lookupTables: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
544
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
545
|
-
liquidity: z.ZodMiniLiteral<false>;
|
|
546
|
-
}, z.core.$strip>]>>;
|
|
547
|
-
export type SwapQuoteSolanaRequest = z.infer<typeof swapQuoteSolanaRequest>;
|
|
548
|
-
export type SwapQuoteSolanaResponse = z.infer<typeof swapQuoteSolanaResponse>;
|
|
549
|
-
/** The `bridgeQuote` request: an exact-in token transfer from an origin chain to a destination. */
|
|
550
|
-
export declare const bridgeQuoteRequest: z.ZodMiniObject<{
|
|
551
|
-
network: z.ZodMiniString<string>;
|
|
552
|
-
destinationNetwork: z.ZodMiniString<string>;
|
|
553
|
-
inputToken: z.ZodMiniString<string>;
|
|
554
|
-
outputToken: z.ZodMiniString<string>;
|
|
555
|
-
amount: z.ZodMiniString<string>;
|
|
556
|
-
taker: z.ZodMiniString<string>;
|
|
557
|
-
}, z.core.$strip>;
|
|
558
|
-
export declare const bridgeQuoteResponse: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
559
|
-
liquidity: z.ZodMiniLiteral<true>;
|
|
560
|
-
provider: z.ZodMiniLiteral<"across">;
|
|
561
|
-
inputToken: z.ZodMiniString<string>;
|
|
562
|
-
outputToken: z.ZodMiniString<string>;
|
|
563
|
-
inputAmount: z.ZodMiniString<string>;
|
|
564
|
-
outputAmount: z.ZodMiniString<string>;
|
|
565
|
-
destinationNetwork: z.ZodMiniString<string>;
|
|
566
|
-
quoteTimestamp: z.ZodMiniNumber<unknown>;
|
|
567
|
-
fillDeadline: z.ZodMiniNumber<unknown>;
|
|
568
|
-
exclusiveRelayer: z.ZodMiniString<string>;
|
|
569
|
-
exclusivityParameter: z.ZodMiniNumber<unknown>;
|
|
570
|
-
spokePool: z.ZodMiniString<string>;
|
|
571
|
-
limits: z.ZodMiniObject<{
|
|
572
|
-
minDeposit: z.ZodMiniString<string>;
|
|
573
|
-
maxDeposit: z.ZodMiniString<string>;
|
|
574
|
-
}, z.core.$strip>;
|
|
575
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
576
|
-
liquidity: z.ZodMiniLiteral<false>;
|
|
577
|
-
}, z.core.$strip>]>;
|
|
578
|
-
export declare const bridgeQuote: Endpoint<z.ZodMiniObject<{
|
|
579
|
-
network: z.ZodMiniString<string>;
|
|
580
|
-
destinationNetwork: z.ZodMiniString<string>;
|
|
581
|
-
inputToken: z.ZodMiniString<string>;
|
|
582
|
-
outputToken: z.ZodMiniString<string>;
|
|
583
|
-
amount: z.ZodMiniString<string>;
|
|
584
|
-
taker: z.ZodMiniString<string>;
|
|
585
|
-
}, z.core.$strip>, z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
586
|
-
liquidity: z.ZodMiniLiteral<true>;
|
|
587
|
-
provider: z.ZodMiniLiteral<"across">;
|
|
588
|
-
inputToken: z.ZodMiniString<string>;
|
|
589
|
-
outputToken: z.ZodMiniString<string>;
|
|
590
|
-
inputAmount: z.ZodMiniString<string>;
|
|
591
|
-
outputAmount: z.ZodMiniString<string>;
|
|
592
|
-
destinationNetwork: z.ZodMiniString<string>;
|
|
593
|
-
quoteTimestamp: z.ZodMiniNumber<unknown>;
|
|
594
|
-
fillDeadline: z.ZodMiniNumber<unknown>;
|
|
595
|
-
exclusiveRelayer: z.ZodMiniString<string>;
|
|
596
|
-
exclusivityParameter: z.ZodMiniNumber<unknown>;
|
|
597
|
-
spokePool: z.ZodMiniString<string>;
|
|
598
|
-
limits: z.ZodMiniObject<{
|
|
599
|
-
minDeposit: z.ZodMiniString<string>;
|
|
600
|
-
maxDeposit: z.ZodMiniString<string>;
|
|
601
|
-
}, z.core.$strip>;
|
|
602
|
-
}, z.core.$strip>, z.ZodMiniObject<{
|
|
603
|
-
liquidity: z.ZodMiniLiteral<false>;
|
|
604
|
-
}, z.core.$strip>]>>;
|
|
605
|
-
export type BridgeQuoteRequest = z.infer<typeof bridgeQuoteRequest>;
|
|
606
|
-
export type BridgeQuoteResponse = z.infer<typeof bridgeQuoteResponse>;
|
|
607
|
-
export { BITCOIN_NETWORKS, NETWORKS, type NetworkInfo, SOLANA_NETWORKS, networkById };
|
|
608
|
-
//# sourceMappingURL=gateway-contract.d.mts.map
|
|
1
|
+
import { $ as nftCollectionResponse, $i as GatewayErrorCode, $n as phishingList, $r as tronAccountResponse, $t as priceFamily, A as NFT_STANDARDS, Ai as RPC_PROOF_KEYS_MAX, An as bridgeQuoteResponse, Ar as TronBroadcast, At as TokenListResponse, B as NftItemRequest, Bi as logsFilterViolation, Bn as contains, Br as TronLog, Bt as MAX_PRICE_ASSETS, C as pushWatch, Ci as FEE_HISTORY_BLOCKS_MAX, Cn as SwapQuoteRequest, Cr as TRON_INDEXER_LIMIT_MAX, Ct as approvals, D as NFT_DESCRIPTION_MAX, Di as LOGS_TOPIC_ALTERNATIVES_MAX, Dn as ZEROX_NATIVE_TOKEN, Dr as TronAccountResource, Dt as TOKEN_LIST_MAX_ENTRIES, E as NFT_DATA_URI_MAX, Ei as LOGS_BLOCK_RANGE_MAX, En as SwapQuoteSolanaResponse, Er as TronAccount, Et as approvalsResponse, F as NftCollectionRequest, Fi as containsBroadcast, Fn as swapQuoteSolana, Fr as TronIndexerAccount, Ft as tokenListResponse, G as nftAddressFits, Gi as solanaRpcRequest, Gn as hashList, Gr as TronNodePath, Gt as PricesRequest, H as NftMediaRef, Hi as rpcPath, Hn as difference, Hr as TronMaybeBlock, Ht as PRICE_FAMILIES, I as NftDetail, Ii as evmRpcRequest, In as swapQuoteSolanaRequest, Ir as TronIndexerPage, It as tokenName, J as nftCollection, Ji as healthResponse, Jn as PHISHING_MAX_PATH_SEGMENTS, Jr as TronWitnessList, Jt as fiatPrice, K as nftAttribute, Ki as health, Kn as union, Kr as TronReward, Kt as PricesResponse, L as NftFloor, Li as jsonRpcId, Ln as swapQuoteSolanaResponse, Lr as TronIndexerPath, Lt as tokenSymbol, M as NftAttribute, Mi as RPC_SIMULATE_CALLS_MAX, Mn as swapQuote, Mr as TronChainParameters, Mt as tokenList, N as NftCollection, Ni as SOLANA_RPC_METHODS, Nn as swapQuoteRequest, Nr as TronConstantCall, Nt as tokenListEntry, O as NFT_NAME_MAX, Oi as RPC_BATCH_MAX, On as bridgeQuote, Or as TronAssetIssue, Ot as TOKEN_LIST_SOURCES, P as NftCollectionRef, Pi as SolanaRpcMethod, Pn as swapQuoteResponse, Pr as TronDelegatedResource, Pt as tokenListPath, Q as nftCollectionRequest, Qi as GATEWAY_ERRORS, Qn as phishingKey, Qr as tronAccountResource, Qt as priceAssetId, R as NftFloorRequest, Ri as jsonRpcRequestId, Rn as HashList, Rr as TronIndexerTransactionRow, Rt as FIAT_CURRENCIES, S as pushUnsubscribe, Si as EvmRpcMethod, Sn as SOLANA_MAINNET, Sr as TRON_BROADCAST_PATH, St as approvalCandidate, T as NFT_ATTRIBUTE_TEXT_MAX, Ti as LOGS_ADDRESS_MAX, Tn as SwapQuoteSolanaRequest, Tr as TRON_NODE_PATHS, Tt as approvalsRequest, U as NftPage, Ui as rpcRequest, Un as encodeHashList, Ur as TronMaybeTransaction, Ut as PriceFamily, V as NftItemsRequest, Vi as rpc, Vn as decodeHashList, Vr as TronMaybeAccount, Vt as NATIVE_SLIP44, W as NftStandard, Wi as rpcResponse, Wn as hashCount, Wr as TronMaybeTransactionInfo, Wt as PriceQuote, X as nftCollectionPath, Xi as Caip2, Xn as phishingCandidates, Xr as tron, Xt as percentChange, Y as nftCollectionFits, Yi as CLIENT_ID_HEADER, Yn as PhishingListResponse, Yr as isTronIndexerPath, Yt as nativeAssetId, Z as nftCollectionRef, Zi as ClientId, Zn as phishingHash, Zr as tronAccount, Zt as priceAssetFamily, _ as pushSubscribe, _i as tronTransactionInfoResponse, _n as historyRequest, _r as esploraGet, _t as nftTokenId, a as PUSH_FAMILIES, aa as APP_ID, ai as tronChainParameters, an as tokenAssetId, ar as servedNetworksRequest, at as nftFloorResponse, b as pushSubscriptionResponse, bi as tronWitnessListResponse, bn as BridgeQuoteRequest, br as TronJsonParseError, bt as ApprovalsRequest, c as PUSH_TTL_MS, ca as appAvailability, ci as tronIndexerPageResponse, cn as HISTORY_PAGE_MAX, cr as FeeModel, ct as nftItemPath, d as PushSubscriptionRequest, da as eligibilityResponse, di as tronLog, dn as HistoryRequest, dr as NetworkInfo, dt as nftItems, ea as PROVIDERS_HEADER, ei as tronAssetIssueResponse, en as priceQuote, er as phishingListPath, et as nftCursor, f as PushSubscriptionResponse, fa as Endpoint, fi as tronMaybeBlockResponse, fn as HistoryResponse, fr as SOLANA_NETWORKS, ft as nftItemsPath, g as pushSecret, ga as parseWith, gi as tronTransactionInfo, gn as historyPath, gr as esploraBasePath, gt as nftPageFits, h as pushPath, ha as endpoint, hi as tronRewardResponse, hn as historyItem, hr as ESPLORA_ROUTES, ht as nftPage, i as PUSH_AUTH_SCHEME, ia as gatewayError, ii as tronCanDelegateMaxSizeResponse, in as pricesResponse, ir as servedNetworks, it as nftFloorRequest, j as NFT_URL_MAX, ji as RPC_SIMULATE_BLOCKS_MAX, jn as solanaInstruction, jr as TronCanDelegateMaxSize, jt as TokenListSource, k as NFT_PAGE_MAX, ki as RPC_BROADCAST_METHODS, kn as bridgeQuoteRequest, kr as TronBlock, kt as TokenListEntry, l as PushFamily, la as eligibility, li as tronIndexerTransaction, ln as HISTORY_TRANSFERS_MAX, lr as GasPricing, lt as nftItemRequest, m as pushCapabilities, ma as accepts, mi as tronPathEntry, mn as history, mr as networkById, mt as nftMediaRef, n as PUSH_APNS_BODY_KEY, na as caip2, ni as tronBlockResponse, nn as pricesPath, nr as phishingListResponse, nt as nftFloor, o as PUSH_NETWORKS_MAX, oa as AppAvailability, oi as tronConstantCallResponse, on as HISTORY_CURSOR_MAX, or as servedNetworksResponse, ot as nftItem, p as PushTransactionRequest, pa as HttpMethod, pi as tronPathAllowed, pn as HistoryTransfer, pr as TRON_NETWORKS, pt as nftItemsRequest, q as nftBalance, qi as healthRequest, qn as PHISHING_HASH_BYTES, qr as TronUnfreezeCount, qt as fiatCurrency, r as PUSH_APNS_TITLE_KEY, ra as clientId, ri as tronBroadcastResponse, rn as pricesRequest, rr as networksPath, rt as nftFloorPath, s as PUSH_PLATFORMS, sa as EligibilityResponse, si as tronDelegatedResourceResponse, sn as HISTORY_ITEMS_MAX, sr as BITCOIN_NETWORKS, st as nftItemFits, t as PUSH_ADDRESSES_MAX, ta as PROVIDER_PIN_HEADER, ti as tronBasePath, tn as prices, tr as phishingListRequest, tt as nftDetail, u as PushPlatform, ua as eligibilityRequest, ui as tronIndexerTrc20, un as HistoryItem, ur as NETWORKS, ut as nftItemSchema, v as pushSubscriptionId, vi as tronTransactionResponse, vn as historyResponse, vr as esploraPathAllowed, vt as APPROVAL_CANDIDATES_MAX, w as NFT_ATTRIBUTES_MAX, wi as FEE_HISTORY_PERCENTILES_MAX, wn as SwapQuoteResponse, wr as TRON_INDEXER_PATHS, wt as approvalsPath, x as pushTransactionRequest, xi as EVM_RPC_METHODS, xn as BridgeQuoteResponse, xr as parseTronJson, xt as ApprovalsResponse, y as pushSubscriptionRequest, yi as tronUnfreezeCountResponse, yn as historyTransfer, yr as esploraPost, yt as ApprovalCandidate, z as NftItem, zi as jsonRpcResponse, zn as applyDiff, zr as TronIndexerTrc20Row, zt as FiatCurrency } from "./index-vBgfOFIh.mjs";
|
|
2
|
+
import { _ as serializePushPlaintext, a as PUSH_ID_DOMAIN, c as PUSH_VERSION, d as PushPlaintext, f as PushTransfer, g as pushEventInput, h as pushAad, i as PUSH_EVENT_KINDS, l as PushEventKind, m as parsePushPlaintext, n as PUSH_BLOB_MAX, o as PUSH_KEYS_MAX, p as parsePushMessage, r as PUSH_EVENT_DOMAIN, s as PUSH_PLAINTEXT_MAX, t as PUSH_AAD_PREFIX, u as PushMessage } from "./push-message-AQuzoNFY.mjs";
|
|
3
|
+
export { APPROVAL_CANDIDATES_MAX, APP_ID, AppAvailability, ApprovalCandidate, ApprovalsRequest, ApprovalsResponse, BITCOIN_NETWORKS, BridgeQuoteRequest, BridgeQuoteResponse, CLIENT_ID_HEADER, Caip2, ClientId, ESPLORA_ROUTES, EVM_RPC_METHODS, EligibilityResponse, Endpoint, EvmRpcMethod, FEE_HISTORY_BLOCKS_MAX, FEE_HISTORY_PERCENTILES_MAX, FIAT_CURRENCIES, type FeeModel, FiatCurrency, GATEWAY_ERRORS, type GasPricing, GatewayErrorCode, HISTORY_CURSOR_MAX, HISTORY_ITEMS_MAX, HISTORY_PAGE_MAX, HISTORY_TRANSFERS_MAX, HashList, HistoryItem, HistoryRequest, HistoryResponse, HistoryTransfer, HttpMethod, LOGS_ADDRESS_MAX, LOGS_BLOCK_RANGE_MAX, LOGS_TOPIC_ALTERNATIVES_MAX, MAX_PRICE_ASSETS, NATIVE_SLIP44, NETWORKS, NFT_ATTRIBUTES_MAX, NFT_ATTRIBUTE_TEXT_MAX, NFT_DATA_URI_MAX, NFT_DESCRIPTION_MAX, NFT_NAME_MAX, NFT_PAGE_MAX, NFT_STANDARDS, NFT_URL_MAX, type NetworkInfo, NftAttribute, NftCollection, NftCollectionRef, NftCollectionRequest, NftDetail, NftFloor, NftFloorRequest, NftItem, NftItemRequest, NftItemsRequest, NftMediaRef, NftPage, NftStandard, PHISHING_HASH_BYTES, PHISHING_MAX_PATH_SEGMENTS, PRICE_FAMILIES, PROVIDERS_HEADER, PROVIDER_PIN_HEADER, PUSH_AAD_PREFIX, PUSH_ADDRESSES_MAX, PUSH_APNS_BODY_KEY, PUSH_APNS_TITLE_KEY, PUSH_AUTH_SCHEME, PUSH_BLOB_MAX, PUSH_EVENT_DOMAIN, PUSH_EVENT_KINDS, PUSH_FAMILIES, PUSH_ID_DOMAIN, PUSH_KEYS_MAX, PUSH_NETWORKS_MAX, PUSH_PLAINTEXT_MAX, PUSH_PLATFORMS, PUSH_TTL_MS, PUSH_VERSION, PhishingListResponse, PriceFamily, PriceQuote, PricesRequest, PricesResponse, PushEventKind, PushFamily, PushMessage, PushPlaintext, PushPlatform, PushSubscriptionRequest, PushSubscriptionResponse, PushTransactionRequest, PushTransfer, RPC_BATCH_MAX, RPC_BROADCAST_METHODS, RPC_PROOF_KEYS_MAX, RPC_SIMULATE_BLOCKS_MAX, RPC_SIMULATE_CALLS_MAX, SOLANA_MAINNET, SOLANA_NETWORKS, SOLANA_RPC_METHODS, SolanaRpcMethod, SwapQuoteRequest, SwapQuoteResponse, SwapQuoteSolanaRequest, SwapQuoteSolanaResponse, TOKEN_LIST_MAX_ENTRIES, TOKEN_LIST_SOURCES, TRON_BROADCAST_PATH, TRON_INDEXER_LIMIT_MAX, TRON_INDEXER_PATHS, TRON_NETWORKS, TRON_NODE_PATHS, TokenListEntry, TokenListResponse, TokenListSource, TronAccount, TronAccountResource, TronAssetIssue, TronBlock, TronBroadcast, TronCanDelegateMaxSize, TronChainParameters, TronConstantCall, TronDelegatedResource, TronIndexerAccount, TronIndexerPage, TronIndexerPath, TronIndexerTransactionRow, TronIndexerTrc20Row, TronJsonParseError, TronLog, TronMaybeAccount, TronMaybeBlock, TronMaybeTransaction, TronMaybeTransactionInfo, TronNodePath, TronReward, TronUnfreezeCount, TronWitnessList, ZEROX_NATIVE_TOKEN, accepts, appAvailability, applyDiff, approvalCandidate, approvals, approvalsPath, approvalsRequest, approvalsResponse, bridgeQuote, bridgeQuoteRequest, bridgeQuoteResponse, caip2, clientId, contains, containsBroadcast, decodeHashList, difference, eligibility, eligibilityRequest, eligibilityResponse, encodeHashList, endpoint, esploraBasePath, esploraGet, esploraPathAllowed, esploraPost, evmRpcRequest, fiatCurrency, fiatPrice, gatewayError, hashCount, hashList, health, healthRequest, healthResponse, history, historyItem, historyPath, historyRequest, historyResponse, historyTransfer, isTronIndexerPath, jsonRpcId, jsonRpcRequestId, jsonRpcResponse, logsFilterViolation, nativeAssetId, networkById, networksPath, nftAddressFits, nftAttribute, nftBalance, nftCollection, nftCollectionFits, nftCollectionPath, nftCollectionRef, nftCollectionRequest, nftCollectionResponse, nftCursor, nftDetail, nftFloor, nftFloorPath, nftFloorRequest, nftFloorResponse, nftItem, nftItemFits, nftItemPath, nftItemRequest, nftItemSchema, nftItems, nftItemsPath, nftItemsRequest, nftMediaRef, nftPage, nftPageFits, nftTokenId, parsePushMessage, parsePushPlaintext, parseTronJson, parseWith, percentChange, phishingCandidates, phishingHash, phishingKey, phishingList, phishingListPath, phishingListRequest, phishingListResponse, priceAssetFamily, priceAssetId, priceFamily, priceQuote, prices, pricesPath, pricesRequest, pricesResponse, pushAad, pushCapabilities, pushEventInput, pushPath, pushSecret, pushSubscribe, pushSubscriptionId, pushSubscriptionRequest, pushSubscriptionResponse, pushTransactionRequest, pushUnsubscribe, pushWatch, rpc, rpcPath, rpcRequest, rpcResponse, serializePushPlaintext, servedNetworks, servedNetworksRequest, servedNetworksResponse, solanaInstruction, solanaRpcRequest, swapQuote, swapQuoteRequest, swapQuoteResponse, swapQuoteSolana, swapQuoteSolanaRequest, swapQuoteSolanaResponse, tokenAssetId, tokenList, tokenListEntry, tokenListPath, tokenListResponse, tokenName, tokenSymbol, tron, tronAccount, tronAccountResource, tronAccountResponse, tronAssetIssueResponse, tronBasePath, tronBlockResponse, tronBroadcastResponse, tronCanDelegateMaxSizeResponse, tronChainParameters, tronConstantCallResponse, tronDelegatedResourceResponse, tronIndexerPageResponse, tronIndexerTransaction, tronIndexerTrc20, tronLog, tronMaybeBlockResponse, tronPathAllowed, tronPathEntry, tronRewardResponse, tronTransactionInfo, tronTransactionInfoResponse, tronTransactionResponse, tronUnfreezeCountResponse, tronWitnessListResponse, union };
|