@wormhole-foundation/sdk-definitions-ntt 6.2.0 → 7.0.0-beta.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/esm/layouts/index.d.ts +1 -246
- package/dist/esm/layouts/index.d.ts.map +1 -1
- package/dist/esm/layouts/index.js +0 -5
- package/dist/esm/layouts/index.js.map +1 -1
- package/dist/esm/ntt.d.ts +2 -5
- package/dist/esm/ntt.d.ts.map +1 -1
- package/dist/esm/ntt.js +1 -4
- package/dist/esm/ntt.js.map +1 -1
- package/package.json +12 -19
- package/dist/cjs/axelar.d.ts +0 -35
- package/dist/cjs/axelar.d.ts.map +0 -1
- package/dist/cjs/axelar.js +0 -161
- package/dist/cjs/axelar.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -11
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/index.js +0 -36
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/layouts/amount.d.ts +0 -25
- package/dist/cjs/layouts/amount.d.ts.map +0 -1
- package/dist/cjs/layouts/amount.js +0 -12
- package/dist/cjs/layouts/amount.js.map +0 -1
- package/dist/cjs/layouts/index.d.ts +0 -569
- package/dist/cjs/layouts/index.d.ts.map +0 -1
- package/dist/cjs/layouts/index.js +0 -50
- package/dist/cjs/layouts/index.js.map +0 -1
- package/dist/cjs/layouts/manager.d.ts +0 -19
- package/dist/cjs/layouts/manager.d.ts.map +0 -1
- package/dist/cjs/layouts/manager.js +0 -12
- package/dist/cjs/layouts/manager.js.map +0 -1
- package/dist/cjs/layouts/multiToken.d.ts +0 -212
- package/dist/cjs/layouts/multiToken.d.ts.map +0 -1
- package/dist/cjs/layouts/multiToken.js +0 -51
- package/dist/cjs/layouts/multiToken.js.map +0 -1
- package/dist/cjs/layouts/prefix.d.ts +0 -8
- package/dist/cjs/layouts/prefix.d.ts.map +0 -1
- package/dist/cjs/layouts/prefix.js +0 -11
- package/dist/cjs/layouts/prefix.js.map +0 -1
- package/dist/cjs/layouts/transceiver.d.ts +0 -86
- package/dist/cjs/layouts/transceiver.d.ts.map +0 -1
- package/dist/cjs/layouts/transceiver.js +0 -27
- package/dist/cjs/layouts/transceiver.js.map +0 -1
- package/dist/cjs/layouts/transceiverInstructions.d.ts +0 -10
- package/dist/cjs/layouts/transceiverInstructions.d.ts.map +0 -1
- package/dist/cjs/layouts/transceiverInstructions.js +0 -10
- package/dist/cjs/layouts/transceiverInstructions.js.map +0 -1
- package/dist/cjs/layouts/transfer.d.ts +0 -54
- package/dist/cjs/layouts/transfer.d.ts.map +0 -1
- package/dist/cjs/layouts/transfer.js +0 -51
- package/dist/cjs/layouts/transfer.js.map +0 -1
- package/dist/cjs/layouts/wormhole.d.ts +0 -31
- package/dist/cjs/layouts/wormhole.d.ts.map +0 -1
- package/dist/cjs/layouts/wormhole.js +0 -7
- package/dist/cjs/layouts/wormhole.js.map +0 -1
- package/dist/cjs/multiTokenNtt.d.ts +0 -76
- package/dist/cjs/multiTokenNtt.d.ts.map +0 -1
- package/dist/cjs/multiTokenNtt.js +0 -22
- package/dist/cjs/multiTokenNtt.js.map +0 -1
- package/dist/cjs/multiTokenNttWithExecutor.d.ts +0 -31
- package/dist/cjs/multiTokenNttWithExecutor.d.ts.map +0 -1
- package/dist/cjs/multiTokenNttWithExecutor.js +0 -3
- package/dist/cjs/multiTokenNttWithExecutor.js.map +0 -1
- package/dist/cjs/ntt.d.ts +0 -279
- package/dist/cjs/ntt.d.ts.map +0 -1
- package/dist/cjs/ntt.js +0 -71
- package/dist/cjs/ntt.js.map +0 -1
- package/dist/cjs/nttWithExecutor.d.ts +0 -37
- package/dist/cjs/nttWithExecutor.d.ts.map +0 -1
- package/dist/cjs/nttWithExecutor.js +0 -3
- package/dist/cjs/nttWithExecutor.js.map +0 -1
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/trimmedAmount.d.ts +0 -7
- package/dist/cjs/trimmedAmount.d.ts.map +0 -1
- package/dist/cjs/trimmedAmount.js +0 -40
- package/dist/cjs/trimmedAmount.js.map +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CustomizableBytes, LayoutToType } from "@wormhole-foundation/sdk-base";
|
|
2
|
-
export type NttManagerMessage<P extends CustomizableBytes = undefined> = LayoutToType<ReturnType<typeof nttManagerMessageLayout<P>>>;
|
|
3
|
-
export declare const nttManagerMessageLayout: <const P extends CustomizableBytes = undefined>(customPayload?: P) => readonly [{
|
|
4
|
-
readonly name: "id";
|
|
5
|
-
readonly binary: "bytes";
|
|
6
|
-
readonly size: 32;
|
|
7
|
-
}, {
|
|
8
|
-
readonly binary: "bytes";
|
|
9
|
-
readonly size: 32;
|
|
10
|
-
readonly custom: {
|
|
11
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
12
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
13
|
-
};
|
|
14
|
-
readonly name: "sender";
|
|
15
|
-
}, import("binary-layout").CustomizableBytesReturn<{
|
|
16
|
-
readonly name: "payload";
|
|
17
|
-
readonly lengthSize: 2;
|
|
18
|
-
}, P>];
|
|
19
|
-
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/layouts/manager.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAEjB,YAAY,EAEb,MAAM,+BAA+B,CAAC;AAEvC,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,iBAAiB,GAAG,SAAS,IACnE,YAAY,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9D,eAAO,MAAM,uBAAuB,GAClC,KAAK,CAAC,CAAC,SAAS,iBAAiB,GAAG,SAAS,EAE7C,gBAAgB,CAAC;;;;;;;;;;;;;;;MAMU,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nttManagerMessageLayout = void 0;
|
|
4
|
-
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
5
|
-
const sdk_base_1 = require("@wormhole-foundation/sdk-base");
|
|
6
|
-
const nttManagerMessageLayout = (customPayload) => [
|
|
7
|
-
{ name: "id", binary: "bytes", size: 32 },
|
|
8
|
-
{ name: "sender", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
9
|
-
(0, sdk_base_1.customizableBytes)({ name: "payload", lengthSize: 2 }, customPayload),
|
|
10
|
-
];
|
|
11
|
-
exports.nttManagerMessageLayout = nttManagerMessageLayout;
|
|
12
|
-
//# sourceMappingURL=manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../src/layouts/manager.ts"],"names":[],"mappings":";;;AAAA,0EAAmE;AACnE,4DAKuC;AAKhC,MAAM,uBAAuB,GAAG,CAGrC,aAAiB,EACjB,EAAE,CACF;IACE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IACzC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACvD,IAAA,4BAAiB,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;CAC3C,CAAC;AATjB,QAAA,uBAAuB,2BASN"}
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { CustomizableBytes } from "@wormhole-foundation/sdk-base";
|
|
2
|
-
export declare const tokenMetaLayoutItem: {
|
|
3
|
-
readonly binary: "bytes";
|
|
4
|
-
readonly layout: readonly [{
|
|
5
|
-
readonly binary: "bytes";
|
|
6
|
-
readonly size: number;
|
|
7
|
-
readonly custom: {
|
|
8
|
-
to: (val: Uint8Array) => string;
|
|
9
|
-
from: (val: string) => Uint8Array;
|
|
10
|
-
};
|
|
11
|
-
readonly name: "name";
|
|
12
|
-
}, {
|
|
13
|
-
readonly binary: "bytes";
|
|
14
|
-
readonly size: number;
|
|
15
|
-
readonly custom: {
|
|
16
|
-
to: (val: Uint8Array) => string;
|
|
17
|
-
from: (val: string) => Uint8Array;
|
|
18
|
-
};
|
|
19
|
-
readonly name: "symbol";
|
|
20
|
-
}, {
|
|
21
|
-
readonly name: "decimals";
|
|
22
|
-
readonly binary: "uint";
|
|
23
|
-
readonly size: 1;
|
|
24
|
-
}];
|
|
25
|
-
};
|
|
26
|
-
export declare const tokenIdLayoutItem: {
|
|
27
|
-
readonly binary: "bytes";
|
|
28
|
-
readonly layout: readonly [{
|
|
29
|
-
readonly custom: {
|
|
30
|
-
to: (val: number) => "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore";
|
|
31
|
-
from: (val: "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore") => number;
|
|
32
|
-
};
|
|
33
|
-
readonly binary: "uint";
|
|
34
|
-
readonly size: 2;
|
|
35
|
-
readonly name: "chainId";
|
|
36
|
-
}, {
|
|
37
|
-
readonly binary: "bytes";
|
|
38
|
-
readonly size: 32;
|
|
39
|
-
readonly custom: {
|
|
40
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
41
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
42
|
-
};
|
|
43
|
-
readonly name: "tokenAddress";
|
|
44
|
-
}];
|
|
45
|
-
};
|
|
46
|
-
export declare const tokenInfoLayoutItem: {
|
|
47
|
-
readonly binary: "bytes";
|
|
48
|
-
readonly layout: readonly [{
|
|
49
|
-
readonly binary: "bytes";
|
|
50
|
-
readonly layout: readonly [{
|
|
51
|
-
readonly binary: "bytes";
|
|
52
|
-
readonly size: number;
|
|
53
|
-
readonly custom: {
|
|
54
|
-
to: (val: Uint8Array) => string;
|
|
55
|
-
from: (val: string) => Uint8Array;
|
|
56
|
-
};
|
|
57
|
-
readonly name: "name";
|
|
58
|
-
}, {
|
|
59
|
-
readonly binary: "bytes";
|
|
60
|
-
readonly size: number;
|
|
61
|
-
readonly custom: {
|
|
62
|
-
to: (val: Uint8Array) => string;
|
|
63
|
-
from: (val: string) => Uint8Array;
|
|
64
|
-
};
|
|
65
|
-
readonly name: "symbol";
|
|
66
|
-
}, {
|
|
67
|
-
readonly name: "decimals";
|
|
68
|
-
readonly binary: "uint";
|
|
69
|
-
readonly size: 1;
|
|
70
|
-
}];
|
|
71
|
-
readonly name: "meta";
|
|
72
|
-
}, {
|
|
73
|
-
readonly binary: "bytes";
|
|
74
|
-
readonly layout: readonly [{
|
|
75
|
-
readonly custom: {
|
|
76
|
-
to: (val: number) => "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore";
|
|
77
|
-
from: (val: "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore") => number;
|
|
78
|
-
};
|
|
79
|
-
readonly binary: "uint";
|
|
80
|
-
readonly size: 2;
|
|
81
|
-
readonly name: "chainId";
|
|
82
|
-
}, {
|
|
83
|
-
readonly binary: "bytes";
|
|
84
|
-
readonly size: 32;
|
|
85
|
-
readonly custom: {
|
|
86
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
87
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
88
|
-
};
|
|
89
|
-
readonly name: "tokenAddress";
|
|
90
|
-
}];
|
|
91
|
-
readonly name: "token";
|
|
92
|
-
}];
|
|
93
|
-
};
|
|
94
|
-
export declare const multiTokenNativeTokenTransferLayout: readonly [{
|
|
95
|
-
readonly name: "prefix";
|
|
96
|
-
readonly binary: "bytes";
|
|
97
|
-
readonly custom: Uint8Array<ArrayBuffer>;
|
|
98
|
-
readonly omit: true;
|
|
99
|
-
}, {
|
|
100
|
-
readonly binary: "bytes";
|
|
101
|
-
readonly layout: readonly [{
|
|
102
|
-
readonly name: "decimals";
|
|
103
|
-
readonly binary: "uint";
|
|
104
|
-
readonly size: 1;
|
|
105
|
-
}, {
|
|
106
|
-
readonly name: "amount";
|
|
107
|
-
readonly binary: "uint";
|
|
108
|
-
readonly size: 8;
|
|
109
|
-
}];
|
|
110
|
-
readonly name: "trimmedAmount";
|
|
111
|
-
}, {
|
|
112
|
-
readonly binary: "bytes";
|
|
113
|
-
readonly layout: readonly [{
|
|
114
|
-
readonly binary: "bytes";
|
|
115
|
-
readonly layout: readonly [{
|
|
116
|
-
readonly binary: "bytes";
|
|
117
|
-
readonly size: number;
|
|
118
|
-
readonly custom: {
|
|
119
|
-
to: (val: Uint8Array) => string;
|
|
120
|
-
from: (val: string) => Uint8Array;
|
|
121
|
-
};
|
|
122
|
-
readonly name: "name";
|
|
123
|
-
}, {
|
|
124
|
-
readonly binary: "bytes";
|
|
125
|
-
readonly size: number;
|
|
126
|
-
readonly custom: {
|
|
127
|
-
to: (val: Uint8Array) => string;
|
|
128
|
-
from: (val: string) => Uint8Array;
|
|
129
|
-
};
|
|
130
|
-
readonly name: "symbol";
|
|
131
|
-
}, {
|
|
132
|
-
readonly name: "decimals";
|
|
133
|
-
readonly binary: "uint";
|
|
134
|
-
readonly size: 1;
|
|
135
|
-
}];
|
|
136
|
-
readonly name: "meta";
|
|
137
|
-
}, {
|
|
138
|
-
readonly binary: "bytes";
|
|
139
|
-
readonly layout: readonly [{
|
|
140
|
-
readonly custom: {
|
|
141
|
-
to: (val: number) => "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore";
|
|
142
|
-
from: (val: "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore") => number;
|
|
143
|
-
};
|
|
144
|
-
readonly binary: "uint";
|
|
145
|
-
readonly size: 2;
|
|
146
|
-
readonly name: "chainId";
|
|
147
|
-
}, {
|
|
148
|
-
readonly binary: "bytes";
|
|
149
|
-
readonly size: 32;
|
|
150
|
-
readonly custom: {
|
|
151
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
152
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
153
|
-
};
|
|
154
|
-
readonly name: "tokenAddress";
|
|
155
|
-
}];
|
|
156
|
-
readonly name: "token";
|
|
157
|
-
}];
|
|
158
|
-
readonly name: "token";
|
|
159
|
-
}, {
|
|
160
|
-
readonly binary: "bytes";
|
|
161
|
-
readonly size: 32;
|
|
162
|
-
readonly custom: {
|
|
163
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
164
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
165
|
-
};
|
|
166
|
-
readonly name: "sender";
|
|
167
|
-
}, {
|
|
168
|
-
readonly binary: "bytes";
|
|
169
|
-
readonly size: 32;
|
|
170
|
-
readonly custom: {
|
|
171
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
172
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
173
|
-
};
|
|
174
|
-
readonly name: "to";
|
|
175
|
-
}, import("binary-layout").CustomizableBytesReturn<{
|
|
176
|
-
readonly name: "additionalPayload";
|
|
177
|
-
readonly lengthSize: 2;
|
|
178
|
-
}, CustomizableBytes>];
|
|
179
|
-
export declare const genericMessageLayout: <D extends CustomizableBytes>(data?: D) => readonly [{
|
|
180
|
-
readonly name: "prefix";
|
|
181
|
-
readonly binary: "bytes";
|
|
182
|
-
readonly custom: Uint8Array<ArrayBuffer>;
|
|
183
|
-
readonly omit: true;
|
|
184
|
-
}, {
|
|
185
|
-
readonly custom: {
|
|
186
|
-
to: (val: number) => "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore";
|
|
187
|
-
from: (val: "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore") => number;
|
|
188
|
-
};
|
|
189
|
-
readonly binary: "uint";
|
|
190
|
-
readonly size: 2;
|
|
191
|
-
readonly name: "toChain";
|
|
192
|
-
}, {
|
|
193
|
-
readonly binary: "bytes";
|
|
194
|
-
readonly size: 32;
|
|
195
|
-
readonly custom: {
|
|
196
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
197
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
198
|
-
};
|
|
199
|
-
readonly name: "callee";
|
|
200
|
-
}, {
|
|
201
|
-
readonly binary: "bytes";
|
|
202
|
-
readonly size: 32;
|
|
203
|
-
readonly custom: {
|
|
204
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
205
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
206
|
-
};
|
|
207
|
-
readonly name: "sender";
|
|
208
|
-
}, import("binary-layout").CustomizableBytesReturn<{
|
|
209
|
-
readonly name: "data";
|
|
210
|
-
readonly lengthSize: 2;
|
|
211
|
-
}, D>];
|
|
212
|
-
//# sourceMappingURL=multiToken.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multiToken.d.ts","sourceRoot":"","sources":["../../../src/layouts/multiToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,+BAA+B,CAAC;AAWvC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;CAGtB,CAAC;AAOX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;CAGpB,CAAC;AAOX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGtB,CAAC;AAEX,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAQrB,CAAC;AAG5B,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,iBAAiB,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAO7C,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.genericMessageLayout = exports.multiTokenNativeTokenTransferLayout = exports.tokenInfoLayoutItem = exports.tokenIdLayoutItem = exports.tokenMetaLayoutItem = void 0;
|
|
4
|
-
const sdk_base_1 = require("@wormhole-foundation/sdk-base");
|
|
5
|
-
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
6
|
-
const amount_js_1 = require("./amount.js");
|
|
7
|
-
const prefix_js_1 = require("./prefix.js");
|
|
8
|
-
const tokenMetaLayout = [
|
|
9
|
-
{ name: "name", ...sdk_definitions_1.layoutItems.fixedLengthStringItem(32) },
|
|
10
|
-
{ name: "symbol", ...sdk_definitions_1.layoutItems.fixedLengthStringItem(32) },
|
|
11
|
-
{ name: "decimals", binary: "uint", size: 1 },
|
|
12
|
-
];
|
|
13
|
-
exports.tokenMetaLayoutItem = {
|
|
14
|
-
binary: "bytes",
|
|
15
|
-
layout: tokenMetaLayout,
|
|
16
|
-
};
|
|
17
|
-
const tokenIdLayout = [
|
|
18
|
-
{ name: "chainId", ...sdk_definitions_1.layoutItems.chainItem() },
|
|
19
|
-
{ name: "tokenAddress", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
20
|
-
];
|
|
21
|
-
exports.tokenIdLayoutItem = {
|
|
22
|
-
binary: "bytes",
|
|
23
|
-
layout: tokenIdLayout,
|
|
24
|
-
};
|
|
25
|
-
const tokenInfoLayout = [
|
|
26
|
-
{ name: "meta", ...exports.tokenMetaLayoutItem },
|
|
27
|
-
{ name: "token", ...exports.tokenIdLayoutItem },
|
|
28
|
-
];
|
|
29
|
-
exports.tokenInfoLayoutItem = {
|
|
30
|
-
binary: "bytes",
|
|
31
|
-
layout: tokenInfoLayout,
|
|
32
|
-
};
|
|
33
|
-
exports.multiTokenNativeTokenTransferLayout = [
|
|
34
|
-
// bytes4 constant MTT_PREFIX = 0x994D5454;
|
|
35
|
-
(0, prefix_js_1.prefixItem)([0x99, 0x4d, 0x54, 0x54]),
|
|
36
|
-
{ name: "trimmedAmount", ...amount_js_1.trimmedAmountItem },
|
|
37
|
-
{ name: "token", ...exports.tokenInfoLayoutItem },
|
|
38
|
-
{ name: "sender", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
39
|
-
{ name: "to", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
40
|
-
(0, sdk_base_1.customizableBytes)({ name: "additionalPayload", lengthSize: 2 }),
|
|
41
|
-
];
|
|
42
|
-
// GmpManager message layout
|
|
43
|
-
const genericMessageLayout = (data) => [
|
|
44
|
-
(0, prefix_js_1.prefixItem)([0x99, 0x47, 0x4d, 0x50]),
|
|
45
|
-
{ name: "toChain", ...sdk_definitions_1.layoutItems.chainItem() },
|
|
46
|
-
{ name: "callee", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
47
|
-
{ name: "sender", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
48
|
-
(0, sdk_base_1.customizableBytes)({ name: "data", lengthSize: 2 }, data),
|
|
49
|
-
];
|
|
50
|
-
exports.genericMessageLayout = genericMessageLayout;
|
|
51
|
-
//# sourceMappingURL=multiToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multiToken.js","sourceRoot":"","sources":["../../../src/layouts/multiToken.ts"],"names":[],"mappings":";;;AAAA,4DAIuC;AACvC,0EAAmE;AACnE,2CAAgD;AAChD,2CAAyC;AAEzC,MAAM,eAAe,GAAG;IACtB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,6BAAW,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE;IAC1D,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,6BAAW,CAAC,qBAAqB,CAAC,EAAE,CAAC,EAAE;IAC5D,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE;CACpB,CAAC;AAEf,QAAA,mBAAmB,GAAG;IACjC,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,eAAe;CACf,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,6BAAW,CAAC,SAAS,EAAE,EAAE;IAC/C,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;CACpC,CAAC;AAEf,QAAA,iBAAiB,GAAG;IAC/B,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,aAAa;CACb,CAAC;AAEX,MAAM,eAAe,GAAG;IACtB,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,2BAAmB,EAAE;IACxC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,yBAAiB,EAAE;CACd,CAAC;AAEf,QAAA,mBAAmB,GAAG;IACjC,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,eAAe;CACf,CAAC;AAEE,QAAA,mCAAmC,GAAG;IACjD,2CAA2C;IAC3C,IAAA,sBAAU,EAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,6BAAiB,EAAE;IAC/C,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,2BAAmB,EAAE;IACzC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACvD,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACnD,IAAA,4BAAiB,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;CACtC,CAAC;AAE5B,4BAA4B;AACrB,MAAM,oBAAoB,GAAG,CAA8B,IAAQ,EAAE,EAAE,CAC5E;IACE,IAAA,sBAAU,EAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,6BAAW,CAAC,SAAS,EAAE,EAAE;IAC/C,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACvD,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACvD,IAAA,4BAAiB,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC;CAC/B,CAAC;AAPjB,QAAA,oBAAoB,wBAOH"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type Prefix = readonly [number, number, number, number];
|
|
2
|
-
export declare const prefixItem: (prefix: Prefix) => {
|
|
3
|
-
readonly name: "prefix";
|
|
4
|
-
readonly binary: "bytes";
|
|
5
|
-
readonly custom: Uint8Array<ArrayBuffer>;
|
|
6
|
-
readonly omit: true;
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=prefix.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prefix.d.ts","sourceRoot":"","sources":["../../../src/layouts/prefix.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/D,eAAO,MAAM,UAAU,GAAI,QAAQ,MAAM;;;;;CAM5B,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.prefixItem = void 0;
|
|
4
|
-
const prefixItem = (prefix) => ({
|
|
5
|
-
name: "prefix",
|
|
6
|
-
binary: "bytes",
|
|
7
|
-
custom: Uint8Array.from(prefix),
|
|
8
|
-
omit: true,
|
|
9
|
-
});
|
|
10
|
-
exports.prefixItem = prefixItem;
|
|
11
|
-
//# sourceMappingURL=prefix.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prefix.js","sourceRoot":"","sources":["../../../src/layouts/prefix.ts"],"names":[],"mappings":";;;AACO,MAAM,UAAU,GAAG,CAAC,MAAc,EAAE,EAAE,CAC3C,CAAC;IACC,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,IAAI;CACX,CAAU,CAAC;AAND,QAAA,UAAU,cAMT"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { CustomizableBytes, LayoutToType } from "@wormhole-foundation/sdk-base";
|
|
2
|
-
import { Prefix } from "./prefix.js";
|
|
3
|
-
export type TransceiverMessage<MP extends CustomizableBytes = undefined, TP extends CustomizableBytes = undefined> = LayoutToType<ReturnType<typeof transceiverMessageLayout<MP, TP>>>;
|
|
4
|
-
export declare const transceiverMessageLayout: <const MP extends CustomizableBytes = undefined, const TP extends CustomizableBytes = undefined>(prefix: Prefix, nttManagerPayload?: MP, transceiverPayload?: TP) => readonly [{
|
|
5
|
-
readonly name: "prefix";
|
|
6
|
-
readonly binary: "bytes";
|
|
7
|
-
readonly custom: Uint8Array<ArrayBuffer>;
|
|
8
|
-
readonly omit: true;
|
|
9
|
-
}, {
|
|
10
|
-
readonly binary: "bytes";
|
|
11
|
-
readonly size: 32;
|
|
12
|
-
readonly custom: {
|
|
13
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
14
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
15
|
-
};
|
|
16
|
-
readonly name: "sourceNttManager";
|
|
17
|
-
}, {
|
|
18
|
-
readonly binary: "bytes";
|
|
19
|
-
readonly size: 32;
|
|
20
|
-
readonly custom: {
|
|
21
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
22
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
23
|
-
};
|
|
24
|
-
readonly name: "recipientNttManager";
|
|
25
|
-
}, import("binary-layout").CustomizableBytesReturn<{
|
|
26
|
-
readonly name: "nttManagerPayload";
|
|
27
|
-
readonly lengthSize: 2;
|
|
28
|
-
}, MP>, import("binary-layout").CustomizableBytesReturn<{
|
|
29
|
-
readonly name: "transceiverPayload";
|
|
30
|
-
readonly lengthSize: 2;
|
|
31
|
-
}, TP>];
|
|
32
|
-
export type TransceiverInfo = LayoutToType<typeof transceiverInfo>;
|
|
33
|
-
export declare const transceiverInfo: readonly [{
|
|
34
|
-
readonly name: "prefix";
|
|
35
|
-
readonly binary: "bytes";
|
|
36
|
-
readonly custom: Uint8Array<ArrayBuffer>;
|
|
37
|
-
readonly omit: true;
|
|
38
|
-
}, {
|
|
39
|
-
readonly binary: "bytes";
|
|
40
|
-
readonly size: 32;
|
|
41
|
-
readonly custom: {
|
|
42
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
43
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
44
|
-
};
|
|
45
|
-
readonly name: "managerAddress";
|
|
46
|
-
}, {
|
|
47
|
-
readonly name: "mode";
|
|
48
|
-
readonly binary: "uint";
|
|
49
|
-
readonly size: 1;
|
|
50
|
-
}, {
|
|
51
|
-
readonly binary: "bytes";
|
|
52
|
-
readonly size: 32;
|
|
53
|
-
readonly custom: {
|
|
54
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
55
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
56
|
-
};
|
|
57
|
-
readonly name: "token";
|
|
58
|
-
}, {
|
|
59
|
-
readonly name: "decimals";
|
|
60
|
-
readonly binary: "uint";
|
|
61
|
-
readonly size: 1;
|
|
62
|
-
}];
|
|
63
|
-
export type TransceiverRegistration = LayoutToType<typeof transceiverRegistration>;
|
|
64
|
-
export declare const transceiverRegistration: readonly [{
|
|
65
|
-
readonly name: "prefix";
|
|
66
|
-
readonly binary: "bytes";
|
|
67
|
-
readonly custom: Uint8Array<ArrayBuffer>;
|
|
68
|
-
readonly omit: true;
|
|
69
|
-
}, {
|
|
70
|
-
readonly custom: {
|
|
71
|
-
to: (val: number) => "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore";
|
|
72
|
-
from: (val: "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore") => number;
|
|
73
|
-
};
|
|
74
|
-
readonly binary: "uint";
|
|
75
|
-
readonly size: 2;
|
|
76
|
-
readonly name: "chain";
|
|
77
|
-
}, {
|
|
78
|
-
readonly binary: "bytes";
|
|
79
|
-
readonly size: 32;
|
|
80
|
-
readonly custom: {
|
|
81
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
82
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
83
|
-
};
|
|
84
|
-
readonly name: "transceiver";
|
|
85
|
-
}];
|
|
86
|
-
//# sourceMappingURL=transceiver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transceiver.d.ts","sourceRoot":"","sources":["../../../src/layouts/transceiver.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAEjB,YAAY,EAEb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,MAAM,EAAc,MAAM,aAAa,CAAC;AAEjD,MAAM,MAAM,kBAAkB,CAC5B,EAAE,SAAS,iBAAiB,GAAG,SAAS,EACxC,EAAE,SAAS,iBAAiB,GAAG,SAAS,IACtC,YAAY,CAAC,UAAU,CAAC,OAAO,wBAAwB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAEtE,eAAO,MAAM,wBAAwB,GACnC,KAAK,CAAC,EAAE,SAAS,iBAAiB,GAAG,SAAS,EAC9C,KAAK,CAAC,EAAE,SAAS,iBAAiB,GAAG,SAAS,EAE9C,QAAQ,MAAM,EACd,oBAAoB,EAAE,EACtB,qBAAqB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;OAcI,CAAC;AAE9B,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;AACnE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMD,CAAC;AAG5B,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAChD,OAAO,uBAAuB,CAC/B,CAAC;AACF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;EAIT,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transceiverRegistration = exports.transceiverInfo = exports.transceiverMessageLayout = void 0;
|
|
4
|
-
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
5
|
-
const sdk_base_1 = require("@wormhole-foundation/sdk-base");
|
|
6
|
-
const prefix_js_1 = require("./prefix.js");
|
|
7
|
-
const transceiverMessageLayout = (prefix, nttManagerPayload, transceiverPayload) => [
|
|
8
|
-
(0, prefix_js_1.prefixItem)(prefix),
|
|
9
|
-
{ name: "sourceNttManager", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
10
|
-
{ name: "recipientNttManager", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
11
|
-
(0, sdk_base_1.customizableBytes)({ name: "nttManagerPayload", lengthSize: 2 }, nttManagerPayload),
|
|
12
|
-
(0, sdk_base_1.customizableBytes)({ name: "transceiverPayload", lengthSize: 2 }, transceiverPayload),
|
|
13
|
-
];
|
|
14
|
-
exports.transceiverMessageLayout = transceiverMessageLayout;
|
|
15
|
-
exports.transceiverInfo = [
|
|
16
|
-
(0, prefix_js_1.prefixItem)([0x9c, 0x23, 0xbd, 0x3b]),
|
|
17
|
-
{ name: "managerAddress", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
18
|
-
{ name: "mode", binary: "uint", size: 1 },
|
|
19
|
-
{ name: "token", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
20
|
-
{ name: "decimals", binary: "uint", size: 1 },
|
|
21
|
-
];
|
|
22
|
-
exports.transceiverRegistration = [
|
|
23
|
-
(0, prefix_js_1.prefixItem)([0x18, 0xfc, 0x67, 0xc2]),
|
|
24
|
-
{ name: "chain", ...sdk_definitions_1.layoutItems.chainItem() },
|
|
25
|
-
{ name: "transceiver", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
26
|
-
];
|
|
27
|
-
//# sourceMappingURL=transceiver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transceiver.js","sourceRoot":"","sources":["../../../src/layouts/transceiver.ts"],"names":[],"mappings":";;;AAAA,0EAAmE;AACnE,4DAKuC;AACvC,2CAAiD;AAO1C,MAAM,wBAAwB,GAAG,CAItC,MAAc,EACd,iBAAsB,EACtB,kBAAuB,EACvB,EAAE,CACF;IACE,IAAA,sBAAU,EAAC,MAAM,CAAC;IAClB,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACjE,EAAE,IAAI,EAAE,qBAAqB,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACpE,IAAA,4BAAiB,EACf,EAAE,IAAI,EAAE,mBAAmB,EAAE,UAAU,EAAE,CAAC,EAAE,EAC5C,iBAAiB,CAClB;IACD,IAAA,4BAAiB,EACf,EAAE,IAAI,EAAE,oBAAoB,EAAE,UAAU,EAAE,CAAC,EAAE,EAC7C,kBAAkB,CACnB;CACwB,CAAC;AApBjB,QAAA,wBAAwB,4BAoBP;AAGjB,QAAA,eAAe,GAAG;IAC7B,IAAA,sBAAU,EAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IAC/D,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE;IACzC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACtD,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE;CACpB,CAAC;AAMf,QAAA,uBAAuB,GAAG;IACrC,IAAA,sBAAU,EAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,6BAAW,CAAC,SAAS,EAAE,EAAE;IAC7C,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;CACnC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CustomizableBytes } from "@wormhole-foundation/sdk-base";
|
|
2
|
-
export declare const transceiverInstructionLayout: <const P extends CustomizableBytes = undefined>(customPayload?: P) => readonly [{
|
|
3
|
-
readonly name: "index";
|
|
4
|
-
readonly binary: "uint";
|
|
5
|
-
readonly size: 1;
|
|
6
|
-
}, import("binary-layout").CustomizableBytesReturn<{
|
|
7
|
-
readonly name: "payload";
|
|
8
|
-
readonly lengthSize: 1;
|
|
9
|
-
}, P>];
|
|
10
|
-
//# sourceMappingURL=transceiverInstructions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transceiverInstructions.d.ts","sourceRoot":"","sources":["../../../src/layouts/transceiverInstructions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAGlB,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,4BAA4B,GACvC,KAAK,CAAC,CAAC,SAAS,iBAAiB,GAAG,SAAS,EAE7C,gBAAgB,CAAC;;;;;;;MAKU,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transceiverInstructionLayout = void 0;
|
|
4
|
-
const sdk_base_1 = require("@wormhole-foundation/sdk-base");
|
|
5
|
-
const transceiverInstructionLayout = (customPayload) => [
|
|
6
|
-
{ name: "index", binary: "uint", size: 1 },
|
|
7
|
-
(0, sdk_base_1.customizableBytes)({ name: "payload", lengthSize: 1 }, customPayload),
|
|
8
|
-
];
|
|
9
|
-
exports.transceiverInstructionLayout = transceiverInstructionLayout;
|
|
10
|
-
//# sourceMappingURL=transceiverInstructions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transceiverInstructions.js","sourceRoot":"","sources":["../../../src/layouts/transceiverInstructions.ts"],"names":[],"mappings":";;;AAAA,4DAIuC;AAEhC,MAAM,4BAA4B,GAAG,CAG1C,aAAiB,EACjB,EAAE,CACF;IACE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE;IAC1C,IAAA,4BAAiB,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;CAC3C,CAAC;AARjB,QAAA,4BAA4B,gCAQX"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { LayoutToType } from "@wormhole-foundation/sdk-base";
|
|
2
|
-
export declare function serializeNum(val: number, size: number): Uint8Array;
|
|
3
|
-
export type NativeTokenTransfer = LayoutToType<typeof nativeTokenTransferLayout>;
|
|
4
|
-
/** Describes binary layout for a native token transfer payload */
|
|
5
|
-
export declare const nativeTokenTransferLayout: readonly [{
|
|
6
|
-
readonly name: "prefix";
|
|
7
|
-
readonly binary: "bytes";
|
|
8
|
-
readonly custom: Uint8Array<ArrayBuffer>;
|
|
9
|
-
readonly omit: true;
|
|
10
|
-
}, {
|
|
11
|
-
readonly binary: "bytes";
|
|
12
|
-
readonly layout: readonly [{
|
|
13
|
-
readonly name: "decimals";
|
|
14
|
-
readonly binary: "uint";
|
|
15
|
-
readonly size: 1;
|
|
16
|
-
}, {
|
|
17
|
-
readonly name: "amount";
|
|
18
|
-
readonly binary: "uint";
|
|
19
|
-
readonly size: 8;
|
|
20
|
-
}];
|
|
21
|
-
readonly name: "trimmedAmount";
|
|
22
|
-
}, {
|
|
23
|
-
readonly binary: "bytes";
|
|
24
|
-
readonly size: 32;
|
|
25
|
-
readonly custom: {
|
|
26
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
27
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
28
|
-
};
|
|
29
|
-
readonly name: "sourceToken";
|
|
30
|
-
}, {
|
|
31
|
-
readonly binary: "bytes";
|
|
32
|
-
readonly size: 32;
|
|
33
|
-
readonly custom: {
|
|
34
|
-
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
35
|
-
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
36
|
-
};
|
|
37
|
-
readonly name: "recipientAddress";
|
|
38
|
-
}, {
|
|
39
|
-
readonly custom: {
|
|
40
|
-
to: (val: number) => "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore";
|
|
41
|
-
from: (val: "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Moca" | "MegaETH" | "Xrpl" | "ZeroGravity" | "Tempo" | "Nexus" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "MonadTestnet" | "HyperCore") => number;
|
|
42
|
-
};
|
|
43
|
-
readonly binary: "uint";
|
|
44
|
-
readonly size: 2;
|
|
45
|
-
readonly name: "recipientChain";
|
|
46
|
-
}, {
|
|
47
|
-
readonly binary: "bytes";
|
|
48
|
-
readonly custom: {
|
|
49
|
-
to: (val: Uint8Array) => Uint8Array<ArrayBuffer>;
|
|
50
|
-
from: (val: Uint8Array) => Uint8Array<ArrayBuffer>;
|
|
51
|
-
};
|
|
52
|
-
readonly name: "additionalPayload";
|
|
53
|
-
}];
|
|
54
|
-
//# sourceMappingURL=transfer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transfer.d.ts","sourceRoot":"","sources":["../../../src/layouts/transfer.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EACb,MAAM,+BAA+B,CAAC;AAavC,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAYlE;AAqBD,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAC5C,OAAO,yBAAyB,CACjC,CAAC;AACF,kEAAkE;AAClE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBApBxB,UAAU;oBAOR,UAAU;;;EAoBC,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nativeTokenTransferLayout = void 0;
|
|
4
|
-
exports.serializeNum = serializeNum;
|
|
5
|
-
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
6
|
-
const amount_js_1 = require("./amount.js");
|
|
7
|
-
const prefix_js_1 = require("./prefix.js");
|
|
8
|
-
function deserializeNum(encoded, size) {
|
|
9
|
-
let val = 0n;
|
|
10
|
-
for (let i = 0; i < size; ++i)
|
|
11
|
-
val |= BigInt(encoded[i]) << BigInt(8 * (size - i - 1));
|
|
12
|
-
return Number(val);
|
|
13
|
-
}
|
|
14
|
-
function serializeNum(val, size) {
|
|
15
|
-
const bound = 2n ** BigInt(size * 8);
|
|
16
|
-
if (val >= bound)
|
|
17
|
-
throw new Error(`Value ${val} is too large for ${size} bytes`);
|
|
18
|
-
const arr = new Uint8Array(size);
|
|
19
|
-
//correctly handles both signed and unsigned values
|
|
20
|
-
for (let i = 0; i < size; ++i)
|
|
21
|
-
arr[i] = Number((BigInt(val) >> BigInt(8 * (size - i - 1))) & 0xffn);
|
|
22
|
-
return arr;
|
|
23
|
-
}
|
|
24
|
-
const optionalAdditionalPayloadItem = {
|
|
25
|
-
binary: "bytes",
|
|
26
|
-
custom: {
|
|
27
|
-
to: (val) => {
|
|
28
|
-
if (val.byteLength >= 2) {
|
|
29
|
-
const additionalPayloadLen = deserializeNum(val, 2);
|
|
30
|
-
return val.slice(2, 2 + additionalPayloadLen);
|
|
31
|
-
}
|
|
32
|
-
return new Uint8Array();
|
|
33
|
-
},
|
|
34
|
-
from: (val) => {
|
|
35
|
-
if (val.byteLength > 0) {
|
|
36
|
-
return new Uint8Array([...serializeNum(val.byteLength, 2), ...val]);
|
|
37
|
-
}
|
|
38
|
-
return new Uint8Array();
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
/** Describes binary layout for a native token transfer payload */
|
|
43
|
-
exports.nativeTokenTransferLayout = [
|
|
44
|
-
(0, prefix_js_1.prefixItem)([0x99, 0x4e, 0x54, 0x54]),
|
|
45
|
-
{ name: "trimmedAmount", ...amount_js_1.trimmedAmountItem },
|
|
46
|
-
{ name: "sourceToken", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
47
|
-
{ name: "recipientAddress", ...sdk_definitions_1.layoutItems.universalAddressItem },
|
|
48
|
-
{ name: "recipientChain", ...sdk_definitions_1.layoutItems.chainItem() },
|
|
49
|
-
{ name: "additionalPayload", ...optionalAdditionalPayloadItem },
|
|
50
|
-
];
|
|
51
|
-
//# sourceMappingURL=transfer.js.map
|