@wormhole-foundation/sdk-definitions 0.10.12-beta.0 → 0.11.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 +4 -14
- 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 +23 -115
- package/dist/cjs/protocols/portico/porticoLayout.d.ts.map +1 -1
- package/dist/cjs/protocols/portico/porticoLayout.js +1 -4
- package/dist/cjs/protocols/portico/porticoLayout.js.map +1 -1
- package/dist/esm/protocols/portico/portico.d.ts +4 -14
- 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 +23 -115
- package/dist/esm/protocols/portico/porticoLayout.d.ts.map +1 -1
- package/dist/esm/protocols/portico/porticoLayout.js +1 -4
- package/dist/esm/protocols/portico/porticoLayout.js.map +1 -1
- package/package.json +2 -2
|
@@ -23,6 +23,7 @@ export declare namespace PorticoBridge {
|
|
|
23
23
|
export interface SwapAmounts {
|
|
24
24
|
minAmountStart: bigint;
|
|
25
25
|
minAmountFinish: bigint;
|
|
26
|
+
amountFinish: bigint;
|
|
26
27
|
}
|
|
27
28
|
export type Quote = {
|
|
28
29
|
swapAmounts: SwapAmounts;
|
|
@@ -47,25 +48,14 @@ export declare namespace PorticoBridge {
|
|
|
47
48
|
* the Portico bridge contracts.
|
|
48
49
|
*/
|
|
49
50
|
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,
|
|
52
|
+
transfer(sender: AccountAddress<C>, recipient: ChainAddress, token: TokenAddress<C>, amount: bigint, destToken: TokenId, 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>,
|
|
56
|
+
quoteSwap(input: TokenAddress<C>, output: TokenAddress<C>, amount: bigint): Promise<bigint>;
|
|
57
57
|
/** quote relay on destination with conversion */
|
|
58
58
|
quoteRelay(token: TokenAddress<C>, destination: TokenAddress<C>): Promise<bigint>;
|
|
59
|
-
|
|
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;
|
|
59
|
+
getTransferrableToken(address: string): TokenId;
|
|
70
60
|
}
|
|
71
61
|
//# 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,8BA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DAAmF;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,CA8C7B;AA9CD,WAAiB,aAAa;IAC5B,MAAM,SAAS,GAAG,eAAe,CAAC;IAelC,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,EA9CgB,aAAa,6BAAb,aAAa,QA8C7B"}
|
|
@@ -187,130 +187,38 @@ 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: "recipientChain";
|
|
191
191
|
readonly binary: "uint";
|
|
192
|
-
readonly
|
|
193
|
-
readonly
|
|
194
|
-
readonly omit: true;
|
|
192
|
+
readonly endianness: "little";
|
|
193
|
+
readonly size: 2;
|
|
195
194
|
}, {
|
|
196
|
-
readonly name: "
|
|
197
|
-
readonly binary: "
|
|
198
|
-
readonly
|
|
199
|
-
|
|
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
|
-
}];
|
|
195
|
+
readonly name: "bridgeNonce";
|
|
196
|
+
readonly binary: "uint";
|
|
197
|
+
readonly endianness: "little";
|
|
198
|
+
readonly size: 4;
|
|
219
199
|
}, {
|
|
220
|
-
readonly name: "
|
|
221
|
-
readonly binary: "
|
|
222
|
-
readonly
|
|
223
|
-
|
|
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
|
-
}];
|
|
200
|
+
readonly name: "feeTierStart";
|
|
201
|
+
readonly binary: "uint";
|
|
202
|
+
readonly endianness: "little";
|
|
203
|
+
readonly size: 3;
|
|
239
204
|
}, {
|
|
240
|
-
readonly
|
|
241
|
-
readonly
|
|
242
|
-
readonly
|
|
243
|
-
|
|
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
|
-
}];
|
|
205
|
+
readonly name: "feeTierFinish";
|
|
206
|
+
readonly binary: "uint";
|
|
207
|
+
readonly endianness: "little";
|
|
208
|
+
readonly size: 3;
|
|
285
209
|
}, {
|
|
210
|
+
readonly name: "padding";
|
|
286
211
|
readonly binary: "bytes";
|
|
287
|
-
readonly size:
|
|
288
|
-
readonly custom: {
|
|
289
|
-
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
290
|
-
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
291
|
-
};
|
|
292
|
-
readonly name: "finalTokenAddress";
|
|
212
|
+
readonly size: 19;
|
|
293
213
|
}, {
|
|
294
|
-
readonly binary: "
|
|
295
|
-
readonly size:
|
|
214
|
+
readonly binary: "uint";
|
|
215
|
+
readonly size: 1;
|
|
296
216
|
readonly custom: {
|
|
297
|
-
to: (
|
|
298
|
-
from: (
|
|
217
|
+
to: (encoded: number) => import("@wormhole-foundation/sdk-base").Bitset<readonly ["shouldWrapNative", "shouldUnwrapNative"]>;
|
|
218
|
+
from: (obj: import("@wormhole-foundation/sdk-base").Bitset<readonly ["shouldWrapNative", "shouldUnwrapNative"]>) => number;
|
|
299
219
|
};
|
|
300
|
-
readonly name: "
|
|
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
|
-
}]>]]];
|
|
220
|
+
readonly name: "flags";
|
|
221
|
+
}]]];
|
|
314
222
|
import "../../registry.js";
|
|
315
223
|
declare module "../../registry.js" {
|
|
316
224
|
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;AAMhF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAON,CAAC;AAE5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWP,CAAC;AAE5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAON,CAAC;AAE5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAwE,CAAC;AAGnG,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,7 +4,6 @@ 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");
|
|
8
7
|
//weirdly, if defined in place, the type is not inferred properly
|
|
9
8
|
const flagsItem = (0, sdk_base_1.bitsetItem)(["shouldWrapNative", "shouldUnwrapNative"]);
|
|
10
9
|
exports.porticoFlagSetLayout = [
|
|
@@ -35,9 +34,7 @@ exports.porticoPayloadLayout = [
|
|
|
35
34
|
{ name: "minAmountFinish", ...index_js_1.amountItem },
|
|
36
35
|
{ name: "relayerFee", ...index_js_1.amountItem },
|
|
37
36
|
];
|
|
38
|
-
exports.namedPayloads = [
|
|
39
|
-
["Transfer", (0, tokenBridgeLayout_js_1.transferWithPayloadLayout)(exports.porticoPayloadLayout)],
|
|
40
|
-
];
|
|
37
|
+
exports.namedPayloads = [["Transfer", exports.porticoFlagSetLayout]];
|
|
41
38
|
// factory registration:
|
|
42
39
|
require("../../registry.js");
|
|
43
40
|
(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;AAE5D,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,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;IACvE,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;IACxE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IAC9C,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE;CACN,CAAC;AAEf,QAAA,qBAAqB,GAAG;IACnC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,4BAAoB,EAAE;IAClE,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,+BAAoB,EAAE;IACtD,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,qBAAU,EAAE;IAC5C,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,+BAAoB,EAAE;IACtD,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,+BAAoB,EAAE;IACrD,EAAE,IAAI,EAAE,2BAA2B,EAAE,GAAG,+BAAoB,EAAE;IAC9D,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,qBAAU,EAAE;IAC1C,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,qBAAU,EAAE;IACzC,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,qBAAU,EAAE;IAC1C,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,qBAAU,EAAE;CACZ,CAAC;AAEf,QAAA,oBAAoB,GAAG;IAClC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,4BAAoB,EAAE;IAClE,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,+BAAoB,EAAE;IACtD,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,+BAAoB,EAAE;IACrD,EAAE,IAAI,EAAE,mBAAmB,EAAE,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,CAAC,CAAC,UAAU,EAAE,4BAAoB,CAAC,CAAkC,CAAC;AAEnG,wBAAwB;AACxB,6BAA2B;AAQ3B,IAAA,+BAAoB,EAAC,eAAe,EAAE,qBAAa,CAAC,CAAC"}
|
|
@@ -23,6 +23,7 @@ export declare namespace PorticoBridge {
|
|
|
23
23
|
export interface SwapAmounts {
|
|
24
24
|
minAmountStart: bigint;
|
|
25
25
|
minAmountFinish: bigint;
|
|
26
|
+
amountFinish: bigint;
|
|
26
27
|
}
|
|
27
28
|
export type Quote = {
|
|
28
29
|
swapAmounts: SwapAmounts;
|
|
@@ -47,25 +48,14 @@ export declare namespace PorticoBridge {
|
|
|
47
48
|
* the Portico bridge contracts.
|
|
48
49
|
*/
|
|
49
50
|
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,
|
|
52
|
+
transfer(sender: AccountAddress<C>, recipient: ChainAddress, token: TokenAddress<C>, amount: bigint, destToken: TokenId, 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>,
|
|
56
|
+
quoteSwap(input: TokenAddress<C>, output: TokenAddress<C>, amount: bigint): Promise<bigint>;
|
|
57
57
|
/** quote relay on destination with conversion */
|
|
58
58
|
quoteRelay(token: TokenAddress<C>, destination: TokenAddress<C>): Promise<bigint>;
|
|
59
|
-
|
|
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;
|
|
59
|
+
getTransferrableToken(address: string): TokenId;
|
|
70
60
|
}
|
|
71
61
|
//# 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,mBAAmB,CAAC;IACjC,UAAiB,gBAAgB,CAAC;QAChC,UAAU,0BAA0B,CAAC,CAAC,EAAE,CAAC;YACvC,aAAa,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACpC;QACD,UAAU,yBAAyB;YACjC,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;SAClD;KACF;CACF;AAED,yBAAiB,aAAa,CAAC;IAC7B,MAAM,SAAS,kBAAkB,CAAC;IAClC,6DAA6D;IAC7D,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC;IAE5C,MAAM,WAAW,WAAW;QAC1B,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;
|
|
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,cA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AC,MAAM,CAAC,CAAC;IAC5F,iDAAiD;IACjD,UAAU,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAElF,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CACjD"}
|
|
@@ -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,CA8C7B;AA9CD,WAAiB,aAAa;IAC5B,MAAM,SAAS,GAAG,eAAe,CAAC;IAelC,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,EA9CgB,aAAa,KAAb,aAAa,QA8C7B"}
|
|
@@ -187,130 +187,38 @@ 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: "recipientChain";
|
|
191
191
|
readonly binary: "uint";
|
|
192
|
-
readonly
|
|
193
|
-
readonly
|
|
194
|
-
readonly omit: true;
|
|
192
|
+
readonly endianness: "little";
|
|
193
|
+
readonly size: 2;
|
|
195
194
|
}, {
|
|
196
|
-
readonly name: "
|
|
197
|
-
readonly binary: "
|
|
198
|
-
readonly
|
|
199
|
-
|
|
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
|
-
}];
|
|
195
|
+
readonly name: "bridgeNonce";
|
|
196
|
+
readonly binary: "uint";
|
|
197
|
+
readonly endianness: "little";
|
|
198
|
+
readonly size: 4;
|
|
219
199
|
}, {
|
|
220
|
-
readonly name: "
|
|
221
|
-
readonly binary: "
|
|
222
|
-
readonly
|
|
223
|
-
|
|
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
|
-
}];
|
|
200
|
+
readonly name: "feeTierStart";
|
|
201
|
+
readonly binary: "uint";
|
|
202
|
+
readonly endianness: "little";
|
|
203
|
+
readonly size: 3;
|
|
239
204
|
}, {
|
|
240
|
-
readonly
|
|
241
|
-
readonly
|
|
242
|
-
readonly
|
|
243
|
-
|
|
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
|
-
}];
|
|
205
|
+
readonly name: "feeTierFinish";
|
|
206
|
+
readonly binary: "uint";
|
|
207
|
+
readonly endianness: "little";
|
|
208
|
+
readonly size: 3;
|
|
285
209
|
}, {
|
|
210
|
+
readonly name: "padding";
|
|
286
211
|
readonly binary: "bytes";
|
|
287
|
-
readonly size:
|
|
288
|
-
readonly custom: {
|
|
289
|
-
to: (val: Uint8Array) => import("../../universalAddress.js").UniversalAddress;
|
|
290
|
-
from: (val: import("../../universalAddress.js").UniversalAddress) => Uint8Array;
|
|
291
|
-
};
|
|
292
|
-
readonly name: "finalTokenAddress";
|
|
212
|
+
readonly size: 19;
|
|
293
213
|
}, {
|
|
294
|
-
readonly binary: "
|
|
295
|
-
readonly size:
|
|
214
|
+
readonly binary: "uint";
|
|
215
|
+
readonly size: 1;
|
|
296
216
|
readonly custom: {
|
|
297
|
-
to: (
|
|
298
|
-
from: (
|
|
217
|
+
to: (encoded: number) => import("@wormhole-foundation/sdk-base").Bitset<readonly ["shouldWrapNative", "shouldUnwrapNative"]>;
|
|
218
|
+
from: (obj: import("@wormhole-foundation/sdk-base").Bitset<readonly ["shouldWrapNative", "shouldUnwrapNative"]>) => number;
|
|
299
219
|
};
|
|
300
|
-
readonly name: "
|
|
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
|
-
}]>]]];
|
|
220
|
+
readonly name: "flags";
|
|
221
|
+
}]]];
|
|
314
222
|
import "../../registry.js";
|
|
315
223
|
declare module "../../registry.js" {
|
|
316
224
|
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;AAMhF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAON,CAAC;AAE5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWP,CAAC;AAE5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAON,CAAC;AAE5B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAwE,CAAC;AAGnG,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,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
//weirdly, if defined in place, the type is not inferred properly
|
|
6
5
|
const flagsItem = bitsetItem(["shouldWrapNative", "shouldUnwrapNative"]);
|
|
7
6
|
export const porticoFlagSetLayout = [
|
|
@@ -32,9 +31,7 @@ export const porticoPayloadLayout = [
|
|
|
32
31
|
{ name: "minAmountFinish", ...amountItem },
|
|
33
32
|
{ name: "relayerFee", ...amountItem },
|
|
34
33
|
];
|
|
35
|
-
export const namedPayloads = [
|
|
36
|
-
["Transfer", transferWithPayloadLayout(porticoPayloadLayout)],
|
|
37
|
-
];
|
|
34
|
+
export const namedPayloads = [["Transfer", porticoFlagSetLayout]];
|
|
38
35
|
// factory registration:
|
|
39
36
|
import "../../registry.js";
|
|
40
37
|
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;AAE5D,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;IACz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E,MAAM,EAAE,oBAAoB,EAAE;IAClE,EAAE,IAAI,EAAE,mBAAmB,EAAE,GAAG,oBAAoB,EAAE;IACtD,EAAE,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,CAAC,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAkC,CAAC;AAEnG,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.11.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.11.0"
|
|
90
90
|
},
|
|
91
91
|
"type": "module"
|
|
92
92
|
}
|