@wormhole-foundation/sdk-definitions-ntt 0.1.0-beta.4 → 0.2.0-beta.1
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/cjs/layouts/index.d.ts +243 -5
- package/dist/cjs/layouts/index.d.ts.map +1 -1
- package/dist/cjs/layouts/index.js +5 -0
- package/dist/cjs/layouts/index.js.map +1 -1
- package/dist/cjs/layouts/transceiver.d.ts +2 -2
- package/dist/cjs/layouts/transfer.d.ts +2 -2
- package/dist/cjs/ntt.d.ts +66 -8
- package/dist/cjs/ntt.d.ts.map +1 -1
- package/dist/cjs/ntt.js +25 -1
- package/dist/cjs/ntt.js.map +1 -1
- package/dist/esm/layouts/index.d.ts +243 -5
- package/dist/esm/layouts/index.d.ts.map +1 -1
- package/dist/esm/layouts/index.js +5 -0
- package/dist/esm/layouts/index.js.map +1 -1
- package/dist/esm/layouts/transceiver.d.ts +2 -2
- package/dist/esm/layouts/transfer.d.ts +2 -2
- package/dist/esm/ntt.d.ts +66 -8
- package/dist/esm/ntt.d.ts.map +1 -1
- package/dist/esm/ntt.js +25 -1
- package/dist/esm/ntt.js.map +1 -1
- package/package.json +5 -5
|
@@ -73,8 +73,8 @@ export declare const nttNamedPayloads: readonly [readonly ["WormholeTransfer", r
|
|
|
73
73
|
readonly name: "recipientAddress";
|
|
74
74
|
}, {
|
|
75
75
|
readonly custom: {
|
|
76
|
-
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
77
|
-
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
76
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
77
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
78
78
|
};
|
|
79
79
|
readonly binary: "uint";
|
|
80
80
|
readonly size: 2;
|
|
@@ -82,7 +82,245 @@ export declare const nttNamedPayloads: readonly [readonly ["WormholeTransfer", r
|
|
|
82
82
|
}]>]>, import("@wormhole-foundation/sdk-base/dist/cjs").CustomizableBytesReturn<{
|
|
83
83
|
readonly name: "transceiverPayload";
|
|
84
84
|
readonly lengthSize: 2;
|
|
85
|
-
}, Uint8Array>]], readonly ["
|
|
85
|
+
}, Uint8Array>]], readonly ["WormholeTransferStandardRelayer", readonly [{
|
|
86
|
+
readonly name: "payloadId";
|
|
87
|
+
readonly binary: "uint";
|
|
88
|
+
readonly size: 1;
|
|
89
|
+
readonly custom: 1;
|
|
90
|
+
readonly omit: true;
|
|
91
|
+
}, {
|
|
92
|
+
readonly binary: "bytes";
|
|
93
|
+
readonly layout: readonly [{
|
|
94
|
+
readonly custom: {
|
|
95
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
96
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
97
|
+
};
|
|
98
|
+
readonly binary: "uint";
|
|
99
|
+
readonly size: 2;
|
|
100
|
+
readonly name: "chain";
|
|
101
|
+
}, {
|
|
102
|
+
readonly binary: "bytes";
|
|
103
|
+
readonly size: 32;
|
|
104
|
+
readonly custom: {
|
|
105
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
106
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
107
|
+
};
|
|
108
|
+
readonly name: "address";
|
|
109
|
+
}];
|
|
110
|
+
readonly name: "target";
|
|
111
|
+
}, import("@wormhole-foundation/sdk-base/dist/cjs").CustomizableBytesReturn<{
|
|
112
|
+
readonly name: "payload";
|
|
113
|
+
readonly lengthSize: 4;
|
|
114
|
+
}, readonly [{
|
|
115
|
+
readonly name: "prefix";
|
|
116
|
+
readonly binary: "bytes";
|
|
117
|
+
readonly custom: Uint8Array;
|
|
118
|
+
readonly omit: true;
|
|
119
|
+
}, {
|
|
120
|
+
readonly binary: "bytes";
|
|
121
|
+
readonly size: 32;
|
|
122
|
+
readonly custom: {
|
|
123
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
124
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
125
|
+
};
|
|
126
|
+
readonly name: "sourceNttManager";
|
|
127
|
+
}, {
|
|
128
|
+
readonly binary: "bytes";
|
|
129
|
+
readonly size: 32;
|
|
130
|
+
readonly custom: {
|
|
131
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
132
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
133
|
+
};
|
|
134
|
+
readonly name: "recipientNttManager";
|
|
135
|
+
}, import("@wormhole-foundation/sdk-base/dist/cjs").CustomizableBytesReturn<{
|
|
136
|
+
readonly name: "nttManagerPayload";
|
|
137
|
+
readonly lengthSize: 2;
|
|
138
|
+
}, readonly [{
|
|
139
|
+
readonly name: "id";
|
|
140
|
+
readonly binary: "bytes";
|
|
141
|
+
readonly size: 32;
|
|
142
|
+
}, {
|
|
143
|
+
readonly binary: "bytes";
|
|
144
|
+
readonly size: 32;
|
|
145
|
+
readonly custom: {
|
|
146
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
147
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
148
|
+
};
|
|
149
|
+
readonly name: "sender";
|
|
150
|
+
}, import("@wormhole-foundation/sdk-base/dist/cjs").CustomizableBytesReturn<{
|
|
151
|
+
readonly name: "payload";
|
|
152
|
+
readonly lengthSize: 2;
|
|
153
|
+
}, readonly [{
|
|
154
|
+
readonly name: "prefix";
|
|
155
|
+
readonly binary: "bytes";
|
|
156
|
+
readonly custom: Uint8Array;
|
|
157
|
+
readonly omit: true;
|
|
158
|
+
}, {
|
|
159
|
+
readonly binary: "bytes";
|
|
160
|
+
readonly layout: readonly [{
|
|
161
|
+
readonly name: "decimals";
|
|
162
|
+
readonly binary: "uint";
|
|
163
|
+
readonly size: 1;
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "amount";
|
|
166
|
+
readonly binary: "uint";
|
|
167
|
+
readonly size: 8;
|
|
168
|
+
}];
|
|
169
|
+
readonly name: "trimmedAmount";
|
|
170
|
+
}, {
|
|
171
|
+
readonly binary: "bytes";
|
|
172
|
+
readonly size: 32;
|
|
173
|
+
readonly custom: {
|
|
174
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
175
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
176
|
+
};
|
|
177
|
+
readonly name: "sourceToken";
|
|
178
|
+
}, {
|
|
179
|
+
readonly binary: "bytes";
|
|
180
|
+
readonly size: 32;
|
|
181
|
+
readonly custom: {
|
|
182
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
183
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
184
|
+
};
|
|
185
|
+
readonly name: "recipientAddress";
|
|
186
|
+
}, {
|
|
187
|
+
readonly custom: {
|
|
188
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
189
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
190
|
+
};
|
|
191
|
+
readonly binary: "uint";
|
|
192
|
+
readonly size: 2;
|
|
193
|
+
readonly name: "recipientChain";
|
|
194
|
+
}]>]>, import("@wormhole-foundation/sdk-base/dist/cjs").CustomizableBytesReturn<{
|
|
195
|
+
readonly name: "transceiverPayload";
|
|
196
|
+
readonly lengthSize: 2;
|
|
197
|
+
}, Uint8Array>]>, {
|
|
198
|
+
readonly binary: "uint";
|
|
199
|
+
readonly size: 32;
|
|
200
|
+
readonly name: "requestedReceiverValue";
|
|
201
|
+
}, {
|
|
202
|
+
readonly binary: "uint";
|
|
203
|
+
readonly size: 32;
|
|
204
|
+
readonly name: "extraReceiverValue";
|
|
205
|
+
}, {
|
|
206
|
+
readonly binary: "bytes";
|
|
207
|
+
readonly layout: readonly [{
|
|
208
|
+
readonly name: "size";
|
|
209
|
+
readonly binary: "uint";
|
|
210
|
+
readonly size: 4;
|
|
211
|
+
readonly custom: number;
|
|
212
|
+
readonly omit: true;
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "waste";
|
|
215
|
+
readonly binary: "uint";
|
|
216
|
+
readonly size: 31;
|
|
217
|
+
readonly custom: 0n;
|
|
218
|
+
readonly omit: true;
|
|
219
|
+
}, {
|
|
220
|
+
readonly name: "version";
|
|
221
|
+
readonly binary: "uint";
|
|
222
|
+
readonly size: 1;
|
|
223
|
+
readonly custom: 0;
|
|
224
|
+
readonly omit: true;
|
|
225
|
+
}, {
|
|
226
|
+
readonly binary: "uint";
|
|
227
|
+
readonly size: 32;
|
|
228
|
+
readonly name: "gasLimit";
|
|
229
|
+
}, {
|
|
230
|
+
readonly binary: "uint";
|
|
231
|
+
readonly size: 32;
|
|
232
|
+
readonly name: "targetChainRefundPerGasUnused";
|
|
233
|
+
}];
|
|
234
|
+
readonly name: "executionInfo";
|
|
235
|
+
}, {
|
|
236
|
+
readonly binary: "bytes";
|
|
237
|
+
readonly layout: readonly [{
|
|
238
|
+
readonly custom: {
|
|
239
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
240
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
241
|
+
};
|
|
242
|
+
readonly binary: "uint";
|
|
243
|
+
readonly size: 2;
|
|
244
|
+
readonly name: "chain";
|
|
245
|
+
}, {
|
|
246
|
+
readonly binary: "bytes";
|
|
247
|
+
readonly size: 32;
|
|
248
|
+
readonly custom: {
|
|
249
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
250
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
251
|
+
};
|
|
252
|
+
readonly name: "address";
|
|
253
|
+
}];
|
|
254
|
+
readonly name: "refund";
|
|
255
|
+
}, {
|
|
256
|
+
readonly binary: "bytes";
|
|
257
|
+
readonly size: 32;
|
|
258
|
+
readonly custom: {
|
|
259
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
260
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
261
|
+
};
|
|
262
|
+
readonly name: "refundDeliveryProvider";
|
|
263
|
+
}, {
|
|
264
|
+
readonly binary: "bytes";
|
|
265
|
+
readonly size: 32;
|
|
266
|
+
readonly custom: {
|
|
267
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
268
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
269
|
+
};
|
|
270
|
+
readonly name: "sourceDeliveryProvider";
|
|
271
|
+
}, {
|
|
272
|
+
readonly binary: "bytes";
|
|
273
|
+
readonly size: 32;
|
|
274
|
+
readonly custom: {
|
|
275
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
276
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
277
|
+
};
|
|
278
|
+
readonly name: "senderAddress";
|
|
279
|
+
}, {
|
|
280
|
+
readonly name: "messageKeys";
|
|
281
|
+
readonly binary: "array";
|
|
282
|
+
readonly lengthSize: 1;
|
|
283
|
+
readonly layout: {
|
|
284
|
+
readonly binary: "switch";
|
|
285
|
+
readonly idSize: 1;
|
|
286
|
+
readonly idTag: "keyType";
|
|
287
|
+
readonly layouts: readonly [readonly [readonly [1, "VAA"], readonly [{
|
|
288
|
+
readonly custom: {
|
|
289
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
290
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
291
|
+
};
|
|
292
|
+
readonly binary: "uint";
|
|
293
|
+
readonly size: 2;
|
|
294
|
+
readonly name: "chain";
|
|
295
|
+
}, {
|
|
296
|
+
readonly binary: "bytes";
|
|
297
|
+
readonly size: 32;
|
|
298
|
+
readonly custom: {
|
|
299
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
300
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
301
|
+
};
|
|
302
|
+
readonly name: "emitterAddress";
|
|
303
|
+
}, {
|
|
304
|
+
readonly binary: "uint";
|
|
305
|
+
readonly size: 8;
|
|
306
|
+
readonly name: "sequence";
|
|
307
|
+
}]], readonly [readonly [2, "CCTP"], readonly [{
|
|
308
|
+
readonly name: "size";
|
|
309
|
+
readonly binary: "uint";
|
|
310
|
+
readonly size: 4;
|
|
311
|
+
readonly custom: 12;
|
|
312
|
+
readonly omit: true;
|
|
313
|
+
}, {
|
|
314
|
+
readonly binary: "uint";
|
|
315
|
+
readonly size: 4;
|
|
316
|
+
readonly name: "domain";
|
|
317
|
+
}, {
|
|
318
|
+
readonly binary: "uint";
|
|
319
|
+
readonly size: 8;
|
|
320
|
+
readonly name: "nonce";
|
|
321
|
+
}]]];
|
|
322
|
+
};
|
|
323
|
+
}]], readonly ["TransceiverInfo", readonly [{
|
|
86
324
|
readonly name: "prefix";
|
|
87
325
|
readonly binary: "bytes";
|
|
88
326
|
readonly custom: Uint8Array;
|
|
@@ -118,8 +356,8 @@ export declare const nttNamedPayloads: readonly [readonly ["WormholeTransfer", r
|
|
|
118
356
|
readonly omit: true;
|
|
119
357
|
}, {
|
|
120
358
|
readonly custom: {
|
|
121
|
-
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
122
|
-
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
359
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
360
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
123
361
|
};
|
|
124
362
|
readonly binary: "uint";
|
|
125
363
|
readonly size: 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAErB,MAAM,sCAAsC,CAAC;AAM9C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBK,CAAC;AAGnC,OAAO,QAAQ,sCAAsC,CAAC;IACpD,UAAiB,gBAAgB,CAAC;QAChC,UAAU,6BACR,SAAQ,oBAAoB,CAAC,KAAK,EAAE,OAAO,gBAAgB,CAAC;SAAG;KAClE;CACF;AAED,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,eAAe,CAAC"}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.nttNamedPayloads = void 0;
|
|
18
|
+
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
18
19
|
const manager_js_1 = require("./manager.js");
|
|
19
20
|
const transceiver_js_1 = require("./transceiver.js");
|
|
20
21
|
const transfer_js_1 = require("./transfer.js");
|
|
@@ -24,6 +25,10 @@ exports.nttNamedPayloads = [
|
|
|
24
25
|
"WormholeTransfer",
|
|
25
26
|
(0, wormhole_js_1.wormholeTransceiverMessageLayout)((0, manager_js_1.nttManagerMessageLayout)(transfer_js_1.nativeTokenTransferLayout)),
|
|
26
27
|
],
|
|
28
|
+
[
|
|
29
|
+
"WormholeTransferStandardRelayer",
|
|
30
|
+
(0, sdk_definitions_1.deliveryInstructionLayout)((0, wormhole_js_1.wormholeTransceiverMessageLayout)((0, manager_js_1.nttManagerMessageLayout)(transfer_js_1.nativeTokenTransferLayout))),
|
|
31
|
+
],
|
|
27
32
|
["TransceiverInfo", transceiver_js_1.transceiverInfo],
|
|
28
33
|
["TransceiverRegistration", transceiver_js_1.transceiverRegistration],
|
|
29
34
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0EAI8C;AAC9C,6CAAuD;AACvD,qDAA4E;AAC5E,+CAA0D;AAC1D,+CAAiE;AAEpD,QAAA,gBAAgB,GAAG;IAC9B;QACE,kBAAkB;QAClB,IAAA,8CAAgC,EAC9B,IAAA,oCAAuB,EAAC,uCAAyB,CAAC,CACnD;KACF;IACD;QACE,iCAAiC;QACjC,IAAA,2CAAyB,EACvB,IAAA,8CAAgC,EAC9B,IAAA,oCAAuB,EAAC,uCAAyB,CAAC,CACnD,CACF;KACF;IACD,CAAC,iBAAiB,EAAE,gCAAe,CAAC;IACpC,CAAC,yBAAyB,EAAE,wCAAuB,CAAC;CACpB,CAAC;AAUnC,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;AAC5B,mDAAiC;AACjC,+DAA6C;AAC7C,gDAA8B;AAC9B,gDAA8B"}
|
|
@@ -68,8 +68,8 @@ export declare const transceiverRegistration: readonly [{
|
|
|
68
68
|
readonly omit: true;
|
|
69
69
|
}, {
|
|
70
70
|
readonly custom: {
|
|
71
|
-
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
72
|
-
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
71
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
72
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
73
73
|
};
|
|
74
74
|
readonly binary: "uint";
|
|
75
75
|
readonly size: 2;
|
|
@@ -36,8 +36,8 @@ export declare const nativeTokenTransferLayout: readonly [{
|
|
|
36
36
|
readonly name: "recipientAddress";
|
|
37
37
|
}, {
|
|
38
38
|
readonly custom: {
|
|
39
|
-
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
40
|
-
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
39
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
40
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
41
41
|
};
|
|
42
42
|
readonly binary: "uint";
|
|
43
43
|
readonly size: 2;
|
package/dist/cjs/ntt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Chain, type Network } from "@wormhole-foundation/sdk-base";
|
|
2
|
-
import { AccountAddress, ChainAddress, EmptyPlatformMap, ProtocolPayload, ProtocolVAA,
|
|
2
|
+
import { AccountAddress, ChainAddress, EmptyPlatformMap, ProtocolPayload, ProtocolVAA, UnsignedTransaction, VAA } from "@wormhole-foundation/sdk-definitions";
|
|
3
3
|
import { NttManagerMessage, nativeTokenTransferLayout, transceiverInfo, transceiverRegistration } from "./layouts/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* @namespace Ntt
|
|
@@ -12,7 +12,7 @@ export declare namespace Ntt {
|
|
|
12
12
|
token: string;
|
|
13
13
|
manager: string;
|
|
14
14
|
transceiver: {
|
|
15
|
-
wormhole
|
|
15
|
+
wormhole?: string;
|
|
16
16
|
};
|
|
17
17
|
quoter?: string;
|
|
18
18
|
};
|
|
@@ -27,7 +27,7 @@ export declare namespace Ntt {
|
|
|
27
27
|
/** How much native gas on the destination to send along with the transfer */
|
|
28
28
|
gasDropoff?: bigint;
|
|
29
29
|
};
|
|
30
|
-
export type Attestation =
|
|
30
|
+
export type Attestation = VAA<"Ntt:WormholeTransfer"> | VAA<"Ntt:WormholeTransferStandardRelayer">;
|
|
31
31
|
/**
|
|
32
32
|
* InboundQueuedTransfer is a queued transfer from another chain
|
|
33
33
|
* @property recipient the recipient of the transfer
|
|
@@ -48,6 +48,11 @@ export declare namespace Ntt {
|
|
|
48
48
|
index: number;
|
|
49
49
|
payload: Uint8Array;
|
|
50
50
|
};
|
|
51
|
+
export type Peer<C extends Chain> = {
|
|
52
|
+
address: ChainAddress<C>;
|
|
53
|
+
tokenDecimals: number;
|
|
54
|
+
inboundLimit: bigint;
|
|
55
|
+
};
|
|
51
56
|
export function encodeTransceiverInstructions(ixs: TransceiverInstruction[]): Uint8Array;
|
|
52
57
|
/**
|
|
53
58
|
* messageDigest hashes a message for the Ntt manager, the digest is used
|
|
@@ -57,6 +62,7 @@ export declare namespace Ntt {
|
|
|
57
62
|
* @returns a 32 byte digest of the message
|
|
58
63
|
*/
|
|
59
64
|
export function messageDigest(chain: Chain, message: Message): Uint8Array;
|
|
65
|
+
export function abiVersionMatches(targetVersion: string, abiVersion: string): boolean;
|
|
60
66
|
export {};
|
|
61
67
|
}
|
|
62
68
|
/**
|
|
@@ -69,6 +75,15 @@ export declare namespace Ntt {
|
|
|
69
75
|
* @typeparam C the chain
|
|
70
76
|
*/
|
|
71
77
|
export interface Ntt<N extends Network, C extends Chain> {
|
|
78
|
+
getMode(): Promise<Ntt.Mode>;
|
|
79
|
+
isPaused(): Promise<boolean>;
|
|
80
|
+
pause(payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
81
|
+
unpause(payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
82
|
+
getOwner(): Promise<AccountAddress<C>>;
|
|
83
|
+
getPauser(): Promise<AccountAddress<C> | null>;
|
|
84
|
+
setOwner(newOwner: AccountAddress<C>, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
85
|
+
setPauser(newOwner: AccountAddress<C>, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
86
|
+
getThreshold(): Promise<number>;
|
|
72
87
|
setPeer(peer: ChainAddress, tokenDecimals: number, inboundLimit: bigint, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
73
88
|
setWormholeTransceiverPeer(peer: ChainAddress, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
74
89
|
/** Check to see if relaying service is available for automatic transfers */
|
|
@@ -99,15 +114,36 @@ export interface Ntt<N extends Network, C extends Chain> {
|
|
|
99
114
|
getCustodyAddress(): Promise<string>;
|
|
100
115
|
/** Get the number of decimals associated with the token under management */
|
|
101
116
|
getTokenDecimals(): Promise<number>;
|
|
117
|
+
/** Get the peer information for the given chain if it exists */
|
|
118
|
+
getPeer<C extends Chain>(chain: C): Promise<Ntt.Peer<C> | null>;
|
|
119
|
+
getTransceiver(ix: number): Promise<NttTransceiver<N, C, Ntt.Attestation> | null>;
|
|
102
120
|
/**
|
|
103
121
|
* getCurrentOutboundCapacity returns the current outbound capacity of the Ntt manager
|
|
104
122
|
*/
|
|
105
123
|
getCurrentOutboundCapacity(): Promise<bigint>;
|
|
124
|
+
/**
|
|
125
|
+
* getOutboundLimit returns the maximum outbound capacity of the Ntt manager
|
|
126
|
+
*/
|
|
127
|
+
getOutboundLimit(): Promise<bigint>;
|
|
128
|
+
/**
|
|
129
|
+
* setOutboundLimit sets the maximum outbound capacity of the Ntt manager
|
|
130
|
+
*/
|
|
131
|
+
setOutboundLimit(limit: bigint, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
106
132
|
/**
|
|
107
133
|
* getCurrentInboundCapacity returns the current inbound capacity of the Ntt manager
|
|
108
134
|
* @param fromChain the chain to check the inbound capacity for
|
|
109
135
|
*/
|
|
110
136
|
getCurrentInboundCapacity(fromChain: Chain): Promise<bigint>;
|
|
137
|
+
/**
|
|
138
|
+
* getRateLimitDuration returns the duration of the rate limit for queued transfers in seconds
|
|
139
|
+
*/
|
|
140
|
+
getRateLimitDuration(): Promise<bigint>;
|
|
141
|
+
/**
|
|
142
|
+
* getInboundLimit returns the maximum inbound capacity of the Ntt manager
|
|
143
|
+
* @param fromChain the chain to check the inbound limit for
|
|
144
|
+
*/
|
|
145
|
+
getInboundLimit(fromChain: Chain): Promise<bigint>;
|
|
146
|
+
setInboundLimit(fromChain: Chain, limit: bigint, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
111
147
|
/**
|
|
112
148
|
* getIsApproved returns whether an attestation is approved
|
|
113
149
|
* an attestation is approved when it has been validated but has not necessarily
|
|
@@ -123,6 +159,11 @@ export interface Ntt<N extends Network, C extends Chain> {
|
|
|
123
159
|
* @param attestation the attestation to check
|
|
124
160
|
*/
|
|
125
161
|
getIsExecuted(attestation: Ntt.Attestation): Promise<boolean>;
|
|
162
|
+
/**
|
|
163
|
+
* getIsTransferInboundQueued returns whether the transfer is inbound queued
|
|
164
|
+
* @param attestation the attestation to check
|
|
165
|
+
*/
|
|
166
|
+
getIsTransferInboundQueued(attestation: Ntt.Attestation): Promise<boolean>;
|
|
126
167
|
/**
|
|
127
168
|
* getInboundQueuedTransfer returns the details of an inbound queued transfer
|
|
128
169
|
* @param transceiverMessage the transceiver message
|
|
@@ -131,18 +172,35 @@ export interface Ntt<N extends Network, C extends Chain> {
|
|
|
131
172
|
getInboundQueuedTransfer(fromChain: Chain, transceiverMessage: Ntt.Message): Promise<Ntt.InboundQueuedTransfer<C> | null>;
|
|
132
173
|
/**
|
|
133
174
|
* completeInboundQueuedTransfer completes an inbound queued transfer
|
|
134
|
-
* @param transceiverMessage the transceiver message
|
|
135
|
-
* @param token the token to transfer
|
|
136
175
|
* @param fromChain the chain the transfer is from
|
|
176
|
+
* @param transceiverMessage the transceiver message
|
|
137
177
|
* @param payer the address to pay for the transfer
|
|
138
178
|
*/
|
|
139
|
-
completeInboundQueuedTransfer(fromChain: Chain, transceiverMessage: Ntt.Message,
|
|
179
|
+
completeInboundQueuedTransfer(fromChain: Chain, transceiverMessage: Ntt.Message, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
180
|
+
/**
|
|
181
|
+
* Given a manager address, the rest of the addresses (token address and
|
|
182
|
+
* transceiver addresses) can be queried from the manager contract directly.
|
|
183
|
+
* This method verifies that the addresses that were used to construct the Ntt
|
|
184
|
+
* instance match the addresses that are stored in the manager contract.
|
|
185
|
+
*
|
|
186
|
+
* TODO: perhaps a better way to do this would be by allowing async protocol
|
|
187
|
+
* initializers so this can be done when constructing the Ntt instance.
|
|
188
|
+
* That would be a larger change (in the connect sdk) so we do this for now.
|
|
189
|
+
*
|
|
190
|
+
* @returns the addresses that don't match the expected addresses, or null if
|
|
191
|
+
* they all match
|
|
192
|
+
*/
|
|
193
|
+
verifyAddresses(): Promise<Partial<Ntt.Contracts> | null>;
|
|
140
194
|
}
|
|
141
195
|
export interface NttTransceiver<N extends Network, C extends Chain, A extends Ntt.Attestation> {
|
|
196
|
+
getAddress(): ChainAddress<C>;
|
|
142
197
|
/** setPeer sets a peer address for a given chain
|
|
143
198
|
* Note: Admin only
|
|
144
199
|
*/
|
|
145
|
-
setPeer(peer: ChainAddress<Chain>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
200
|
+
setPeer(peer: ChainAddress<Chain>, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
201
|
+
getPeer<C extends Chain>(chain: C): Promise<ChainAddress<C> | null>;
|
|
202
|
+
setPauser(newPauser: AccountAddress<C>, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
203
|
+
getPauser(): Promise<AccountAddress<C> | null>;
|
|
146
204
|
/**
|
|
147
205
|
* receive calls the `receive*` method on the transceiver
|
|
148
206
|
*
|
|
@@ -152,7 +210,7 @@ export interface NttTransceiver<N extends Network, C extends Chain, A extends Nt
|
|
|
152
210
|
receive(attestation: A, sender?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
153
211
|
}
|
|
154
212
|
export declare namespace WormholeNttTransceiver {
|
|
155
|
-
const _payloads: readonly ["WormholeTransfer"];
|
|
213
|
+
const _payloads: readonly ["WormholeTransfer", "WormholeTransferStandardRelayer"];
|
|
156
214
|
export type PayloadNames = (typeof _payloads)[number];
|
|
157
215
|
export type VAA<PayloadName extends PayloadNames = PayloadNames> = ProtocolVAA<Ntt.ProtocolName, PayloadName>;
|
|
158
216
|
export type Payload<PayloadName extends PayloadNames = PayloadNames> = ProtocolPayload<Ntt.ProtocolName, PayloadName>;
|
package/dist/cjs/ntt.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ntt.d.ts","sourceRoot":"","sources":["../../src/ntt.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,OAAO,EACb,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"ntt.d.ts","sourceRoot":"","sources":["../../src/ntt.ts"],"names":[],"mappings":"AAAA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,0BAA0B,CAAC,CAAC,EAAE,CAAC;YACvC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SAChB;QACD,UAAU,yBAAyB;YACjC,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;SACzC;KACF;CACF"}
|
package/dist/cjs/ntt.js
CHANGED
|
@@ -29,9 +29,33 @@ var Ntt;
|
|
|
29
29
|
return (0, sdk_definitions_1.keccak256)(sdk_base_1.encoding.bytes.concat(sdk_base_1.encoding.bignum.toBytes((0, sdk_base_1.toChainId)(chain), 2), (0, sdk_base_1.serializeLayout)((0, index_js_1.nttManagerMessageLayout)(index_js_1.nativeTokenTransferLayout), message)));
|
|
30
30
|
}
|
|
31
31
|
Ntt.messageDigest = messageDigest;
|
|
32
|
+
// Checks for compatibility between the Contract version in use on chain,
|
|
33
|
+
// and the ABI version the SDK has. Major version must match, minor version on chain
|
|
34
|
+
// should be gte SDK's ABI version.
|
|
35
|
+
//
|
|
36
|
+
// For example, if the contract is using 1.1.0, we would use 1.0.0 but not 1.2.0.
|
|
37
|
+
function abiVersionMatches(targetVersion, abiVersion) {
|
|
38
|
+
const parseVersion = (version) => {
|
|
39
|
+
// allow optional tag on patch version
|
|
40
|
+
const versionRegex = /^(\d+)\.(\d+)\.(.*)$/;
|
|
41
|
+
const match = version.match(versionRegex);
|
|
42
|
+
if (!match) {
|
|
43
|
+
throw new Error(`Invalid version format: ${version}`);
|
|
44
|
+
}
|
|
45
|
+
const [, major, minor, patchAndTag] = match;
|
|
46
|
+
return { major: Number(major), minor: Number(minor), patchAndTag };
|
|
47
|
+
};
|
|
48
|
+
const { major: majorTarget, minor: minorTarget } = parseVersion(targetVersion);
|
|
49
|
+
const { major: majorAbi, minor: minorAbi } = parseVersion(abiVersion);
|
|
50
|
+
return majorTarget === majorAbi && minorTarget >= minorAbi;
|
|
51
|
+
}
|
|
52
|
+
Ntt.abiVersionMatches = abiVersionMatches;
|
|
32
53
|
})(Ntt || (exports.Ntt = Ntt = {}));
|
|
33
54
|
var WormholeNttTransceiver;
|
|
34
55
|
(function (WormholeNttTransceiver) {
|
|
35
|
-
const _payloads = [
|
|
56
|
+
const _payloads = [
|
|
57
|
+
"WormholeTransfer",
|
|
58
|
+
"WormholeTransferStandardRelayer",
|
|
59
|
+
];
|
|
36
60
|
})(WormholeNttTransceiver || (exports.WormholeNttTransceiver = WormholeNttTransceiver = {}));
|
|
37
61
|
//# sourceMappingURL=ntt.js.map
|
package/dist/cjs/ntt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ntt.js","sourceRoot":"","sources":["../../src/ntt.ts"],"names":[],"mappings":";;;AAAA,4DAMuC;AAEvC,0EAS8C;AAE9C,iDAO4B;AAE5B;;GAEG;AACH,IAAiB,GAAG,
|
|
1
|
+
{"version":3,"file":"ntt.js","sourceRoot":"","sources":["../../src/ntt.ts"],"names":[],"mappings":";;;AAAA,4DAMuC;AAEvC,0EAS8C;AAE9C,iDAO4B;AAE5B;;GAEG;AACH,IAAiB,GAAG,CAsHnB;AAtHD,WAAiB,GAAG;IAClB,MAAM,SAAS,GAAG,KAAK,CAAC;IA+DxB,wEAAwE;IACxE,sDAAsD;IACtD,SAAgB,6BAA6B,CAAC,GAA6B;QACzE,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG;YAClB,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;QAC3D,OAAO,mBAAQ,CAAC,KAAK,CAAC,MAAM,CAC1B,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAC5B,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,0BAAe,EAAC,IAAA,uCAA4B,GAAE,EAAE,EAAE,CAAC,CAAC,CACxE,CAAC;IACJ,CAAC;IAPe,iCAA6B,gCAO5C,CAAA;IAED;;;;;;OAMG;IACH,SA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BAAiB,oBAkBhC,CAAA;AACH,CAAC,EAtHgB,GAAG,mBAAH,GAAG,QAsHnB;AAiOD,IAAiB,sBAAsB,CAUtC;AAVD,WAAiB,sBAAsB;IACrC,MAAM,SAAS,GAAG;QAChB,kBAAkB;QAClB,iCAAiC;KACzB,CAAC;AAMb,CAAC,EAVgB,sBAAsB,sCAAtB,sBAAsB,QAUtC"}
|
|
@@ -73,8 +73,8 @@ export declare const nttNamedPayloads: readonly [readonly ["WormholeTransfer", r
|
|
|
73
73
|
readonly name: "recipientAddress";
|
|
74
74
|
}, {
|
|
75
75
|
readonly custom: {
|
|
76
|
-
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
77
|
-
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
76
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
77
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
78
78
|
};
|
|
79
79
|
readonly binary: "uint";
|
|
80
80
|
readonly size: 2;
|
|
@@ -82,7 +82,245 @@ export declare const nttNamedPayloads: readonly [readonly ["WormholeTransfer", r
|
|
|
82
82
|
}]>]>, import("@wormhole-foundation/sdk-base").CustomizableBytesReturn<{
|
|
83
83
|
readonly name: "transceiverPayload";
|
|
84
84
|
readonly lengthSize: 2;
|
|
85
|
-
}, Uint8Array>]], readonly ["
|
|
85
|
+
}, Uint8Array>]], readonly ["WormholeTransferStandardRelayer", readonly [{
|
|
86
|
+
readonly name: "payloadId";
|
|
87
|
+
readonly binary: "uint";
|
|
88
|
+
readonly size: 1;
|
|
89
|
+
readonly custom: 1;
|
|
90
|
+
readonly omit: true;
|
|
91
|
+
}, {
|
|
92
|
+
readonly binary: "bytes";
|
|
93
|
+
readonly layout: readonly [{
|
|
94
|
+
readonly custom: {
|
|
95
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
96
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
97
|
+
};
|
|
98
|
+
readonly binary: "uint";
|
|
99
|
+
readonly size: 2;
|
|
100
|
+
readonly name: "chain";
|
|
101
|
+
}, {
|
|
102
|
+
readonly binary: "bytes";
|
|
103
|
+
readonly size: 32;
|
|
104
|
+
readonly custom: {
|
|
105
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
106
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
107
|
+
};
|
|
108
|
+
readonly name: "address";
|
|
109
|
+
}];
|
|
110
|
+
readonly name: "target";
|
|
111
|
+
}, import("@wormhole-foundation/sdk-base").CustomizableBytesReturn<{
|
|
112
|
+
readonly name: "payload";
|
|
113
|
+
readonly lengthSize: 4;
|
|
114
|
+
}, readonly [{
|
|
115
|
+
readonly name: "prefix";
|
|
116
|
+
readonly binary: "bytes";
|
|
117
|
+
readonly custom: Uint8Array;
|
|
118
|
+
readonly omit: true;
|
|
119
|
+
}, {
|
|
120
|
+
readonly binary: "bytes";
|
|
121
|
+
readonly size: 32;
|
|
122
|
+
readonly custom: {
|
|
123
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
124
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
125
|
+
};
|
|
126
|
+
readonly name: "sourceNttManager";
|
|
127
|
+
}, {
|
|
128
|
+
readonly binary: "bytes";
|
|
129
|
+
readonly size: 32;
|
|
130
|
+
readonly custom: {
|
|
131
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
132
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
133
|
+
};
|
|
134
|
+
readonly name: "recipientNttManager";
|
|
135
|
+
}, import("@wormhole-foundation/sdk-base").CustomizableBytesReturn<{
|
|
136
|
+
readonly name: "nttManagerPayload";
|
|
137
|
+
readonly lengthSize: 2;
|
|
138
|
+
}, readonly [{
|
|
139
|
+
readonly name: "id";
|
|
140
|
+
readonly binary: "bytes";
|
|
141
|
+
readonly size: 32;
|
|
142
|
+
}, {
|
|
143
|
+
readonly binary: "bytes";
|
|
144
|
+
readonly size: 32;
|
|
145
|
+
readonly custom: {
|
|
146
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
147
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
148
|
+
};
|
|
149
|
+
readonly name: "sender";
|
|
150
|
+
}, import("@wormhole-foundation/sdk-base").CustomizableBytesReturn<{
|
|
151
|
+
readonly name: "payload";
|
|
152
|
+
readonly lengthSize: 2;
|
|
153
|
+
}, readonly [{
|
|
154
|
+
readonly name: "prefix";
|
|
155
|
+
readonly binary: "bytes";
|
|
156
|
+
readonly custom: Uint8Array;
|
|
157
|
+
readonly omit: true;
|
|
158
|
+
}, {
|
|
159
|
+
readonly binary: "bytes";
|
|
160
|
+
readonly layout: readonly [{
|
|
161
|
+
readonly name: "decimals";
|
|
162
|
+
readonly binary: "uint";
|
|
163
|
+
readonly size: 1;
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "amount";
|
|
166
|
+
readonly binary: "uint";
|
|
167
|
+
readonly size: 8;
|
|
168
|
+
}];
|
|
169
|
+
readonly name: "trimmedAmount";
|
|
170
|
+
}, {
|
|
171
|
+
readonly binary: "bytes";
|
|
172
|
+
readonly size: 32;
|
|
173
|
+
readonly custom: {
|
|
174
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
175
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
176
|
+
};
|
|
177
|
+
readonly name: "sourceToken";
|
|
178
|
+
}, {
|
|
179
|
+
readonly binary: "bytes";
|
|
180
|
+
readonly size: 32;
|
|
181
|
+
readonly custom: {
|
|
182
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
183
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
184
|
+
};
|
|
185
|
+
readonly name: "recipientAddress";
|
|
186
|
+
}, {
|
|
187
|
+
readonly custom: {
|
|
188
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
189
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
190
|
+
};
|
|
191
|
+
readonly binary: "uint";
|
|
192
|
+
readonly size: 2;
|
|
193
|
+
readonly name: "recipientChain";
|
|
194
|
+
}]>]>, import("@wormhole-foundation/sdk-base").CustomizableBytesReturn<{
|
|
195
|
+
readonly name: "transceiverPayload";
|
|
196
|
+
readonly lengthSize: 2;
|
|
197
|
+
}, Uint8Array>]>, {
|
|
198
|
+
readonly binary: "uint";
|
|
199
|
+
readonly size: 32;
|
|
200
|
+
readonly name: "requestedReceiverValue";
|
|
201
|
+
}, {
|
|
202
|
+
readonly binary: "uint";
|
|
203
|
+
readonly size: 32;
|
|
204
|
+
readonly name: "extraReceiverValue";
|
|
205
|
+
}, {
|
|
206
|
+
readonly binary: "bytes";
|
|
207
|
+
readonly layout: readonly [{
|
|
208
|
+
readonly name: "size";
|
|
209
|
+
readonly binary: "uint";
|
|
210
|
+
readonly size: 4;
|
|
211
|
+
readonly custom: number;
|
|
212
|
+
readonly omit: true;
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "waste";
|
|
215
|
+
readonly binary: "uint";
|
|
216
|
+
readonly size: 31;
|
|
217
|
+
readonly custom: 0n;
|
|
218
|
+
readonly omit: true;
|
|
219
|
+
}, {
|
|
220
|
+
readonly name: "version";
|
|
221
|
+
readonly binary: "uint";
|
|
222
|
+
readonly size: 1;
|
|
223
|
+
readonly custom: 0;
|
|
224
|
+
readonly omit: true;
|
|
225
|
+
}, {
|
|
226
|
+
readonly binary: "uint";
|
|
227
|
+
readonly size: 32;
|
|
228
|
+
readonly name: "gasLimit";
|
|
229
|
+
}, {
|
|
230
|
+
readonly binary: "uint";
|
|
231
|
+
readonly size: 32;
|
|
232
|
+
readonly name: "targetChainRefundPerGasUnused";
|
|
233
|
+
}];
|
|
234
|
+
readonly name: "executionInfo";
|
|
235
|
+
}, {
|
|
236
|
+
readonly binary: "bytes";
|
|
237
|
+
readonly layout: readonly [{
|
|
238
|
+
readonly custom: {
|
|
239
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
240
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
241
|
+
};
|
|
242
|
+
readonly binary: "uint";
|
|
243
|
+
readonly size: 2;
|
|
244
|
+
readonly name: "chain";
|
|
245
|
+
}, {
|
|
246
|
+
readonly binary: "bytes";
|
|
247
|
+
readonly size: 32;
|
|
248
|
+
readonly custom: {
|
|
249
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
250
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
251
|
+
};
|
|
252
|
+
readonly name: "address";
|
|
253
|
+
}];
|
|
254
|
+
readonly name: "refund";
|
|
255
|
+
}, {
|
|
256
|
+
readonly binary: "bytes";
|
|
257
|
+
readonly size: 32;
|
|
258
|
+
readonly custom: {
|
|
259
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
260
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
261
|
+
};
|
|
262
|
+
readonly name: "refundDeliveryProvider";
|
|
263
|
+
}, {
|
|
264
|
+
readonly binary: "bytes";
|
|
265
|
+
readonly size: 32;
|
|
266
|
+
readonly custom: {
|
|
267
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
268
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
269
|
+
};
|
|
270
|
+
readonly name: "sourceDeliveryProvider";
|
|
271
|
+
}, {
|
|
272
|
+
readonly binary: "bytes";
|
|
273
|
+
readonly size: 32;
|
|
274
|
+
readonly custom: {
|
|
275
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
276
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
277
|
+
};
|
|
278
|
+
readonly name: "senderAddress";
|
|
279
|
+
}, {
|
|
280
|
+
readonly name: "messageKeys";
|
|
281
|
+
readonly binary: "array";
|
|
282
|
+
readonly lengthSize: 1;
|
|
283
|
+
readonly layout: {
|
|
284
|
+
readonly binary: "switch";
|
|
285
|
+
readonly idSize: 1;
|
|
286
|
+
readonly idTag: "keyType";
|
|
287
|
+
readonly layouts: readonly [readonly [readonly [1, "VAA"], readonly [{
|
|
288
|
+
readonly custom: {
|
|
289
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
290
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
291
|
+
};
|
|
292
|
+
readonly binary: "uint";
|
|
293
|
+
readonly size: 2;
|
|
294
|
+
readonly name: "chain";
|
|
295
|
+
}, {
|
|
296
|
+
readonly binary: "bytes";
|
|
297
|
+
readonly size: 32;
|
|
298
|
+
readonly custom: {
|
|
299
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
300
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
301
|
+
};
|
|
302
|
+
readonly name: "emitterAddress";
|
|
303
|
+
}, {
|
|
304
|
+
readonly binary: "uint";
|
|
305
|
+
readonly size: 8;
|
|
306
|
+
readonly name: "sequence";
|
|
307
|
+
}]], readonly [readonly [2, "CCTP"], readonly [{
|
|
308
|
+
readonly name: "size";
|
|
309
|
+
readonly binary: "uint";
|
|
310
|
+
readonly size: 4;
|
|
311
|
+
readonly custom: 12;
|
|
312
|
+
readonly omit: true;
|
|
313
|
+
}, {
|
|
314
|
+
readonly binary: "uint";
|
|
315
|
+
readonly size: 4;
|
|
316
|
+
readonly name: "domain";
|
|
317
|
+
}, {
|
|
318
|
+
readonly binary: "uint";
|
|
319
|
+
readonly size: 8;
|
|
320
|
+
readonly name: "nonce";
|
|
321
|
+
}]]];
|
|
322
|
+
};
|
|
323
|
+
}]], readonly ["TransceiverInfo", readonly [{
|
|
86
324
|
readonly name: "prefix";
|
|
87
325
|
readonly binary: "bytes";
|
|
88
326
|
readonly custom: Uint8Array;
|
|
@@ -118,8 +356,8 @@ export declare const nttNamedPayloads: readonly [readonly ["WormholeTransfer", r
|
|
|
118
356
|
readonly omit: true;
|
|
119
357
|
}, {
|
|
120
358
|
readonly custom: {
|
|
121
|
-
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
122
|
-
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
359
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
360
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
123
361
|
};
|
|
124
362
|
readonly binary: "uint";
|
|
125
363
|
readonly size: 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EAErB,MAAM,sCAAsC,CAAC;AAM9C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBK,CAAC;AAGnC,OAAO,QAAQ,sCAAsC,CAAC;IACpD,UAAiB,gBAAgB,CAAC;QAChC,UAAU,6BACR,SAAQ,oBAAoB,CAAC,KAAK,EAAE,OAAO,gBAAgB,CAAC;SAAG;KAClE;CACF;AAED,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,eAAe,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { deliveryInstructionLayout, } from "@wormhole-foundation/sdk-definitions";
|
|
1
2
|
import { nttManagerMessageLayout } from "./manager.js";
|
|
2
3
|
import { transceiverInfo, transceiverRegistration } from "./transceiver.js";
|
|
3
4
|
import { nativeTokenTransferLayout } from "./transfer.js";
|
|
@@ -7,6 +8,10 @@ export const nttNamedPayloads = [
|
|
|
7
8
|
"WormholeTransfer",
|
|
8
9
|
wormholeTransceiverMessageLayout(nttManagerMessageLayout(nativeTokenTransferLayout)),
|
|
9
10
|
],
|
|
11
|
+
[
|
|
12
|
+
"WormholeTransferStandardRelayer",
|
|
13
|
+
deliveryInstructionLayout(wormholeTransceiverMessageLayout(nttManagerMessageLayout(nativeTokenTransferLayout))),
|
|
14
|
+
],
|
|
10
15
|
["TransceiverInfo", transceiverInfo],
|
|
11
16
|
["TransceiverRegistration", transceiverRegistration],
|
|
12
17
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,yBAAyB,GAC1B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;QACE,kBAAkB;QAClB,gCAAgC,CAC9B,uBAAuB,CAAC,yBAAyB,CAAC,CACnD;KACF;IACD;QACE,iCAAiC;QACjC,yBAAyB,CACvB,gCAAgC,CAC9B,uBAAuB,CAAC,yBAAyB,CAAC,CACnD,CACF;KACF;IACD,CAAC,iBAAiB,EAAE,eAAe,CAAC;IACpC,CAAC,yBAAyB,EAAE,uBAAuB,CAAC;CACpB,CAAC;AAUnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
|
@@ -68,8 +68,8 @@ export declare const transceiverRegistration: readonly [{
|
|
|
68
68
|
readonly omit: true;
|
|
69
69
|
}, {
|
|
70
70
|
readonly custom: {
|
|
71
|
-
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
72
|
-
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
71
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
72
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
73
73
|
};
|
|
74
74
|
readonly binary: "uint";
|
|
75
75
|
readonly size: 2;
|
|
@@ -36,8 +36,8 @@ export declare const nativeTokenTransferLayout: readonly [{
|
|
|
36
36
|
readonly name: "recipientAddress";
|
|
37
37
|
}, {
|
|
38
38
|
readonly custom: {
|
|
39
|
-
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
40
|
-
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
39
|
+
to: (val: number) => "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
40
|
+
from: (val: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Scroll" | "Mantle" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
41
41
|
};
|
|
42
42
|
readonly binary: "uint";
|
|
43
43
|
readonly size: 2;
|
package/dist/esm/ntt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Chain, type Network } from "@wormhole-foundation/sdk-base";
|
|
2
|
-
import { AccountAddress, ChainAddress, EmptyPlatformMap, ProtocolPayload, ProtocolVAA,
|
|
2
|
+
import { AccountAddress, ChainAddress, EmptyPlatformMap, ProtocolPayload, ProtocolVAA, UnsignedTransaction, VAA } from "@wormhole-foundation/sdk-definitions";
|
|
3
3
|
import { NttManagerMessage, nativeTokenTransferLayout, transceiverInfo, transceiverRegistration } from "./layouts/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* @namespace Ntt
|
|
@@ -12,7 +12,7 @@ export declare namespace Ntt {
|
|
|
12
12
|
token: string;
|
|
13
13
|
manager: string;
|
|
14
14
|
transceiver: {
|
|
15
|
-
wormhole
|
|
15
|
+
wormhole?: string;
|
|
16
16
|
};
|
|
17
17
|
quoter?: string;
|
|
18
18
|
};
|
|
@@ -27,7 +27,7 @@ export declare namespace Ntt {
|
|
|
27
27
|
/** How much native gas on the destination to send along with the transfer */
|
|
28
28
|
gasDropoff?: bigint;
|
|
29
29
|
};
|
|
30
|
-
export type Attestation =
|
|
30
|
+
export type Attestation = VAA<"Ntt:WormholeTransfer"> | VAA<"Ntt:WormholeTransferStandardRelayer">;
|
|
31
31
|
/**
|
|
32
32
|
* InboundQueuedTransfer is a queued transfer from another chain
|
|
33
33
|
* @property recipient the recipient of the transfer
|
|
@@ -48,6 +48,11 @@ export declare namespace Ntt {
|
|
|
48
48
|
index: number;
|
|
49
49
|
payload: Uint8Array;
|
|
50
50
|
};
|
|
51
|
+
export type Peer<C extends Chain> = {
|
|
52
|
+
address: ChainAddress<C>;
|
|
53
|
+
tokenDecimals: number;
|
|
54
|
+
inboundLimit: bigint;
|
|
55
|
+
};
|
|
51
56
|
export function encodeTransceiverInstructions(ixs: TransceiverInstruction[]): Uint8Array;
|
|
52
57
|
/**
|
|
53
58
|
* messageDigest hashes a message for the Ntt manager, the digest is used
|
|
@@ -57,6 +62,7 @@ export declare namespace Ntt {
|
|
|
57
62
|
* @returns a 32 byte digest of the message
|
|
58
63
|
*/
|
|
59
64
|
export function messageDigest(chain: Chain, message: Message): Uint8Array;
|
|
65
|
+
export function abiVersionMatches(targetVersion: string, abiVersion: string): boolean;
|
|
60
66
|
export {};
|
|
61
67
|
}
|
|
62
68
|
/**
|
|
@@ -69,6 +75,15 @@ export declare namespace Ntt {
|
|
|
69
75
|
* @typeparam C the chain
|
|
70
76
|
*/
|
|
71
77
|
export interface Ntt<N extends Network, C extends Chain> {
|
|
78
|
+
getMode(): Promise<Ntt.Mode>;
|
|
79
|
+
isPaused(): Promise<boolean>;
|
|
80
|
+
pause(payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
81
|
+
unpause(payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
82
|
+
getOwner(): Promise<AccountAddress<C>>;
|
|
83
|
+
getPauser(): Promise<AccountAddress<C> | null>;
|
|
84
|
+
setOwner(newOwner: AccountAddress<C>, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
85
|
+
setPauser(newOwner: AccountAddress<C>, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
86
|
+
getThreshold(): Promise<number>;
|
|
72
87
|
setPeer(peer: ChainAddress, tokenDecimals: number, inboundLimit: bigint, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
73
88
|
setWormholeTransceiverPeer(peer: ChainAddress, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
74
89
|
/** Check to see if relaying service is available for automatic transfers */
|
|
@@ -99,15 +114,36 @@ export interface Ntt<N extends Network, C extends Chain> {
|
|
|
99
114
|
getCustodyAddress(): Promise<string>;
|
|
100
115
|
/** Get the number of decimals associated with the token under management */
|
|
101
116
|
getTokenDecimals(): Promise<number>;
|
|
117
|
+
/** Get the peer information for the given chain if it exists */
|
|
118
|
+
getPeer<C extends Chain>(chain: C): Promise<Ntt.Peer<C> | null>;
|
|
119
|
+
getTransceiver(ix: number): Promise<NttTransceiver<N, C, Ntt.Attestation> | null>;
|
|
102
120
|
/**
|
|
103
121
|
* getCurrentOutboundCapacity returns the current outbound capacity of the Ntt manager
|
|
104
122
|
*/
|
|
105
123
|
getCurrentOutboundCapacity(): Promise<bigint>;
|
|
124
|
+
/**
|
|
125
|
+
* getOutboundLimit returns the maximum outbound capacity of the Ntt manager
|
|
126
|
+
*/
|
|
127
|
+
getOutboundLimit(): Promise<bigint>;
|
|
128
|
+
/**
|
|
129
|
+
* setOutboundLimit sets the maximum outbound capacity of the Ntt manager
|
|
130
|
+
*/
|
|
131
|
+
setOutboundLimit(limit: bigint, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
106
132
|
/**
|
|
107
133
|
* getCurrentInboundCapacity returns the current inbound capacity of the Ntt manager
|
|
108
134
|
* @param fromChain the chain to check the inbound capacity for
|
|
109
135
|
*/
|
|
110
136
|
getCurrentInboundCapacity(fromChain: Chain): Promise<bigint>;
|
|
137
|
+
/**
|
|
138
|
+
* getRateLimitDuration returns the duration of the rate limit for queued transfers in seconds
|
|
139
|
+
*/
|
|
140
|
+
getRateLimitDuration(): Promise<bigint>;
|
|
141
|
+
/**
|
|
142
|
+
* getInboundLimit returns the maximum inbound capacity of the Ntt manager
|
|
143
|
+
* @param fromChain the chain to check the inbound limit for
|
|
144
|
+
*/
|
|
145
|
+
getInboundLimit(fromChain: Chain): Promise<bigint>;
|
|
146
|
+
setInboundLimit(fromChain: Chain, limit: bigint, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
111
147
|
/**
|
|
112
148
|
* getIsApproved returns whether an attestation is approved
|
|
113
149
|
* an attestation is approved when it has been validated but has not necessarily
|
|
@@ -123,6 +159,11 @@ export interface Ntt<N extends Network, C extends Chain> {
|
|
|
123
159
|
* @param attestation the attestation to check
|
|
124
160
|
*/
|
|
125
161
|
getIsExecuted(attestation: Ntt.Attestation): Promise<boolean>;
|
|
162
|
+
/**
|
|
163
|
+
* getIsTransferInboundQueued returns whether the transfer is inbound queued
|
|
164
|
+
* @param attestation the attestation to check
|
|
165
|
+
*/
|
|
166
|
+
getIsTransferInboundQueued(attestation: Ntt.Attestation): Promise<boolean>;
|
|
126
167
|
/**
|
|
127
168
|
* getInboundQueuedTransfer returns the details of an inbound queued transfer
|
|
128
169
|
* @param transceiverMessage the transceiver message
|
|
@@ -131,18 +172,35 @@ export interface Ntt<N extends Network, C extends Chain> {
|
|
|
131
172
|
getInboundQueuedTransfer(fromChain: Chain, transceiverMessage: Ntt.Message): Promise<Ntt.InboundQueuedTransfer<C> | null>;
|
|
132
173
|
/**
|
|
133
174
|
* completeInboundQueuedTransfer completes an inbound queued transfer
|
|
134
|
-
* @param transceiverMessage the transceiver message
|
|
135
|
-
* @param token the token to transfer
|
|
136
175
|
* @param fromChain the chain the transfer is from
|
|
176
|
+
* @param transceiverMessage the transceiver message
|
|
137
177
|
* @param payer the address to pay for the transfer
|
|
138
178
|
*/
|
|
139
|
-
completeInboundQueuedTransfer(fromChain: Chain, transceiverMessage: Ntt.Message,
|
|
179
|
+
completeInboundQueuedTransfer(fromChain: Chain, transceiverMessage: Ntt.Message, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
180
|
+
/**
|
|
181
|
+
* Given a manager address, the rest of the addresses (token address and
|
|
182
|
+
* transceiver addresses) can be queried from the manager contract directly.
|
|
183
|
+
* This method verifies that the addresses that were used to construct the Ntt
|
|
184
|
+
* instance match the addresses that are stored in the manager contract.
|
|
185
|
+
*
|
|
186
|
+
* TODO: perhaps a better way to do this would be by allowing async protocol
|
|
187
|
+
* initializers so this can be done when constructing the Ntt instance.
|
|
188
|
+
* That would be a larger change (in the connect sdk) so we do this for now.
|
|
189
|
+
*
|
|
190
|
+
* @returns the addresses that don't match the expected addresses, or null if
|
|
191
|
+
* they all match
|
|
192
|
+
*/
|
|
193
|
+
verifyAddresses(): Promise<Partial<Ntt.Contracts> | null>;
|
|
140
194
|
}
|
|
141
195
|
export interface NttTransceiver<N extends Network, C extends Chain, A extends Ntt.Attestation> {
|
|
196
|
+
getAddress(): ChainAddress<C>;
|
|
142
197
|
/** setPeer sets a peer address for a given chain
|
|
143
198
|
* Note: Admin only
|
|
144
199
|
*/
|
|
145
|
-
setPeer(peer: ChainAddress<Chain>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
200
|
+
setPeer(peer: ChainAddress<Chain>, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
201
|
+
getPeer<C extends Chain>(chain: C): Promise<ChainAddress<C> | null>;
|
|
202
|
+
setPauser(newPauser: AccountAddress<C>, payer?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
203
|
+
getPauser(): Promise<AccountAddress<C> | null>;
|
|
146
204
|
/**
|
|
147
205
|
* receive calls the `receive*` method on the transceiver
|
|
148
206
|
*
|
|
@@ -152,7 +210,7 @@ export interface NttTransceiver<N extends Network, C extends Chain, A extends Nt
|
|
|
152
210
|
receive(attestation: A, sender?: AccountAddress<C>): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
153
211
|
}
|
|
154
212
|
export declare namespace WormholeNttTransceiver {
|
|
155
|
-
const _payloads: readonly ["WormholeTransfer"];
|
|
213
|
+
const _payloads: readonly ["WormholeTransfer", "WormholeTransferStandardRelayer"];
|
|
156
214
|
export type PayloadNames = (typeof _payloads)[number];
|
|
157
215
|
export type VAA<PayloadName extends PayloadNames = PayloadNames> = ProtocolVAA<Ntt.ProtocolName, PayloadName>;
|
|
158
216
|
export type Payload<PayloadName extends PayloadNames = PayloadNames> = ProtocolPayload<Ntt.ProtocolName, PayloadName>;
|
package/dist/esm/ntt.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ntt.d.ts","sourceRoot":"","sources":["../../src/ntt.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,OAAO,EACb,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"ntt.d.ts","sourceRoot":"","sources":["../../src/ntt.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,KAAK,EACV,KAAK,OAAO,EACb,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,GAAG,EAEJ,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EAEzB,eAAe,EAEf,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,yBAAiB,GAAG,CAAC;IACnB,MAAM,SAAS,QAAQ,CAAC;IACxB,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC;IAE5C,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,SAAS,CAAC;IACzC,MAAM,MAAM,SAAS,GAAG;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAA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mB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;CAC9C;AAED,yBAAiB,sBAAsB,CAAC;IACtC,MAAM,SAAS,kEAGL,CAAC;IACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG,CAAC,WAAW,SAAS,YAAY,GAAG,YAAY,IAC7D,WAAW,CAAC,GAAG,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IAC7C,MAAM,MAAM,OAAO,CAAC,WAAW,SAAS,YAAY,GAAG,YAAY,IACjE,eAAe,CAAC,GAAG,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;;CAClD;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,OAAO,EAAE,CAAC,SAAS,KAAK,CACxE,SAAQ,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,sBAAsB,CAAC,GAAG,CAAC;CAAG;AAE7D,OAAO,QAAQ,sCAAsC,CAAC;IACpD,UAAiB,gBAAgB,CAAC;QAChC,UAAU,0BAA0B,CAAC,CAAC,EAAE,CAAC;YACvC,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SAChB;QACD,UAAU,yBAAyB;YACjC,GAAG,EAAE,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;SACzC;KACF;CACF"}
|
package/dist/esm/ntt.js
CHANGED
|
@@ -26,9 +26,33 @@ export var Ntt;
|
|
|
26
26
|
return keccak256(encoding.bytes.concat(encoding.bignum.toBytes(toChainId(chain), 2), serializeLayout(nttManagerMessageLayout(nativeTokenTransferLayout), message)));
|
|
27
27
|
}
|
|
28
28
|
Ntt.messageDigest = messageDigest;
|
|
29
|
+
// Checks for compatibility between the Contract version in use on chain,
|
|
30
|
+
// and the ABI version the SDK has. Major version must match, minor version on chain
|
|
31
|
+
// should be gte SDK's ABI version.
|
|
32
|
+
//
|
|
33
|
+
// For example, if the contract is using 1.1.0, we would use 1.0.0 but not 1.2.0.
|
|
34
|
+
function abiVersionMatches(targetVersion, abiVersion) {
|
|
35
|
+
const parseVersion = (version) => {
|
|
36
|
+
// allow optional tag on patch version
|
|
37
|
+
const versionRegex = /^(\d+)\.(\d+)\.(.*)$/;
|
|
38
|
+
const match = version.match(versionRegex);
|
|
39
|
+
if (!match) {
|
|
40
|
+
throw new Error(`Invalid version format: ${version}`);
|
|
41
|
+
}
|
|
42
|
+
const [, major, minor, patchAndTag] = match;
|
|
43
|
+
return { major: Number(major), minor: Number(minor), patchAndTag };
|
|
44
|
+
};
|
|
45
|
+
const { major: majorTarget, minor: minorTarget } = parseVersion(targetVersion);
|
|
46
|
+
const { major: majorAbi, minor: minorAbi } = parseVersion(abiVersion);
|
|
47
|
+
return majorTarget === majorAbi && minorTarget >= minorAbi;
|
|
48
|
+
}
|
|
49
|
+
Ntt.abiVersionMatches = abiVersionMatches;
|
|
29
50
|
})(Ntt || (Ntt = {}));
|
|
30
51
|
export var WormholeNttTransceiver;
|
|
31
52
|
(function (WormholeNttTransceiver) {
|
|
32
|
-
const _payloads = [
|
|
53
|
+
const _payloads = [
|
|
54
|
+
"WormholeTransfer",
|
|
55
|
+
"WormholeTransferStandardRelayer",
|
|
56
|
+
];
|
|
33
57
|
})(WormholeNttTransceiver || (WormholeNttTransceiver = {}));
|
|
34
58
|
//# sourceMappingURL=ntt.js.map
|
package/dist/esm/ntt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ntt.js","sourceRoot":"","sources":["../../src/ntt.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,SAAS,GAGV,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAQL,SAAS,GACV,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAEL,yBAAyB,EACzB,uBAAuB,EAEvB,4BAA4B,GAE7B,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH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+
"version": "0.2.0-beta.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git"
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"test": "jest --config ./jest.config.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@wormhole-foundation/sdk-base": "^0.
|
|
53
|
-
"@wormhole-foundation/sdk-definitions": "^0.
|
|
52
|
+
"@wormhole-foundation/sdk-base": "^0.9.1",
|
|
53
|
+
"@wormhole-foundation/sdk-definitions": "^0.9.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@wormhole-foundation/sdk-base": "^0.
|
|
57
|
-
"@wormhole-foundation/sdk-definitions": "^0.
|
|
56
|
+
"@wormhole-foundation/sdk-base": "^0.9.1",
|
|
57
|
+
"@wormhole-foundation/sdk-definitions": "^0.9.1"
|
|
58
58
|
},
|
|
59
59
|
"type": "module"
|
|
60
60
|
}
|