@wormhole-foundation/sdk-definitions 0.1.3-beta.4 → 0.1.3-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -2
- package/dist/cjs/chain.d.ts +19 -18
- package/dist/cjs/chain.d.ts.map +1 -1
- package/dist/cjs/chain.js +46 -24
- package/dist/cjs/chain.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/layout-items/chain.d.ts +8 -4
- package/dist/cjs/layout-items/chain.d.ts.map +1 -1
- package/dist/cjs/layout-items/chain.js +4 -4
- package/dist/cjs/layout-items/chain.js.map +1 -1
- package/dist/cjs/payloads/bam.d.ts +187 -0
- package/dist/cjs/payloads/bam.d.ts.map +1 -0
- package/dist/cjs/payloads/bam.js +37 -0
- package/dist/cjs/payloads/bam.js.map +1 -0
- package/dist/cjs/payloads/governance.d.ts +252 -252
- package/dist/cjs/payloads/relayer.d.ts +10 -10
- package/dist/cjs/payloads/tokenBridge.d.ts +14 -14
- package/dist/cjs/platform.d.ts +14 -19
- package/dist/cjs/platform.d.ts.map +1 -1
- package/dist/cjs/protocols/cctp.d.ts +9 -0
- package/dist/cjs/protocols/cctp.d.ts.map +1 -1
- package/dist/cjs/protocols/cctp.js +10 -0
- package/dist/cjs/protocols/cctp.js.map +1 -1
- package/dist/cjs/protocols/core.d.ts +5 -0
- package/dist/cjs/protocols/core.d.ts.map +1 -1
- package/dist/cjs/protocols/core.js +5 -0
- package/dist/cjs/protocols/core.js.map +1 -1
- package/dist/cjs/protocols/tokenBridge.d.ts +9 -0
- package/dist/cjs/protocols/tokenBridge.d.ts.map +1 -1
- package/dist/cjs/protocols/tokenBridge.js +10 -1
- package/dist/cjs/protocols/tokenBridge.js.map +1 -1
- package/dist/cjs/rpc.d.ts +1 -9
- package/dist/cjs/rpc.d.ts.map +1 -1
- package/dist/cjs/testing/mocks/chain.d.ts +6 -5
- package/dist/cjs/testing/mocks/chain.d.ts.map +1 -1
- package/dist/cjs/testing/mocks/chain.js +9 -6
- package/dist/cjs/testing/mocks/chain.js.map +1 -1
- package/dist/cjs/testing/mocks/platform.d.ts +11 -4
- package/dist/cjs/testing/mocks/platform.d.ts.map +1 -1
- package/dist/cjs/testing/mocks/platform.js +27 -6
- package/dist/cjs/testing/mocks/platform.js.map +1 -1
- package/dist/cjs/types.d.ts +1 -1
- package/dist/cjs/vaa.d.ts +4 -4
- package/dist/esm/chain.d.ts +19 -18
- package/dist/esm/chain.d.ts.map +1 -1
- package/dist/esm/chain.js +46 -24
- package/dist/esm/chain.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layout-items/chain.d.ts +8 -4
- package/dist/esm/layout-items/chain.d.ts.map +1 -1
- package/dist/esm/layout-items/chain.js +1 -1
- package/dist/esm/layout-items/chain.js.map +1 -1
- package/dist/esm/payloads/bam.d.ts +187 -0
- package/dist/esm/payloads/bam.d.ts.map +1 -0
- package/dist/esm/payloads/bam.js +34 -0
- package/dist/esm/payloads/bam.js.map +1 -0
- package/dist/esm/payloads/governance.d.ts +252 -252
- package/dist/esm/payloads/relayer.d.ts +10 -10
- package/dist/esm/payloads/tokenBridge.d.ts +14 -14
- package/dist/esm/platform.d.ts +14 -19
- package/dist/esm/platform.d.ts.map +1 -1
- package/dist/esm/protocols/cctp.d.ts +9 -0
- package/dist/esm/protocols/cctp.d.ts.map +1 -1
- package/dist/esm/protocols/cctp.js +7 -0
- package/dist/esm/protocols/cctp.js.map +1 -1
- package/dist/esm/protocols/core.d.ts +5 -0
- package/dist/esm/protocols/core.d.ts.map +1 -1
- package/dist/esm/protocols/core.js +3 -1
- package/dist/esm/protocols/core.js.map +1 -1
- package/dist/esm/protocols/tokenBridge.d.ts +9 -0
- package/dist/esm/protocols/tokenBridge.d.ts.map +1 -1
- package/dist/esm/protocols/tokenBridge.js +7 -0
- package/dist/esm/protocols/tokenBridge.js.map +1 -1
- package/dist/esm/rpc.d.ts +1 -9
- package/dist/esm/rpc.d.ts.map +1 -1
- package/dist/esm/testing/mocks/chain.d.ts +6 -5
- package/dist/esm/testing/mocks/chain.d.ts.map +1 -1
- package/dist/esm/testing/mocks/chain.js +9 -6
- package/dist/esm/testing/mocks/chain.js.map +1 -1
- package/dist/esm/testing/mocks/platform.d.ts +11 -4
- package/dist/esm/testing/mocks/platform.d.ts.map +1 -1
- package/dist/esm/testing/mocks/platform.js +27 -6
- package/dist/esm/testing/mocks/platform.js.map +1 -1
- package/dist/esm/types.d.ts +1 -1
- package/dist/esm/vaa.d.ts +4 -4
- package/package.json +1 -1
- package/src/chain.ts +76 -59
- package/src/index.ts +1 -0
- package/src/layout-items/chain.ts +1 -1
- package/src/payloads/bam.ts +66 -0
- package/src/platform.ts +29 -28
- package/src/protocols/cctp.ts +27 -0
- package/src/protocols/core.ts +13 -0
- package/src/protocols/tokenBridge.ts +43 -0
- package/src/rpc.ts +1 -15
- package/src/testing/mocks/chain.ts +17 -8
- package/src/testing/mocks/platform.ts +40 -13
- package/src/types.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../src/testing/mocks/platform.ts"],"names":[],"mappings":";;;AAKA,
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../src/testing/mocks/platform.ts"],"names":[],"mappings":";;;AAKA,6BAee;AACf,+BAAgC;AAChC,mCAAoC;AACpC,+CAAgD;AAGhD,SAAgB,mBAAmB,CACjC,OAAgB,EAChB,CAAI,EACJ,MAAoB;IAEpB,MAAM,oBAAqB,SAAQ,YAAe;QACvC,QAAQ,GAAG,CAAC,CAAC;KACvB;IACD,OAAO,IAAI,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CA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,CAAC,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,GAAqB;QAErB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,eAAe,CAAC,GAAqB;QACzC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,gBAAgB,CACpB,GAAqB;QAErB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,wBAAwB,CAC5B,GAAqB;QAErB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF;AAzID,oCAyIC"}
|
package/dist/cjs/types.d.ts
CHANGED
package/dist/cjs/vaa.d.ts
CHANGED
|
@@ -61,8 +61,8 @@ declare const baseLayout: readonly [{
|
|
|
61
61
|
readonly size: 4;
|
|
62
62
|
}, {
|
|
63
63
|
readonly custom: {
|
|
64
|
-
to: (val: number) => "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "
|
|
65
|
-
from: (val: "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "
|
|
64
|
+
to: (val: number) => "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia";
|
|
65
|
+
from: (val: "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia") => number;
|
|
66
66
|
};
|
|
67
67
|
readonly binary: "uint";
|
|
68
68
|
readonly size: 2;
|
|
@@ -121,8 +121,8 @@ export declare const create: <PL extends keyof Wormhole.PayloadLiteralToDescript
|
|
|
121
121
|
readonly size: 4;
|
|
122
122
|
}, {
|
|
123
123
|
readonly custom: {
|
|
124
|
-
to: (val: number) => "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "
|
|
125
|
-
from: (val: "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "
|
|
124
|
+
to: (val: number) => "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia";
|
|
125
|
+
from: (val: "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia") => number;
|
|
126
126
|
};
|
|
127
127
|
readonly binary: "uint";
|
|
128
128
|
readonly size: 2;
|
package/dist/esm/chain.d.ts
CHANGED
|
@@ -3,29 +3,30 @@ import { Platform } from "./platform";
|
|
|
3
3
|
import { RpcConnection } from "./rpc";
|
|
4
4
|
import { AutomaticTokenBridge, TokenBridge } from "./protocols/tokenBridge";
|
|
5
5
|
import { AutomaticCircleBridge, CircleBridge } from "./protocols/cctp";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type OmitChainRpc<P extends PlatformName, F extends keyof Platform<P>> = _omitRpc<P, _omitChain<Platform<P>[F]>>;
|
|
9
|
-
type OmitRpc<P extends PlatformName, F extends keyof Platform<P>> = _omitRpc<P, Platform<P>[F]>;
|
|
10
|
-
type OmitChain<P extends PlatformName, F extends keyof Platform<P>> = _omitChain<Platform<P>[F]>;
|
|
6
|
+
import { SignedTx, TokenId } from "./types";
|
|
7
|
+
import { WormholeMessageId } from "./attestation";
|
|
11
8
|
export declare abstract class ChainContext<P extends PlatformName> {
|
|
12
|
-
readonly platform: Platform<P>;
|
|
13
9
|
readonly chain: ChainName;
|
|
10
|
+
protected rpc?: RpcConnection<P>;
|
|
14
11
|
protected tokenBridge?: TokenBridge<P>;
|
|
15
12
|
protected autoTokenBridge?: AutomaticTokenBridge<P>;
|
|
16
13
|
protected circleBridge?: CircleBridge<P>;
|
|
17
14
|
protected autoCircleBridge?: AutomaticCircleBridge<P>;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
abstract platform: Platform<P>;
|
|
16
|
+
constructor(chain: ChainName);
|
|
17
|
+
getRpc(): RpcConnection<P>;
|
|
18
|
+
getDecimals(token: TokenId | "native"): Promise<bigint>;
|
|
19
|
+
getBalance(walletAddr: string, token: TokenId | "native"): Promise<bigint | null>;
|
|
20
|
+
getCurrentBlock(): Promise<number>;
|
|
21
|
+
parseTransaction(txid: string): Promise<WormholeMessageId[]>;
|
|
22
|
+
sendWait(stxns: SignedTx): Promise<string[]>;
|
|
23
|
+
supportsTokenBridge: () => boolean;
|
|
24
|
+
getTokenBridge(): Promise<TokenBridge<P>>;
|
|
25
|
+
supportsAutomaticTokenBridge: () => boolean;
|
|
26
|
+
getAutomaticTokenBridge(): Promise<AutomaticTokenBridge<P>>;
|
|
27
|
+
supportsCircleBridge: () => boolean;
|
|
28
|
+
getCircleBridge(): Promise<CircleBridge<P>>;
|
|
29
|
+
supportsAutomaticCircleBridge: () => boolean;
|
|
30
|
+
getAutomaticCircleBridge(): Promise<AutomaticCircleBridge<P>>;
|
|
29
31
|
}
|
|
30
|
-
export {};
|
|
31
32
|
//# sourceMappingURL=chain.d.ts.map
|
package/dist/esm/chain.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../src/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../src/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,8BAAsB,YAAY,CAAC,CAAC,SAAS,YAAY;IAU3C,QAAQ,CAAC,KAAK,EAAE,SAAS;IARrC,SAAS,CAAC,GAAG,CAA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80 @@
|
|
|
1
|
+
import { supportsAutomaticCircleBridge, supportsCircleBridge, } from "./protocols/cctp";
|
|
2
|
+
import { supportsAutomaticTokenBridge, supportsTokenBridge, } from "./protocols/tokenBridge";
|
|
1
3
|
export class ChainContext {
|
|
2
|
-
platform;
|
|
3
4
|
chain;
|
|
4
5
|
// Cached Protocol clients
|
|
6
|
+
rpc;
|
|
5
7
|
tokenBridge;
|
|
6
8
|
autoTokenBridge;
|
|
7
9
|
circleBridge;
|
|
8
10
|
autoCircleBridge;
|
|
9
|
-
constructor(
|
|
10
|
-
this.platform = platform;
|
|
11
|
+
constructor(chain) {
|
|
11
12
|
this.chain = chain;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
getRpc() {
|
|
15
|
+
this.rpc = this.rpc ? this.rpc : this.platform.getRpc(this.chain);
|
|
16
|
+
return this.rpc;
|
|
17
|
+
}
|
|
18
|
+
// Get the number of decimals for a token
|
|
19
|
+
async getDecimals(token) {
|
|
15
20
|
return this.platform.getDecimals(this.chain, this.getRpc(), token);
|
|
16
|
-
}
|
|
17
|
-
|
|
21
|
+
}
|
|
22
|
+
// Get the balance of a token for a given address
|
|
23
|
+
async getBalance(walletAddr, token) {
|
|
18
24
|
return this.platform.getBalance(this.chain, this.getRpc(), walletAddr, token);
|
|
19
|
-
}
|
|
25
|
+
}
|
|
26
|
+
async getCurrentBlock() {
|
|
27
|
+
return this.platform.getCurrentBlock(this.getRpc());
|
|
28
|
+
}
|
|
20
29
|
// Get details about the transaction
|
|
21
|
-
parseTransaction
|
|
30
|
+
async parseTransaction(txid) {
|
|
22
31
|
return this.platform.parseTransaction(this.chain, this.getRpc(), txid);
|
|
23
|
-
}
|
|
32
|
+
}
|
|
24
33
|
// Send a transaction and wait for it to be confirmed
|
|
25
|
-
sendWait
|
|
34
|
+
async sendWait(stxns) {
|
|
26
35
|
return this.platform.sendWait(this.chain, this.getRpc(), stxns);
|
|
27
|
-
}
|
|
28
|
-
//
|
|
29
|
-
parseAddress = (address) => {
|
|
30
|
-
return this.platform.parseAddress(this.chain, address);
|
|
31
|
-
};
|
|
36
|
+
}
|
|
37
|
+
//
|
|
32
38
|
// protocols
|
|
33
|
-
|
|
39
|
+
//
|
|
40
|
+
//
|
|
41
|
+
supportsTokenBridge = () => supportsTokenBridge(this.platform);
|
|
42
|
+
async getTokenBridge() {
|
|
43
|
+
if (!supportsTokenBridge(this.platform))
|
|
44
|
+
throw new Error("Platform does not support TokenBridge");
|
|
34
45
|
this.tokenBridge = this.tokenBridge
|
|
35
46
|
? this.tokenBridge
|
|
36
47
|
: await this.platform.getTokenBridge(this.getRpc());
|
|
37
48
|
return this.tokenBridge;
|
|
38
|
-
}
|
|
39
|
-
|
|
49
|
+
}
|
|
50
|
+
supportsAutomaticTokenBridge = () => supportsAutomaticTokenBridge(this.platform);
|
|
51
|
+
async getAutomaticTokenBridge() {
|
|
52
|
+
if (!supportsAutomaticTokenBridge(this.platform))
|
|
53
|
+
throw new Error("Platform does not support AutomaticTokenBridge");
|
|
40
54
|
this.autoTokenBridge = this.autoTokenBridge
|
|
41
55
|
? this.autoTokenBridge
|
|
42
56
|
: await this.platform.getAutomaticTokenBridge(this.getRpc());
|
|
43
57
|
return this.autoTokenBridge;
|
|
44
|
-
}
|
|
45
|
-
|
|
58
|
+
}
|
|
59
|
+
//
|
|
60
|
+
supportsCircleBridge = () => supportsCircleBridge(this.platform);
|
|
61
|
+
async getCircleBridge() {
|
|
62
|
+
if (!supportsCircleBridge(this.platform))
|
|
63
|
+
throw new Error("Platform does not support CircleBridge");
|
|
46
64
|
this.circleBridge = this.circleBridge
|
|
47
65
|
? this.circleBridge
|
|
48
66
|
: await this.platform.getCircleBridge(this.getRpc());
|
|
49
67
|
return this.circleBridge;
|
|
50
|
-
}
|
|
51
|
-
|
|
68
|
+
}
|
|
69
|
+
//
|
|
70
|
+
supportsAutomaticCircleBridge = () => supportsAutomaticCircleBridge(this.platform);
|
|
71
|
+
async getAutomaticCircleBridge() {
|
|
72
|
+
if (!supportsAutomaticCircleBridge(this.platform))
|
|
73
|
+
throw new Error("Platform does not support AutomaticCircleBridge");
|
|
52
74
|
this.autoCircleBridge = this.autoCircleBridge
|
|
53
75
|
? this.autoCircleBridge
|
|
54
76
|
: await this.platform.getAutomaticCircleBridge(this.getRpc());
|
|
55
77
|
return this.autoCircleBridge;
|
|
56
|
-
}
|
|
78
|
+
}
|
|
57
79
|
}
|
|
58
80
|
//# sourceMappingURL=chain.js.map
|
package/dist/esm/chain.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/chain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/chain.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAQjC,MAAM,OAAgB,YAAY;IAUX;IATrB,0BAA0B;IAChB,GAAG,CAAoB;IACvB,WAAW,CAAkB;IAC7B,eAAe,CAA2B;IAC1C,YAAY,CAAmB;IAC/B,gBAAgB,CAA4B;IAItD,YAAqB,KAAgB;QAAhB,UAAK,GAAL,KAAK,CAAW;IAAG,CAAC;IAEzC,MAAM;QACJ,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED,yCAAyC;IACzC,KAAK,CAAC,WAAW,CAAC,KAAyB;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,KAAK,C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,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF"}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC;AAChC,OAAO,gBAAgB,CAAC;AAExB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AAExB,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AAEjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC"}
|
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC;AAChC,OAAO,gBAAgB,CAAC;AAExB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AAExB,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AAEjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
export declare const chainItemBase: {
|
|
2
|
+
readonly binary: "uint";
|
|
3
|
+
readonly size: 2;
|
|
4
|
+
};
|
|
1
5
|
type AllowNull<T, B extends boolean> = B extends true ? T | null : T;
|
|
2
|
-
export declare const chainItem: <C extends readonly ("Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "
|
|
6
|
+
export declare const chainItem: <C extends readonly ("Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia")[] = readonly ["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", "Wormchain", "Cosmoshub", "Evmos", "Kujira", "Sepolia"], N extends boolean = false>(opts?: {
|
|
3
7
|
allowedChains?: C | undefined;
|
|
4
8
|
allowNull?: N | undefined;
|
|
5
9
|
} | undefined) => {
|
|
@@ -10,14 +14,14 @@ export declare const chainItem: <C extends readonly ("Solana" | "Btc" | "Algoran
|
|
|
10
14
|
readonly binary: "uint";
|
|
11
15
|
readonly size: 2;
|
|
12
16
|
};
|
|
13
|
-
export declare const fixedChainItem: <C extends "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "
|
|
17
|
+
export declare const fixedChainItem: <C extends "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia">(chain: C) => {
|
|
14
18
|
readonly custom: {
|
|
15
19
|
to: C;
|
|
16
|
-
from: (C extends bigint | boolean | PropertyKey ? import("@wormhole-foundation/sdk-base").AssertType<C extends bigint ? `bigint(${C})` : C extends boolean ? `boolean(${C})` : C, PropertyKey> : never) extends "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "
|
|
20
|
+
from: (C extends bigint | boolean | PropertyKey ? import("@wormhole-foundation/sdk-base").AssertType<C extends bigint ? `bigint(${C})` : C extends boolean ? `boolean(${C})` : C, PropertyKey> : never) extends "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" ? import("@wormhole-foundation/sdk-base").ObjectFromMappingEntries<readonly [readonly ["Solana", 1], readonly ["Ethereum", 2], readonly ["Terra", 3], readonly ["Bsc", 4], readonly ["Polygon", 5], readonly ["Avalanche", 6], readonly ["Oasis", 7], readonly ["Algorand", 8], readonly ["Aurora", 9], readonly ["Fantom", 10], readonly ["Karura", 11], readonly ["Acala", 12], readonly ["Klaytn", 13], readonly ["Celo", 14], readonly ["Near", 15], readonly ["Moonbeam", 16], readonly ["Neon", 17], readonly ["Terra2", 18], readonly ["Injective", 19], readonly ["Osmosis", 20], readonly ["Sui", 21], readonly ["Aptos", 22], readonly ["Arbitrum", 23], readonly ["Optimism", 24], readonly ["Gnosis", 25], readonly ["Pythnet", 26], readonly ["Xpla", 28], readonly ["Btc", 29], readonly ["Base", 30], readonly ["Sei", 32], readonly ["Rootstock", 33], readonly ["Wormchain", 3104], readonly ["Cosmoshub", 4000], readonly ["Evmos", 4001], readonly ["Kujira", 4002], readonly ["Sepolia", 10002]]>[("Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia") & (C extends bigint | boolean | PropertyKey ? import("@wormhole-foundation/sdk-base").AssertType<C extends bigint ? `bigint(${C})` : C extends boolean ? `boolean(${C})` : C, PropertyKey> : never)] extends {
|
|
17
21
|
[key: string]: unknown;
|
|
18
22
|
[key: number]: unknown;
|
|
19
23
|
[key: symbol]: unknown;
|
|
20
|
-
} ? import("@wormhole-foundation/sdk-base").ObjectFromMappingEntries<readonly [readonly ["Solana", 1], readonly ["Ethereum", 2], readonly ["Terra", 3], readonly ["Bsc", 4], readonly ["Polygon", 5], readonly ["Avalanche", 6], readonly ["Oasis", 7], readonly ["Algorand", 8], readonly ["Aurora", 9], readonly ["Fantom", 10], readonly ["Karura", 11], readonly ["Acala", 12], readonly ["Klaytn", 13], readonly ["Celo", 14], readonly ["Near", 15], readonly ["Moonbeam", 16], readonly ["Neon", 17], readonly ["Terra2", 18], readonly ["Injective", 19], readonly ["Osmosis", 20], readonly ["Sui", 21], readonly ["Aptos", 22], readonly ["Arbitrum", 23], readonly ["Optimism", 24], readonly ["Gnosis", 25], readonly ["Pythnet", 26], readonly ["Xpla", 28], readonly ["Btc", 29], readonly ["Base", 30], readonly ["Sei", 32], readonly ["Wormchain", 3104], readonly ["Sepolia", 10002]]>[("Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "
|
|
24
|
+
} ? import("@wormhole-foundation/sdk-base").ObjectFromMappingEntries<readonly [readonly ["Solana", 1], readonly ["Ethereum", 2], readonly ["Terra", 3], readonly ["Bsc", 4], readonly ["Polygon", 5], readonly ["Avalanche", 6], readonly ["Oasis", 7], readonly ["Algorand", 8], readonly ["Aurora", 9], readonly ["Fantom", 10], readonly ["Karura", 11], readonly ["Acala", 12], readonly ["Klaytn", 13], readonly ["Celo", 14], readonly ["Near", 15], readonly ["Moonbeam", 16], readonly ["Neon", 17], readonly ["Terra2", 18], readonly ["Injective", 19], readonly ["Osmosis", 20], readonly ["Sui", 21], readonly ["Aptos", 22], readonly ["Arbitrum", 23], readonly ["Optimism", 24], readonly ["Gnosis", 25], readonly ["Pythnet", 26], readonly ["Xpla", 28], readonly ["Btc", 29], readonly ["Base", 30], readonly ["Sei", 32], readonly ["Rootstock", 33], readonly ["Wormchain", 3104], readonly ["Cosmoshub", 4000], readonly ["Evmos", 4001], readonly ["Kujira", 4002], readonly ["Sepolia", 10002]]>[("Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia") & (C extends bigint | boolean | PropertyKey ? import("@wormhole-foundation/sdk-base").AssertType<C extends bigint ? `bigint(${C})` : C extends boolean ? `boolean(${C})` : C, PropertyKey> : never)] : import("@wormhole-foundation/sdk-base").ObjectFromMappingEntries<readonly [readonly ["Solana", 1], readonly ["Ethereum", 2], readonly ["Terra", 3], readonly ["Bsc", 4], readonly ["Polygon", 5], readonly ["Avalanche", 6], readonly ["Oasis", 7], readonly ["Algorand", 8], readonly ["Aurora", 9], readonly ["Fantom", 10], readonly ["Karura", 11], readonly ["Acala", 12], readonly ["Klaytn", 13], readonly ["Celo", 14], readonly ["Near", 15], readonly ["Moonbeam", 16], readonly ["Neon", 17], readonly ["Terra2", 18], readonly ["Injective", 19], readonly ["Osmosis", 20], readonly ["Sui", 21], readonly ["Aptos", 22], readonly ["Arbitrum", 23], readonly ["Optimism", 24], readonly ["Gnosis", 25], readonly ["Pythnet", 26], readonly ["Xpla", 28], readonly ["Btc", 29], readonly ["Base", 30], readonly ["Sei", 32], readonly ["Rootstock", 33], readonly ["Wormchain", 3104], readonly ["Cosmoshub", 4000], readonly ["Evmos", 4001], readonly ["Kujira", 4002], readonly ["Sepolia", 10002]]>[("Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia") & (C extends bigint | boolean | PropertyKey ? import("@wormhole-foundation/sdk-base").AssertType<C extends bigint ? `bigint(${C})` : C extends boolean ? `boolean(${C})` : C, PropertyKey> : never)] : never;
|
|
21
25
|
};
|
|
22
26
|
readonly binary: "uint";
|
|
23
27
|
readonly size: 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../src/layout-items/chain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../../src/layout-items/chain.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa;;;CAAuC,CAAC;AAElE,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;AAErE,eAAO,MAAM,SAAS;;;;;kBAUN,MAAM;gDAmBsB,MAAM;;;;CAGE,CAAC;AAErD,eAAO,MAAM,cAAc;;;;;;;;;;;CAOyB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { chains, toChainId, chainToChainId, chainIdToChain, } from "@wormhole-foundation/sdk-base";
|
|
2
|
-
const chainItemBase = { binary: "uint", size: 2 };
|
|
2
|
+
export const chainItemBase = { binary: "uint", size: 2 };
|
|
3
3
|
export const chainItem = (opts) => ({
|
|
4
4
|
...chainItemBase,
|
|
5
5
|
custom: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../src/layout-items/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,SAAS,EACT,cAAc,EACd,cAAc,GAKf,MAAM,+BAA+B,CAAC;AAEvC,MAAM,aAAa,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../src/layout-items/chain.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,SAAS,EACT,cAAc,EACd,cAAc,GAKf,MAAM,+BAA+B,CAAC;AAEvC,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAW,CAAC;AAIlE,MAAM,CAAC,MAAM,SAAS,GAAG,CAGvB,IAGD,EAAE,EAAE,CACH,CAAC;IACC,GAAG,aAAa;IAChB,MAAM,EAAE;QACN,EAAE,EAAE,CAAC,GAAW,EAA2B,EAAE;YAC3C,IAAI,GAAG,KAAK,CAAC,EAAE;gBACb,IAAI,CAAC,IAAI,EAAE,SAAS;oBAClB,MAAM,IAAI,KAAK,CACb,mDAAmD,CACpD,CAAC;gBAEJ,OAAO,IAA+B,CAAC;aACxC;YAED,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7C,MAAM,aAAa,GAAG,IAAI,EAAE,aAAa,IAAI,MAAM,CAAC;YACpD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAChC,MAAM,IAAI,KAAK,CACb,SAAS,KAAK,0BAA0B,aAAa,EAAE,CACxD,CAAC;YAEJ,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,EAAE,CAAC,GAA4B,EAAU,EAAE,CAC7C,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC;KACoB;CACd,CAAC,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAsB,KAAQ,EAAE,EAAE,CAC9D,CAAC;IACC,GAAG,aAAa;IAChB,MAAM,EAAE;QACN,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;KACS;CACS,CAAC,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { ShallowMapping } from "@wormhole-foundation/sdk-base";
|
|
2
|
+
export declare const bamPayloads: readonly [readonly ["BamMessage", readonly [{
|
|
3
|
+
readonly name: "magicByte";
|
|
4
|
+
readonly binary: "uint";
|
|
5
|
+
readonly size: 1;
|
|
6
|
+
readonly custom: 187;
|
|
7
|
+
readonly omit: true;
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "version";
|
|
10
|
+
readonly binary: "uint";
|
|
11
|
+
readonly size: 1;
|
|
12
|
+
readonly custom: 0;
|
|
13
|
+
readonly omit: true;
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "type";
|
|
16
|
+
readonly binary: "uint";
|
|
17
|
+
readonly size: 1;
|
|
18
|
+
readonly custom: 0;
|
|
19
|
+
readonly omit: true;
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "index";
|
|
22
|
+
readonly binary: "uint";
|
|
23
|
+
readonly size: 8;
|
|
24
|
+
}, {
|
|
25
|
+
readonly custom: {
|
|
26
|
+
to: (val: number) => "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia";
|
|
27
|
+
from: (val: "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia") => number;
|
|
28
|
+
};
|
|
29
|
+
readonly binary: "uint";
|
|
30
|
+
readonly size: 2;
|
|
31
|
+
readonly name: "targetChain";
|
|
32
|
+
}, {
|
|
33
|
+
readonly binary: "bytes";
|
|
34
|
+
readonly lengthSize: 2;
|
|
35
|
+
readonly name: "targetAddress";
|
|
36
|
+
}, {
|
|
37
|
+
readonly binary: "bytes";
|
|
38
|
+
readonly lengthSize: 2;
|
|
39
|
+
readonly name: "senderAddress";
|
|
40
|
+
}, {
|
|
41
|
+
readonly custom: any;
|
|
42
|
+
readonly name: "contents";
|
|
43
|
+
readonly binary: "bytes";
|
|
44
|
+
readonly lengthSize: 2;
|
|
45
|
+
} | {
|
|
46
|
+
readonly custom?: undefined;
|
|
47
|
+
readonly name: "contents";
|
|
48
|
+
readonly binary: "bytes";
|
|
49
|
+
readonly lengthSize: 2;
|
|
50
|
+
}]], readonly ["BamTokenMessage", readonly [{
|
|
51
|
+
readonly name: "magicByte";
|
|
52
|
+
readonly binary: "uint";
|
|
53
|
+
readonly size: 1;
|
|
54
|
+
readonly custom: 187;
|
|
55
|
+
readonly omit: true;
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "version";
|
|
58
|
+
readonly binary: "uint";
|
|
59
|
+
readonly size: 1;
|
|
60
|
+
readonly custom: 0;
|
|
61
|
+
readonly omit: true;
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "type";
|
|
64
|
+
readonly binary: "uint";
|
|
65
|
+
readonly size: 1;
|
|
66
|
+
readonly custom: 1;
|
|
67
|
+
readonly omit: true;
|
|
68
|
+
}, {
|
|
69
|
+
readonly name: "index";
|
|
70
|
+
readonly binary: "uint";
|
|
71
|
+
readonly size: 8;
|
|
72
|
+
}, {
|
|
73
|
+
readonly custom: {
|
|
74
|
+
to: (val: number) => "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia";
|
|
75
|
+
from: (val: "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia") => number;
|
|
76
|
+
};
|
|
77
|
+
readonly binary: "uint";
|
|
78
|
+
readonly size: 2;
|
|
79
|
+
readonly name: "targetChain";
|
|
80
|
+
}, {
|
|
81
|
+
readonly binary: "bytes";
|
|
82
|
+
readonly lengthSize: 2;
|
|
83
|
+
readonly name: "targetAddress";
|
|
84
|
+
}, {
|
|
85
|
+
readonly binary: "bytes";
|
|
86
|
+
readonly lengthSize: 2;
|
|
87
|
+
readonly name: "senderAddress";
|
|
88
|
+
}, {
|
|
89
|
+
readonly custom: any;
|
|
90
|
+
readonly name: "contents";
|
|
91
|
+
readonly binary: "bytes";
|
|
92
|
+
readonly lengthSize: 2;
|
|
93
|
+
} | {
|
|
94
|
+
readonly custom?: undefined;
|
|
95
|
+
readonly name: "contents";
|
|
96
|
+
readonly binary: "bytes";
|
|
97
|
+
readonly lengthSize: 2;
|
|
98
|
+
}, {
|
|
99
|
+
readonly custom: any;
|
|
100
|
+
readonly name: "bridge";
|
|
101
|
+
readonly binary: "uint";
|
|
102
|
+
readonly size: 1;
|
|
103
|
+
} | {
|
|
104
|
+
readonly custom?: undefined;
|
|
105
|
+
readonly name: "bridge";
|
|
106
|
+
readonly binary: "uint";
|
|
107
|
+
readonly size: 1;
|
|
108
|
+
}, {
|
|
109
|
+
readonly custom: any;
|
|
110
|
+
readonly name: "assetIdentifier";
|
|
111
|
+
readonly binary: "uint";
|
|
112
|
+
readonly size: 2;
|
|
113
|
+
} | {
|
|
114
|
+
readonly custom?: undefined;
|
|
115
|
+
readonly name: "assetIdentifier";
|
|
116
|
+
readonly binary: "uint";
|
|
117
|
+
readonly size: 2;
|
|
118
|
+
}, {
|
|
119
|
+
readonly binary: "uint";
|
|
120
|
+
readonly size: 32;
|
|
121
|
+
readonly name: "amount";
|
|
122
|
+
}]], readonly ["BamExtendedMessage", readonly [{
|
|
123
|
+
readonly name: "magicByte";
|
|
124
|
+
readonly binary: "uint";
|
|
125
|
+
readonly size: 1;
|
|
126
|
+
readonly custom: 187;
|
|
127
|
+
readonly omit: true;
|
|
128
|
+
}, {
|
|
129
|
+
readonly name: "version";
|
|
130
|
+
readonly binary: "uint";
|
|
131
|
+
readonly size: 1;
|
|
132
|
+
readonly custom: 0;
|
|
133
|
+
readonly omit: true;
|
|
134
|
+
}, {
|
|
135
|
+
readonly name: "type";
|
|
136
|
+
readonly binary: "uint";
|
|
137
|
+
readonly size: 1;
|
|
138
|
+
readonly custom: 2;
|
|
139
|
+
readonly omit: true;
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "index";
|
|
142
|
+
readonly binary: "uint";
|
|
143
|
+
readonly size: 8;
|
|
144
|
+
}, {
|
|
145
|
+
readonly custom: {
|
|
146
|
+
to: (val: number) => "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia";
|
|
147
|
+
from: (val: "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia") => number;
|
|
148
|
+
};
|
|
149
|
+
readonly binary: "uint";
|
|
150
|
+
readonly size: 2;
|
|
151
|
+
readonly name: "targetChain";
|
|
152
|
+
}, {
|
|
153
|
+
readonly binary: "bytes";
|
|
154
|
+
readonly lengthSize: 2;
|
|
155
|
+
readonly name: "targetAddress";
|
|
156
|
+
}, {
|
|
157
|
+
readonly binary: "bytes";
|
|
158
|
+
readonly lengthSize: 2;
|
|
159
|
+
readonly name: "senderAddress";
|
|
160
|
+
}, {
|
|
161
|
+
readonly custom: any;
|
|
162
|
+
readonly name: "contents";
|
|
163
|
+
readonly binary: "bytes";
|
|
164
|
+
readonly lengthSize: 2;
|
|
165
|
+
} | {
|
|
166
|
+
readonly custom?: undefined;
|
|
167
|
+
readonly name: "contents";
|
|
168
|
+
readonly binary: "bytes";
|
|
169
|
+
readonly lengthSize: 2;
|
|
170
|
+
}, {
|
|
171
|
+
readonly custom: any;
|
|
172
|
+
readonly name: "relaySignal";
|
|
173
|
+
readonly binary: "bytes";
|
|
174
|
+
readonly lengthSize: 2;
|
|
175
|
+
} | {
|
|
176
|
+
readonly custom?: undefined;
|
|
177
|
+
readonly name: "relaySignal";
|
|
178
|
+
readonly binary: "bytes";
|
|
179
|
+
readonly lengthSize: 2;
|
|
180
|
+
}]]];
|
|
181
|
+
declare global {
|
|
182
|
+
namespace Wormhole {
|
|
183
|
+
interface PayloadLiteralToDescriptionMapping extends ShallowMapping<typeof bamPayloads> {
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=bam.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bam.d.ts","sourceRoot":"","sources":["../../../src/payloads/bam.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAgDtH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAImC,CAAC;AAI5D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,QAAQ,CAAC;QACjB,UAAU,kCACR,SAAQ,cAAc,CAAC,OAAO,WAAW,CAAC;SAAG;KAChD;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { chainItem, amountItem } from "../layout-items";
|
|
2
|
+
import { registerPayloadType } from "../vaa";
|
|
3
|
+
const bamAddressItem = {
|
|
4
|
+
binary: "bytes",
|
|
5
|
+
lengthSize: 2
|
|
6
|
+
};
|
|
7
|
+
const customOrEmpty = (custom) => custom ? { custom } : {};
|
|
8
|
+
const messageLayout = (type, customContents) => [
|
|
9
|
+
{ name: "magicByte", binary: "uint", size: 1, custom: 0xbb, omit: true },
|
|
10
|
+
{ name: "version", binary: "uint", size: 1, custom: 0, omit: true },
|
|
11
|
+
{ name: "type", binary: "uint", size: 1, custom: type, omit: true },
|
|
12
|
+
{ name: "index", binary: "uint", size: 8 },
|
|
13
|
+
{ name: "targetChain", ...chainItem() },
|
|
14
|
+
{ name: "targetAddress", ...bamAddressItem },
|
|
15
|
+
{ name: "senderAddress", ...bamAddressItem },
|
|
16
|
+
{ name: "contents", binary: "bytes", lengthSize: 2, ...customOrEmpty(customContents) },
|
|
17
|
+
];
|
|
18
|
+
const tokenMessageLayout = (custom) => [
|
|
19
|
+
...messageLayout(1, custom?.contents),
|
|
20
|
+
{ name: "bridge", binary: "uint", size: 1, ...customOrEmpty(custom?.bridge) },
|
|
21
|
+
{ name: "assetIdentifier", binary: "uint", size: 2, ...customOrEmpty(custom?.assetIdentifier) },
|
|
22
|
+
{ name: "amount", ...amountItem },
|
|
23
|
+
];
|
|
24
|
+
const extendedMessageLayout = (custom) => [
|
|
25
|
+
...messageLayout(2, custom?.contents),
|
|
26
|
+
{ name: "relaySignal", binary: "bytes", lengthSize: 2, ...customOrEmpty(custom?.relaySignal) },
|
|
27
|
+
];
|
|
28
|
+
export const bamPayloads = [
|
|
29
|
+
["BamMessage", messageLayout(0)],
|
|
30
|
+
["BamTokenMessage", tokenMessageLayout()],
|
|
31
|
+
["BamExtendedMessage", extendedMessageLayout()],
|
|
32
|
+
];
|
|
33
|
+
bamPayloads.forEach(([payloadLiteral, layout]) => registerPayloadType(payloadLiteral, layout));
|
|
34
|
+
//# sourceMappingURL=bam.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bam.js","sourceRoot":"","sources":["../../../src/payloads/bam.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE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