@wormhole-foundation/sdk-definitions 0.11.0 → 0.12.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/dist/cjs/protocols/portico/portico.d.ts +14 -4
- package/dist/cjs/protocols/portico/portico.d.ts.map +1 -1
- package/dist/cjs/protocols/portico/portico.js.map +1 -1
- package/dist/cjs/protocols/portico/porticoLayout.d.ts +115 -23
- package/dist/cjs/protocols/portico/porticoLayout.d.ts.map +1 -1
- package/dist/cjs/protocols/portico/porticoLayout.js +4 -1
- package/dist/cjs/protocols/portico/porticoLayout.js.map +1 -1
- package/dist/esm/protocols/portico/portico.d.ts +14 -4
- package/dist/esm/protocols/portico/portico.d.ts.map +1 -1
- package/dist/esm/protocols/portico/portico.js.map +1 -1
- package/dist/esm/protocols/portico/porticoLayout.d.ts +115 -23
- package/dist/esm/protocols/portico/porticoLayout.d.ts.map +1 -1
- package/dist/esm/protocols/portico/porticoLayout.js +4 -1
- package/dist/esm/protocols/portico/porticoLayout.js.map +1 -1
- package/package.json +2 -2
|
@@ -23,7 +23,6 @@ export declare namespace PorticoBridge {
|
|
|
23
23
|
export interface SwapAmounts {
|
|
24
24
|
minAmountStart: bigint;
|
|
25
25
|
minAmountFinish: bigint;
|
|
26
|
-
amountFinish: bigint;
|
|
27
26
|
}
|
|
28
27
|
export type Quote = {
|
|
29
28
|
swapAmounts: SwapAmounts;
|
|
@@ -48,14 +47,25 @@ export declare namespace PorticoBridge {
|
|
|
48
47
|
* the Portico bridge contracts.
|
|
49
48
|
*/
|
|
50
49
|
export interface PorticoBridge<N extends Network = Network, C extends Chain = Chain> {
|
|
50
|
+
isTransferCompleted(vaa: PorticoBridge.VAA): Promise<boolean>;
|
|
51
51
|
/** Initiate a transfer of some token to another chain */
|
|
52
|
-
transfer(sender: AccountAddress<C>, recipient: ChainAddress, token: TokenAddress<C>, amount: bigint, destToken: TokenId, quote: PorticoBridge.Quote): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
52
|
+
transfer(sender: AccountAddress<C>, recipient: ChainAddress, token: TokenAddress<C>, amount: bigint, destToken: TokenId, destPorticoAddress: string, quote: PorticoBridge.Quote): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
53
53
|
/** Redeem a transfer VAA to receive the tokens on this chain */
|
|
54
54
|
redeem(sender: AccountAddress<C>, vaa: PorticoBridge.VAA): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
55
55
|
/** quote token conversion */
|
|
56
|
-
quoteSwap(input: TokenAddress<C>, output: TokenAddress<C>, amount: bigint): Promise<bigint>;
|
|
56
|
+
quoteSwap(input: TokenAddress<C>, output: TokenAddress<C>, tokenGroup: string, amount: bigint): Promise<bigint>;
|
|
57
57
|
/** quote relay on destination with conversion */
|
|
58
58
|
quoteRelay(token: TokenAddress<C>, destination: TokenAddress<C>): Promise<bigint>;
|
|
59
|
-
|
|
59
|
+
/** Get the "highway" token for this token */
|
|
60
|
+
getTransferrableToken(address: string): Promise<TokenId>;
|
|
61
|
+
/** Tokens supported on this chain */
|
|
62
|
+
supportedTokens(): {
|
|
63
|
+
group: string;
|
|
64
|
+
token: TokenId;
|
|
65
|
+
}[];
|
|
66
|
+
/** Get the group that a token belongs to e.g. ETH, WETH, wstETH, USDT */
|
|
67
|
+
getTokenGroup(address: string): string;
|
|
68
|
+
/** Get the Portico contract address for the token group */
|
|
69
|
+
getPorticoAddress(group: string): string;
|
|
60
70
|
}
|
|
61
71
|
//# sourceMappingURL=portico.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portico.d.ts","sourceRoot":"","sources":["../../../../src/protocols/portico/portico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,O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AC,CAAC;IAElF,6CAA6C;IAC7C,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzD,qCAAqC;IACrC,eAAe,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IAEvD,yEAAyE;IACzE,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvC,2DAA2D;IAC3D,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portico.js","sourceRoot":"","sources":["../../../../src/protocols/portico/portico.ts"],"names":[],"mappings":";;;AACA,4DAAmF;AAKnF,yDAAgF;AAGhF,6BAA2B;AAY3B,IAAiB,aAAa,
|
|
1
|
+
{"version":3,"file":"portico.js","sourceRoot":"","sources":["../../../../src/protocols/portico/portico.ts"],"names":[],"mappings":";;;AACA,4DAAmF;AAKnF,yDAAgF;AAGhF,6BAA2B;AAY3B,IAAiB,aAAa,CA6C7B;AA7CD,WAAiB,aAAa;IAC5B,MAAM,SAAS,GAAG,eAAe,CAAC;IAclC,MAAM,iBAAiB,GAAG,CAAC,UAAU,CAAU,CAAC;IAChD,MAAM,SAAS,GAAG,CAAC,GAAG,iBAAiB,CAAU,CAAC;IAcrC,gCAAkB,GAAG,CAAC,IAAgB,EAAyB,EAAE;QAC5E,OAAO,IAAA,4BAAiB,EAAC,uCAAoB,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC;IAEW,8BAAgB,GAAG,CAAC,GAA0B,EAAc,EAAE;QACzE,OAAO,IAAA,0BAAe,EAAC,uCAAoB,EAAE,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC;IAEW,gCAAkB,GAAG,CAAC,IAAgB,EAAW,EAAE;QAC9D,OAAO,IAAA,4BAAiB,EAAC,uCAAoB,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC;IAEW,8BAAgB,GAAG,CAAC,KAAc,EAAc,EAAE;QAC7D,OAAO,IAAA,0BAAe,EAAC,uCAAoB,EAAE,KAAK,CAAC,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC,EA7CgB,aAAa,6BAAb,aAAa,QA6C7B"}
|
|
@@ -187,38 +187,130 @@ export declare const porticoPayloadLayout: readonly [{
|
|
|
187
187
|
readonly name: "relayerFee";
|
|
188
188
|
}];
|
|
189
189
|
export declare const namedPayloads: readonly [readonly ["Transfer", readonly [{
|
|
190
|
-
readonly name: "
|
|
190
|
+
readonly name: "payloadId";
|
|
191
191
|
readonly binary: "uint";
|
|
192
|
-
readonly
|
|
193
|
-
readonly
|
|
192
|
+
readonly size: 1;
|
|
193
|
+
readonly custom: 3;
|
|
194
|
+
readonly omit: true;
|
|
194
195
|
}, {
|
|
195
|
-
readonly name: "
|
|
196
|
-
readonly binary: "
|
|
197
|
-
readonly
|
|
198
|
-
|
|
196
|
+
readonly name: "token";
|
|
197
|
+
readonly binary: "bytes";
|
|
198
|
+
readonly layout: readonly [{
|
|
199
|
+
readonly binary: "uint";
|
|
200
|
+
readonly size: 32;
|
|
201
|
+
readonly name: "amount";
|
|
202
|
+
}, {
|
|
203
|
+
readonly binary: "bytes";
|
|
204
|
+
readonly size: 32;
|
|
205
|
+
readonly custom: {
|
|
206
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
207
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
208
|
+
};
|
|
209
|
+
readonly name: "address";
|
|
210
|
+
}, {
|
|
211
|
+
readonly custom: {
|
|
212
|
+
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" | "Unichain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
213
|
+
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" | "Unichain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
214
|
+
};
|
|
215
|
+
readonly binary: "uint";
|
|
216
|
+
readonly size: 2;
|
|
217
|
+
readonly name: "chain";
|
|
218
|
+
}];
|
|
199
219
|
}, {
|
|
200
|
-
readonly name: "
|
|
201
|
-
readonly binary: "
|
|
202
|
-
readonly
|
|
203
|
-
|
|
220
|
+
readonly name: "to";
|
|
221
|
+
readonly binary: "bytes";
|
|
222
|
+
readonly layout: readonly [{
|
|
223
|
+
readonly binary: "bytes";
|
|
224
|
+
readonly size: 32;
|
|
225
|
+
readonly custom: {
|
|
226
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
227
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
228
|
+
};
|
|
229
|
+
readonly name: "address";
|
|
230
|
+
}, {
|
|
231
|
+
readonly custom: {
|
|
232
|
+
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" | "Unichain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
233
|
+
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" | "Unichain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
234
|
+
};
|
|
235
|
+
readonly binary: "uint";
|
|
236
|
+
readonly size: 2;
|
|
237
|
+
readonly name: "chain";
|
|
238
|
+
}];
|
|
204
239
|
}, {
|
|
205
|
-
readonly
|
|
206
|
-
readonly
|
|
207
|
-
readonly
|
|
208
|
-
|
|
240
|
+
readonly binary: "bytes";
|
|
241
|
+
readonly size: 32;
|
|
242
|
+
readonly custom: {
|
|
243
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
244
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
245
|
+
};
|
|
246
|
+
readonly name: "from";
|
|
247
|
+
}, import("@wormhole-foundation/sdk-base").CustomizableBytesReturn<{
|
|
248
|
+
readonly name: "payload";
|
|
249
|
+
}, readonly [{
|
|
250
|
+
readonly name: "flagSet";
|
|
251
|
+
readonly binary: "bytes";
|
|
252
|
+
readonly layout: readonly [{
|
|
253
|
+
readonly name: "recipientChain";
|
|
254
|
+
readonly binary: "uint";
|
|
255
|
+
readonly endianness: "little";
|
|
256
|
+
readonly size: 2;
|
|
257
|
+
}, {
|
|
258
|
+
readonly name: "bridgeNonce";
|
|
259
|
+
readonly binary: "uint";
|
|
260
|
+
readonly endianness: "little";
|
|
261
|
+
readonly size: 4;
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "feeTierStart";
|
|
264
|
+
readonly binary: "uint";
|
|
265
|
+
readonly endianness: "little";
|
|
266
|
+
readonly size: 3;
|
|
267
|
+
}, {
|
|
268
|
+
readonly name: "feeTierFinish";
|
|
269
|
+
readonly binary: "uint";
|
|
270
|
+
readonly endianness: "little";
|
|
271
|
+
readonly size: 3;
|
|
272
|
+
}, {
|
|
273
|
+
readonly name: "padding";
|
|
274
|
+
readonly binary: "bytes";
|
|
275
|
+
readonly size: 19;
|
|
276
|
+
}, {
|
|
277
|
+
readonly binary: "uint";
|
|
278
|
+
readonly size: 1;
|
|
279
|
+
readonly custom: {
|
|
280
|
+
to: (encoded: number) => import("@wormhole-foundation/sdk-base").Bitset<readonly ["shouldWrapNative", "shouldUnwrapNative"]>;
|
|
281
|
+
from: (obj: import("@wormhole-foundation/sdk-base").Bitset<readonly ["shouldWrapNative", "shouldUnwrapNative"]>) => number;
|
|
282
|
+
};
|
|
283
|
+
readonly name: "flags";
|
|
284
|
+
}];
|
|
209
285
|
}, {
|
|
210
|
-
readonly name: "padding";
|
|
211
286
|
readonly binary: "bytes";
|
|
212
|
-
readonly size:
|
|
287
|
+
readonly size: 32;
|
|
288
|
+
readonly custom: {
|
|
289
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
290
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
291
|
+
};
|
|
292
|
+
readonly name: "finalTokenAddress";
|
|
213
293
|
}, {
|
|
214
|
-
readonly binary: "
|
|
215
|
-
readonly size:
|
|
294
|
+
readonly binary: "bytes";
|
|
295
|
+
readonly size: 32;
|
|
216
296
|
readonly custom: {
|
|
217
|
-
to: (
|
|
218
|
-
from: (
|
|
297
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
298
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
219
299
|
};
|
|
220
|
-
readonly name: "
|
|
221
|
-
}
|
|
300
|
+
readonly name: "recipientAddress";
|
|
301
|
+
}, {
|
|
302
|
+
readonly binary: "uint";
|
|
303
|
+
readonly size: 32;
|
|
304
|
+
readonly name: "cannonAssetAmount";
|
|
305
|
+
}, {
|
|
306
|
+
readonly binary: "uint";
|
|
307
|
+
readonly size: 32;
|
|
308
|
+
readonly name: "minAmountFinish";
|
|
309
|
+
}, {
|
|
310
|
+
readonly binary: "uint";
|
|
311
|
+
readonly size: 32;
|
|
312
|
+
readonly name: "relayerFee";
|
|
313
|
+
}]>]]];
|
|
222
314
|
import "../../registry.js";
|
|
223
315
|
declare module "../../registry.js" {
|
|
224
316
|
namespace WormholeRegistry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"porticoLayout.d.ts","sourceRoot":"","sources":["../../../../src/protocols/portico/porticoLayout.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"porticoLayout.d.ts","sourceRoot":"","sources":["../../../../src/protocols/portico/porticoLayout.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAOhF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAON,CAAC;AAE5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWP,CAAC;AAE5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAON,CAAC;AAE5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEQ,CAAC;AAGnC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAiB,gBAAgB,CAAC;QAChC,UAAU,6BACR,SAAQ,oBAAoB,CAAC,eAAe,EAAE,OAAO,aAAa,CAAC;SAAG;KACzE;CACF"}
|
|
@@ -4,6 +4,7 @@ exports.namedPayloads = exports.porticoPayloadLayout = exports.porticoTransferLa
|
|
|
4
4
|
const sdk_base_1 = require("@wormhole-foundation/sdk-base");
|
|
5
5
|
const index_js_1 = require("./../../layout-items/index.js");
|
|
6
6
|
const index_js_2 = require("./../../vaa/index.js");
|
|
7
|
+
const tokenBridgeLayout_js_1 = require("../tokenBridge/tokenBridgeLayout.js");
|
|
7
8
|
//weirdly, if defined in place, the type is not inferred properly
|
|
8
9
|
const flagsItem = (0, sdk_base_1.bitsetItem)(["shouldWrapNative", "shouldUnwrapNative"]);
|
|
9
10
|
exports.porticoFlagSetLayout = [
|
|
@@ -34,7 +35,9 @@ exports.porticoPayloadLayout = [
|
|
|
34
35
|
{ name: "minAmountFinish", ...index_js_1.amountItem },
|
|
35
36
|
{ name: "relayerFee", ...index_js_1.amountItem },
|
|
36
37
|
];
|
|
37
|
-
exports.namedPayloads = [
|
|
38
|
+
exports.namedPayloads = [
|
|
39
|
+
["Transfer", (0, tokenBridgeLayout_js_1.transferWithPayloadLayout)(exports.porticoPayloadLayout)],
|
|
40
|
+
];
|
|
38
41
|
// factory registration:
|
|
39
42
|
require("../../registry.js");
|
|
40
43
|
(0, index_js_2.registerPayloadTypes)("PorticoBridge", exports.namedPayloads);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"porticoLayout.js","sourceRoot":"","sources":["../../../../src/protocols/portico/porticoLayout.ts"],"names":[],"mappings":";;;AACA,4DAA2D;AAC3D,4DAAiF;AAEjF,mDAA4D;
|
|
1
|
+
{"version":3,"file":"porticoLayout.js","sourceRoot":"","sources":["../../../../src/protocols/portico/porticoLayout.ts"],"names":[],"mappings":";;;AACA,4DAA2D;AAC3D,4DAAiF;AAEjF,mDAA4D;AAC5D,8EAAgF;AAEhF,iEAAiE;AACjE,MAAM,SAAS,GAAG,IAAA,qBAAU,EAAC,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAE5D,QAAA,oBAAoB,GAAG;IAClC,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;IACzE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;IACtE,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EA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E,GAAG,qBAAU,EAAE;IAC5C,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,qBAAU,EAAE;IAC1C,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,qBAAU,EAAE;CACZ,CAAC;AAEf,QAAA,aAAa,GAAG;IAC3B,CAAC,UAAU,EAAE,IAAA,gDAAyB,EAAC,4BAAoB,CAAC,CAAC;CAC7B,CAAC;AAEnC,wBAAwB;AACxB,6BAA2B;AAQ3B,IAAA,+BAAoB,EAAC,eAAe,EAAE,qBAAa,CAAC,CAAC"}
|
|
@@ -23,7 +23,6 @@ export declare namespace PorticoBridge {
|
|
|
23
23
|
export interface SwapAmounts {
|
|
24
24
|
minAmountStart: bigint;
|
|
25
25
|
minAmountFinish: bigint;
|
|
26
|
-
amountFinish: bigint;
|
|
27
26
|
}
|
|
28
27
|
export type Quote = {
|
|
29
28
|
swapAmounts: SwapAmounts;
|
|
@@ -48,14 +47,25 @@ export declare namespace PorticoBridge {
|
|
|
48
47
|
* the Portico bridge contracts.
|
|
49
48
|
*/
|
|
50
49
|
export interface PorticoBridge<N extends Network = Network, C extends Chain = Chain> {
|
|
50
|
+
isTransferCompleted(vaa: PorticoBridge.VAA): Promise<boolean>;
|
|
51
51
|
/** Initiate a transfer of some token to another chain */
|
|
52
|
-
transfer(sender: AccountAddress<C>, recipient: ChainAddress, token: TokenAddress<C>, amount: bigint, destToken: TokenId, quote: PorticoBridge.Quote): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
52
|
+
transfer(sender: AccountAddress<C>, recipient: ChainAddress, token: TokenAddress<C>, amount: bigint, destToken: TokenId, destPorticoAddress: string, quote: PorticoBridge.Quote): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
53
53
|
/** Redeem a transfer VAA to receive the tokens on this chain */
|
|
54
54
|
redeem(sender: AccountAddress<C>, vaa: PorticoBridge.VAA): AsyncGenerator<UnsignedTransaction<N, C>>;
|
|
55
55
|
/** quote token conversion */
|
|
56
|
-
quoteSwap(input: TokenAddress<C>, output: TokenAddress<C>, amount: bigint): Promise<bigint>;
|
|
56
|
+
quoteSwap(input: TokenAddress<C>, output: TokenAddress<C>, tokenGroup: string, amount: bigint): Promise<bigint>;
|
|
57
57
|
/** quote relay on destination with conversion */
|
|
58
58
|
quoteRelay(token: TokenAddress<C>, destination: TokenAddress<C>): Promise<bigint>;
|
|
59
|
-
|
|
59
|
+
/** Get the "highway" token for this token */
|
|
60
|
+
getTransferrableToken(address: string): Promise<TokenId>;
|
|
61
|
+
/** Tokens supported on this chain */
|
|
62
|
+
supportedTokens(): {
|
|
63
|
+
group: string;
|
|
64
|
+
token: TokenId;
|
|
65
|
+
}[];
|
|
66
|
+
/** Get the group that a token belongs to e.g. ETH, WETH, wstETH, USDT */
|
|
67
|
+
getTokenGroup(address: string): string;
|
|
68
|
+
/** Get the Portico contract address for the token group */
|
|
69
|
+
getPorticoAddress(group: string): string;
|
|
60
70
|
}
|
|
61
71
|
//# sourceMappingURL=portico.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portico.d.ts","sourceRoot":"","sources":["../../../../src/protocols/portico/portico.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,mBAAmB,CAAC;AAC3B,OAAO,QAAQ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AK,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portico.js","sourceRoot":"","sources":["../../../../src/protocols/portico/portico.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAKnF,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAGhF,OAAO,mBAAmB,CAAC;AAY3B,MAAM,KAAW,aAAa,
|
|
1
|
+
{"version":3,"file":"portico.js","sourceRoot":"","sources":["../../../../src/protocols/portico/portico.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAKnF,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAGhF,OAAO,mBAAmB,CAAC;AAY3B,MAAM,KAAW,aAAa,CA6C7B;AA7CD,WAAiB,aAAa;IAC5B,MAAM,SAAS,GAAG,eAAe,CAAC;IAclC,MAAM,iBAAiB,GAAG,CAAC,UAAU,CAAU,CAAC;IAChD,MAAM,SAAS,GAAG,CAAC,GAAG,iBAAiB,CAAU,CAAC;IAcrC,gCAAkB,GAAG,CAAC,IAAgB,EAAyB,EAAE;QAC5E,OAAO,iBAAiB,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC;IAEW,8BAAgB,GAAG,CAAC,GAA0B,EAAc,EAAE;QACzE,OAAO,eAAe,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACpD,CAAC,CAAC;IAEW,gCAAkB,GAAG,CAAC,IAAgB,EAAW,EAAE;QAC9D,OAAO,iBAAiB,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC,CAAC;IAEW,8BAAgB,GAAG,CAAC,KAAc,EAAc,EAAE;QAC7D,OAAO,eAAe,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC,EA7CgB,aAAa,KAAb,aAAa,QA6C7B"}
|
|
@@ -187,38 +187,130 @@ export declare const porticoPayloadLayout: readonly [{
|
|
|
187
187
|
readonly name: "relayerFee";
|
|
188
188
|
}];
|
|
189
189
|
export declare const namedPayloads: readonly [readonly ["Transfer", readonly [{
|
|
190
|
-
readonly name: "
|
|
190
|
+
readonly name: "payloadId";
|
|
191
191
|
readonly binary: "uint";
|
|
192
|
-
readonly
|
|
193
|
-
readonly
|
|
192
|
+
readonly size: 1;
|
|
193
|
+
readonly custom: 3;
|
|
194
|
+
readonly omit: true;
|
|
194
195
|
}, {
|
|
195
|
-
readonly name: "
|
|
196
|
-
readonly binary: "
|
|
197
|
-
readonly
|
|
198
|
-
|
|
196
|
+
readonly name: "token";
|
|
197
|
+
readonly binary: "bytes";
|
|
198
|
+
readonly layout: readonly [{
|
|
199
|
+
readonly binary: "uint";
|
|
200
|
+
readonly size: 32;
|
|
201
|
+
readonly name: "amount";
|
|
202
|
+
}, {
|
|
203
|
+
readonly binary: "bytes";
|
|
204
|
+
readonly size: 32;
|
|
205
|
+
readonly custom: {
|
|
206
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
207
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
208
|
+
};
|
|
209
|
+
readonly name: "address";
|
|
210
|
+
}, {
|
|
211
|
+
readonly custom: {
|
|
212
|
+
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" | "Unichain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
213
|
+
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" | "Unichain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
214
|
+
};
|
|
215
|
+
readonly binary: "uint";
|
|
216
|
+
readonly size: 2;
|
|
217
|
+
readonly name: "chain";
|
|
218
|
+
}];
|
|
199
219
|
}, {
|
|
200
|
-
readonly name: "
|
|
201
|
-
readonly binary: "
|
|
202
|
-
readonly
|
|
203
|
-
|
|
220
|
+
readonly name: "to";
|
|
221
|
+
readonly binary: "bytes";
|
|
222
|
+
readonly layout: readonly [{
|
|
223
|
+
readonly binary: "bytes";
|
|
224
|
+
readonly size: 32;
|
|
225
|
+
readonly custom: {
|
|
226
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
227
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
228
|
+
};
|
|
229
|
+
readonly name: "address";
|
|
230
|
+
}, {
|
|
231
|
+
readonly custom: {
|
|
232
|
+
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" | "Unichain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia";
|
|
233
|
+
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" | "Unichain" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia") => number;
|
|
234
|
+
};
|
|
235
|
+
readonly binary: "uint";
|
|
236
|
+
readonly size: 2;
|
|
237
|
+
readonly name: "chain";
|
|
238
|
+
}];
|
|
204
239
|
}, {
|
|
205
|
-
readonly
|
|
206
|
-
readonly
|
|
207
|
-
readonly
|
|
208
|
-
|
|
240
|
+
readonly binary: "bytes";
|
|
241
|
+
readonly size: 32;
|
|
242
|
+
readonly custom: {
|
|
243
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
244
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
245
|
+
};
|
|
246
|
+
readonly name: "from";
|
|
247
|
+
}, import("@wormhole-foundation/sdk-base").CustomizableBytesReturn<{
|
|
248
|
+
readonly name: "payload";
|
|
249
|
+
}, readonly [{
|
|
250
|
+
readonly name: "flagSet";
|
|
251
|
+
readonly binary: "bytes";
|
|
252
|
+
readonly layout: readonly [{
|
|
253
|
+
readonly name: "recipientChain";
|
|
254
|
+
readonly binary: "uint";
|
|
255
|
+
readonly endianness: "little";
|
|
256
|
+
readonly size: 2;
|
|
257
|
+
}, {
|
|
258
|
+
readonly name: "bridgeNonce";
|
|
259
|
+
readonly binary: "uint";
|
|
260
|
+
readonly endianness: "little";
|
|
261
|
+
readonly size: 4;
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "feeTierStart";
|
|
264
|
+
readonly binary: "uint";
|
|
265
|
+
readonly endianness: "little";
|
|
266
|
+
readonly size: 3;
|
|
267
|
+
}, {
|
|
268
|
+
readonly name: "feeTierFinish";
|
|
269
|
+
readonly binary: "uint";
|
|
270
|
+
readonly endianness: "little";
|
|
271
|
+
readonly size: 3;
|
|
272
|
+
}, {
|
|
273
|
+
readonly name: "padding";
|
|
274
|
+
readonly binary: "bytes";
|
|
275
|
+
readonly size: 19;
|
|
276
|
+
}, {
|
|
277
|
+
readonly binary: "uint";
|
|
278
|
+
readonly size: 1;
|
|
279
|
+
readonly custom: {
|
|
280
|
+
to: (encoded: number) => import("@wormhole-foundation/sdk-base").Bitset<readonly ["shouldWrapNative", "shouldUnwrapNative"]>;
|
|
281
|
+
from: (obj: import("@wormhole-foundation/sdk-base").Bitset<readonly ["shouldWrapNative", "shouldUnwrapNative"]>) => number;
|
|
282
|
+
};
|
|
283
|
+
readonly name: "flags";
|
|
284
|
+
}];
|
|
209
285
|
}, {
|
|
210
|
-
readonly name: "padding";
|
|
211
286
|
readonly binary: "bytes";
|
|
212
|
-
readonly size:
|
|
287
|
+
readonly size: 32;
|
|
288
|
+
readonly custom: {
|
|
289
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
290
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
291
|
+
};
|
|
292
|
+
readonly name: "finalTokenAddress";
|
|
213
293
|
}, {
|
|
214
|
-
readonly binary: "
|
|
215
|
-
readonly size:
|
|
294
|
+
readonly binary: "bytes";
|
|
295
|
+
readonly size: 32;
|
|
216
296
|
readonly custom: {
|
|
217
|
-
to: (
|
|
218
|
-
from: (
|
|
297
|
+
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
298
|
+
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
219
299
|
};
|
|
220
|
-
readonly name: "
|
|
221
|
-
}
|
|
300
|
+
readonly name: "recipientAddress";
|
|
301
|
+
}, {
|
|
302
|
+
readonly binary: "uint";
|
|
303
|
+
readonly size: 32;
|
|
304
|
+
readonly name: "cannonAssetAmount";
|
|
305
|
+
}, {
|
|
306
|
+
readonly binary: "uint";
|
|
307
|
+
readonly size: 32;
|
|
308
|
+
readonly name: "minAmountFinish";
|
|
309
|
+
}, {
|
|
310
|
+
readonly binary: "uint";
|
|
311
|
+
readonly size: 32;
|
|
312
|
+
readonly name: "relayerFee";
|
|
313
|
+
}]>]]];
|
|
222
314
|
import "../../registry.js";
|
|
223
315
|
declare module "../../registry.js" {
|
|
224
316
|
namespace WormholeRegistry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"porticoLayout.d.ts","sourceRoot":"","sources":["../../../../src/protocols/portico/porticoLayout.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"porticoLayout.d.ts","sourceRoot":"","sources":["../../../../src/protocols/portico/porticoLayout.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAOhF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAON,CAAC;AAE5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWP,CAAC;AAE5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAON,CAAC;AAE5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEQ,CAAC;AAGnC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAiB,gBAAgB,CAAC;QAChC,UAAU,6BACR,SAAQ,oBAAoB,CAAC,eAAe,EAAE,OAAO,aAAa,CAAC;SAAG;KACzE;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { bitsetItem } from "@wormhole-foundation/sdk-base";
|
|
2
2
|
import { amountItem, universalAddressItem } from "./../../layout-items/index.js";
|
|
3
3
|
import { registerPayloadTypes } from "./../../vaa/index.js";
|
|
4
|
+
import { transferWithPayloadLayout } from "../tokenBridge/tokenBridgeLayout.js";
|
|
4
5
|
//weirdly, if defined in place, the type is not inferred properly
|
|
5
6
|
const flagsItem = bitsetItem(["shouldWrapNative", "shouldUnwrapNative"]);
|
|
6
7
|
export const porticoFlagSetLayout = [
|
|
@@ -31,7 +32,9 @@ export const porticoPayloadLayout = [
|
|
|
31
32
|
{ name: "minAmountFinish", ...amountItem },
|
|
32
33
|
{ name: "relayerFee", ...amountItem },
|
|
33
34
|
];
|
|
34
|
-
export const namedPayloads = [
|
|
35
|
+
export const namedPayloads = [
|
|
36
|
+
["Transfer", transferWithPayloadLayout(porticoPayloadLayout)],
|
|
37
|
+
];
|
|
35
38
|
// factory registration:
|
|
36
39
|
import "../../registry.js";
|
|
37
40
|
registerPayloadTypes("PorticoBridge", namedPayloads);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"porticoLayout.js","sourceRoot":"","sources":["../../../../src/protocols/portico/porticoLayout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"porticoLayout.js","sourceRoot":"","sources":["../../../../src/protocols/portico/porticoLayout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,iEAAiE;AACjE,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;IACzE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAA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E,IAAI,EAAE,kBAAkB,EAAE,GAAG,oBAAoB,EAAE;IACrD,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,UAAU,EAAE;IAC5C,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,UAAU,EAAE;IAC1C,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,UAAU,EAAE;CACZ,CAAC;AAE5B,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,CAAC,UAAU,EAAE,yBAAyB,CAAC,oBAAoB,CAAC,CAAC;CAC7B,CAAC;AAEnC,wBAAwB;AACxB,OAAO,mBAAmB,CAAC;AAQ3B,oBAAoB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wormhole-foundation/sdk-definitions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@noble/hashes": "^1.3.1",
|
|
88
88
|
"@noble/curves": "^1.4.0",
|
|
89
|
-
"@wormhole-foundation/sdk-base": "0.
|
|
89
|
+
"@wormhole-foundation/sdk-base": "0.12.0"
|
|
90
90
|
},
|
|
91
91
|
"type": "module"
|
|
92
92
|
}
|