@wormhole-foundation/sdk-definitions-ntt 3.0.4 → 4.0.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/axelar.d.ts +35 -0
- package/dist/cjs/axelar.d.ts.map +1 -0
- package/dist/cjs/axelar.js +163 -0
- package/dist/cjs/axelar.js.map +1 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/layouts/index.d.ts +162 -1
- package/dist/cjs/layouts/index.d.ts.map +1 -1
- package/dist/cjs/layouts/index.js +9 -1
- package/dist/cjs/layouts/index.js.map +1 -1
- package/dist/cjs/layouts/multiToken.d.ts +212 -0
- package/dist/cjs/layouts/multiToken.d.ts.map +1 -0
- package/dist/cjs/layouts/multiToken.js +51 -0
- package/dist/cjs/layouts/multiToken.js.map +1 -0
- package/dist/cjs/layouts/prefix.js.map +1 -1
- package/dist/cjs/multiTokenNtt.d.ts +76 -0
- package/dist/cjs/multiTokenNtt.d.ts.map +1 -0
- package/dist/cjs/multiTokenNtt.js +22 -0
- package/dist/cjs/multiTokenNtt.js.map +1 -0
- package/dist/cjs/multiTokenNttWithExecutor.d.ts +23 -0
- package/dist/cjs/multiTokenNttWithExecutor.d.ts.map +1 -0
- package/dist/cjs/multiTokenNttWithExecutor.js +3 -0
- package/dist/cjs/multiTokenNttWithExecutor.js.map +1 -0
- package/dist/cjs/ntt.d.ts +17 -2
- package/dist/cjs/ntt.d.ts.map +1 -1
- package/dist/cjs/ntt.js +15 -0
- package/dist/cjs/ntt.js.map +1 -1
- package/dist/cjs/trimmedAmount.d.ts +7 -0
- package/dist/cjs/trimmedAmount.d.ts.map +1 -0
- package/dist/cjs/trimmedAmount.js +40 -0
- package/dist/cjs/trimmedAmount.js.map +1 -0
- package/dist/esm/axelar.d.ts +35 -0
- package/dist/esm/axelar.d.ts.map +1 -0
- package/dist/esm/axelar.js +153 -0
- package/dist/esm/axelar.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +6 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layouts/index.d.ts +162 -1
- package/dist/esm/layouts/index.d.ts.map +1 -1
- package/dist/esm/layouts/index.js +8 -0
- package/dist/esm/layouts/index.js.map +1 -1
- package/dist/esm/layouts/multiToken.d.ts +212 -0
- package/dist/esm/layouts/multiToken.d.ts.map +1 -0
- package/dist/esm/layouts/multiToken.js +47 -0
- package/dist/esm/layouts/multiToken.js.map +1 -0
- package/dist/esm/layouts/prefix.js.map +1 -1
- package/dist/esm/multiTokenNtt.d.ts +76 -0
- package/dist/esm/multiTokenNtt.d.ts.map +1 -0
- package/dist/esm/multiTokenNtt.js +19 -0
- package/dist/esm/multiTokenNtt.js.map +1 -0
- package/dist/esm/multiTokenNttWithExecutor.d.ts +23 -0
- package/dist/esm/multiTokenNttWithExecutor.d.ts.map +1 -0
- package/dist/esm/multiTokenNttWithExecutor.js +2 -0
- package/dist/esm/multiTokenNttWithExecutor.js.map +1 -0
- package/dist/esm/ntt.d.ts +17 -2
- package/dist/esm/ntt.d.ts.map +1 -1
- package/dist/esm/ntt.js +15 -0
- package/dist/esm/ntt.js.map +1 -1
- package/dist/esm/trimmedAmount.d.ts +7 -0
- package/dist/esm/trimmedAmount.d.ts.map +1 -0
- package/dist/esm/trimmedAmount.js +34 -0
- package/dist/esm/trimmedAmount.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Chain, Network } from "@wormhole-foundation/sdk-base";
|
|
2
|
+
export declare const axelarChains: Partial<Record<Chain, string>>;
|
|
3
|
+
export declare enum GMPStatus {
|
|
4
|
+
SRC_GATEWAY_CALLED = "source_gateway_called",
|
|
5
|
+
DEST_GATEWAY_APPROVED = "destination_gateway_approved",
|
|
6
|
+
DEST_EXECUTED = "destination_executed",
|
|
7
|
+
EXPRESS_EXECUTED = "express_executed",
|
|
8
|
+
DEST_EXECUTE_ERROR = "error",
|
|
9
|
+
DEST_EXECUTING = "executing",
|
|
10
|
+
APPROVING = "approving",
|
|
11
|
+
FORECALLED = "forecalled",
|
|
12
|
+
FORECALLED_WITHOUT_GAS_PAID = "forecalled_without_gas_paid",
|
|
13
|
+
NOT_EXECUTED = "not_executed",
|
|
14
|
+
NOT_EXECUTED_WITHOUT_GAS_PAID = "not_executed_without_gas_paid",
|
|
15
|
+
INSUFFICIENT_FEE = "insufficient_fee",
|
|
16
|
+
UNKNOWN_ERROR = "unknown_error",
|
|
17
|
+
CANNOT_FETCH_STATUS = "cannot_fetch_status",
|
|
18
|
+
SRC_GATEWAY_CONFIRMED = "confirmed"
|
|
19
|
+
}
|
|
20
|
+
export interface GMPError {
|
|
21
|
+
txHash: string;
|
|
22
|
+
chain: string;
|
|
23
|
+
message: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function getAxelarApiUrl(network: Network): string;
|
|
26
|
+
export declare function getAxelarChain(chain: Chain): string;
|
|
27
|
+
export declare function getAxelarGasFee(network: Network, sourceChain: Chain, destinationChain: Chain, gasLimit: bigint, gasMultiplier?: number | "auto", timeoutMs?: number): Promise<bigint>;
|
|
28
|
+
export declare function getAxelarTransactionStatus(network: Network, sourceChain: Chain, txHash: string, timeoutMs?: number): Promise<{
|
|
29
|
+
status: GMPStatus | string;
|
|
30
|
+
error?: GMPError;
|
|
31
|
+
}>;
|
|
32
|
+
export declare function parseGMPStatus(response: any): GMPStatus | string;
|
|
33
|
+
export declare function parseGMPError(response: any): GMPError | undefined;
|
|
34
|
+
export declare function getAxelarExplorerUrl(network: Network, txHash: string): string;
|
|
35
|
+
//# sourceMappingURL=axelar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axelar.d.ts","sourceRoot":"","sources":["../../src/axelar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,E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AAM,CAkBhE;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,GAAG,GAAG,QAAQ,GAAG,SAAS,CAcjE;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAI7E"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GMPStatus = exports.axelarChains = void 0;
|
|
4
|
+
exports.getAxelarApiUrl = getAxelarApiUrl;
|
|
5
|
+
exports.getAxelarChain = getAxelarChain;
|
|
6
|
+
exports.getAxelarGasFee = getAxelarGasFee;
|
|
7
|
+
exports.getAxelarTransactionStatus = getAxelarTransactionStatus;
|
|
8
|
+
exports.parseGMPStatus = parseGMPStatus;
|
|
9
|
+
exports.parseGMPError = parseGMPError;
|
|
10
|
+
exports.getAxelarExplorerUrl = getAxelarExplorerUrl;
|
|
11
|
+
// The point if this module is to use direct API calls instead of importing the entire @axelar-network/axelarjs-sdk to stay lightweight.
|
|
12
|
+
// Axelar chains: https://github.com/axelarnetwork/axelarjs-sdk/blob/53a957deb1209325b1e3d109e0985a64db6d9901/src/constants/EvmChain.ts#L1
|
|
13
|
+
exports.axelarChains = {
|
|
14
|
+
Ethereum: "ethereum",
|
|
15
|
+
Monad: "monad",
|
|
16
|
+
Sepolia: "ethereum-sepolia",
|
|
17
|
+
// add more as needed
|
|
18
|
+
};
|
|
19
|
+
// https://github.com/axelarnetwork/axelarjs-sdk/blob/53a957deb1209325b1e3d109e0985a64db6d9901/src/libs/TransactionRecoveryApi/AxelarRecoveryApi.ts#L16
|
|
20
|
+
var GMPStatus;
|
|
21
|
+
(function (GMPStatus) {
|
|
22
|
+
GMPStatus["SRC_GATEWAY_CALLED"] = "source_gateway_called";
|
|
23
|
+
GMPStatus["DEST_GATEWAY_APPROVED"] = "destination_gateway_approved";
|
|
24
|
+
GMPStatus["DEST_EXECUTED"] = "destination_executed";
|
|
25
|
+
GMPStatus["EXPRESS_EXECUTED"] = "express_executed";
|
|
26
|
+
GMPStatus["DEST_EXECUTE_ERROR"] = "error";
|
|
27
|
+
GMPStatus["DEST_EXECUTING"] = "executing";
|
|
28
|
+
GMPStatus["APPROVING"] = "approving";
|
|
29
|
+
GMPStatus["FORECALLED"] = "forecalled";
|
|
30
|
+
GMPStatus["FORECALLED_WITHOUT_GAS_PAID"] = "forecalled_without_gas_paid";
|
|
31
|
+
GMPStatus["NOT_EXECUTED"] = "not_executed";
|
|
32
|
+
GMPStatus["NOT_EXECUTED_WITHOUT_GAS_PAID"] = "not_executed_without_gas_paid";
|
|
33
|
+
GMPStatus["INSUFFICIENT_FEE"] = "insufficient_fee";
|
|
34
|
+
GMPStatus["UNKNOWN_ERROR"] = "unknown_error";
|
|
35
|
+
GMPStatus["CANNOT_FETCH_STATUS"] = "cannot_fetch_status";
|
|
36
|
+
GMPStatus["SRC_GATEWAY_CONFIRMED"] = "confirmed";
|
|
37
|
+
})(GMPStatus || (exports.GMPStatus = GMPStatus = {}));
|
|
38
|
+
function getAxelarApiUrl(network) {
|
|
39
|
+
return network === "Mainnet"
|
|
40
|
+
? "https://api.axelarscan.io"
|
|
41
|
+
: "https://testnet.api.axelarscan.io";
|
|
42
|
+
}
|
|
43
|
+
function getAxelarChain(chain) {
|
|
44
|
+
const axelarChain = exports.axelarChains[chain];
|
|
45
|
+
if (!axelarChain) {
|
|
46
|
+
throw new Error(`Unsupported axelar chain: ${chain}`);
|
|
47
|
+
}
|
|
48
|
+
return axelarChain;
|
|
49
|
+
}
|
|
50
|
+
async function getAxelarGasFee(network, sourceChain, destinationChain, gasLimit, gasMultiplier = "auto", timeoutMs = 10000) {
|
|
51
|
+
const url = `${getAxelarApiUrl(network)}/gmp/estimateGasFee`;
|
|
52
|
+
const axelarSourceChain = getAxelarChain(sourceChain);
|
|
53
|
+
const axelarDestinationChain = getAxelarChain(destinationChain);
|
|
54
|
+
const controller = new AbortController();
|
|
55
|
+
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
56
|
+
// Set a minimum fee of 1 to avoid 0-fee issue with relays not proceeding
|
|
57
|
+
// past the gas paid step
|
|
58
|
+
let fee = 1n;
|
|
59
|
+
try {
|
|
60
|
+
const response = await fetch(url, {
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: {
|
|
63
|
+
"Content-Type": "application/json",
|
|
64
|
+
},
|
|
65
|
+
body: JSON.stringify({
|
|
66
|
+
sourceChain: axelarSourceChain,
|
|
67
|
+
destinationChain: axelarDestinationChain,
|
|
68
|
+
gasMultiplier,
|
|
69
|
+
gasLimit: gasLimit.toString(),
|
|
70
|
+
}),
|
|
71
|
+
signal: controller.signal,
|
|
72
|
+
});
|
|
73
|
+
if (!response.ok) {
|
|
74
|
+
const errorText = await response.text();
|
|
75
|
+
throw new Error(`Failed to estimate gas fee: ${response.status} ${errorText}`);
|
|
76
|
+
}
|
|
77
|
+
const result = await response.json();
|
|
78
|
+
const parsedFee = BigInt(result);
|
|
79
|
+
if (parsedFee > 0n) {
|
|
80
|
+
fee = parsedFee;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
clearTimeout(timeoutId);
|
|
85
|
+
}
|
|
86
|
+
return fee;
|
|
87
|
+
}
|
|
88
|
+
async function getAxelarTransactionStatus(network, sourceChain, txHash, timeoutMs = 10000) {
|
|
89
|
+
const url = `${getAxelarApiUrl(network)}/gmp/searchGMP`;
|
|
90
|
+
const axelarSourceChain = getAxelarChain(sourceChain);
|
|
91
|
+
const controller = new AbortController();
|
|
92
|
+
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
93
|
+
try {
|
|
94
|
+
const response = await fetch(url, {
|
|
95
|
+
method: "POST",
|
|
96
|
+
headers: {
|
|
97
|
+
"Content-Type": "application/json",
|
|
98
|
+
},
|
|
99
|
+
body: JSON.stringify({
|
|
100
|
+
sourceChain: axelarSourceChain,
|
|
101
|
+
txHash: txHash,
|
|
102
|
+
}),
|
|
103
|
+
signal: controller.signal,
|
|
104
|
+
});
|
|
105
|
+
if (!response.ok) {
|
|
106
|
+
const errorText = await response.text();
|
|
107
|
+
throw new Error(`Failed to get transaction status: ${response.status} ${errorText}`);
|
|
108
|
+
}
|
|
109
|
+
const result = await response.json();
|
|
110
|
+
if (!result.data || result.data.length === 0) {
|
|
111
|
+
throw new Error("No transaction details found");
|
|
112
|
+
}
|
|
113
|
+
const txDetails = result.data[0];
|
|
114
|
+
return {
|
|
115
|
+
status: parseGMPStatus(txDetails),
|
|
116
|
+
error: parseGMPError(txDetails),
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
finally {
|
|
120
|
+
clearTimeout(timeoutId);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function parseGMPStatus(response) {
|
|
124
|
+
const { error, status } = response;
|
|
125
|
+
switch (status) {
|
|
126
|
+
case "error":
|
|
127
|
+
if (error)
|
|
128
|
+
return GMPStatus.DEST_EXECUTE_ERROR;
|
|
129
|
+
return status;
|
|
130
|
+
case "executed":
|
|
131
|
+
return GMPStatus.DEST_EXECUTED;
|
|
132
|
+
case "approved":
|
|
133
|
+
return GMPStatus.DEST_GATEWAY_APPROVED;
|
|
134
|
+
case "called":
|
|
135
|
+
return GMPStatus.SRC_GATEWAY_CALLED;
|
|
136
|
+
case "executing":
|
|
137
|
+
return GMPStatus.DEST_EXECUTING;
|
|
138
|
+
default:
|
|
139
|
+
return status;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function parseGMPError(response) {
|
|
143
|
+
if (response.error) {
|
|
144
|
+
return {
|
|
145
|
+
message: response.error.error.message,
|
|
146
|
+
txHash: response.error.sourceTransactionHash,
|
|
147
|
+
chain: response.error.chain,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
else if (response.is_insufficient_fee) {
|
|
151
|
+
return {
|
|
152
|
+
message: "Insufficient gas",
|
|
153
|
+
txHash: response.call.transaction.hash,
|
|
154
|
+
chain: response.call.chain,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function getAxelarExplorerUrl(network, txHash) {
|
|
159
|
+
return network === "Mainnet"
|
|
160
|
+
? `https://axelarscan.io/gmp/${txHash}`
|
|
161
|
+
: `https://testnet.axelarscan.io/gmp/${txHash}`;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=axelar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axelar.js","sourceRoot":"","sources":["../../src/axelar.ts"],"names":[],"mappings":";;;AAqCA,0CAIC;AAED,wCAMC;AAED,0CAoDC;AAED,gEA8CC;AAED,wCAkBC;AAED,sCAcC;AAED,oDAIC;AA/LD,wIAAwI;AAExI,0IAA0I;AAC7H,QAAA,YAAY,GAAmC;IAC1D,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,kBAAkB;IAC3B,qBAAqB;CACtB,CAAC;AAEF,uJAAuJ;AACvJ,IAAY,SAgBX;AAhBD,WAAY,SAAS;IACnB,yDAA4C,CAAA;IAC5C,mEAAsD,CAAA;IACtD,mDAAsC,CAAA;IACtC,kDAAqC,CAAA;IACrC,yCAA4B,CAAA;IAC5B,yCAA4B,CAAA;IAC5B,oCAAuB,CAAA;IACvB,sCAAyB,CAAA;IACzB,wEAA2D,CAAA;IAC3D,0CAA6B,CAAA;IAC7B,4EAA+D,CAAA;IAC/D,kDAAqC,CAAA;IACrC,4CAA+B,CAAA;IAC/B,wDAA2C,CAAA;IAC3C,gDAAmC,CAAA;AACrC,CAAC,EAhBW,SAAS,yBAAT,SAAS,QAgBpB;AAQD,SAAgB,eAAe,CAAC,OAAgB;IAC9C,OAAO,OAAO,KAAK,SAAS;QAC1B,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,mCAAmC,CAAC;AAC1C,CAAC;AAED,SAAgB,cAAc,CAAC,KAAY;IACzC,MAAM,WAAW,GAAG,oBAA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ACJ,CAAC;SAAM,IAAI,QAAQ,CAAC,mBAAmB,EAAE,CAAC;QACxC,OAAO;YACL,OAAO,EAAE,kBAAkB;YAC3B,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI;YACtC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK;SAC3B,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,oBAAoB,CAAC,OAAgB,EAAE,MAAc;IACnE,OAAO,OAAO,KAAK,SAAS;QAC1B,CAAC,CAAC,6BAA6B,MAAM,EAAE;QACvC,CAAC,CAAC,qCAAqC,MAAM,EAAE,CAAC;AACpD,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export * from "./ntt.js";
|
|
2
2
|
export * from "./nttWithExecutor.js";
|
|
3
|
+
export * from "./multiTokenNtt.js";
|
|
4
|
+
export * from "./multiTokenNttWithExecutor.js";
|
|
5
|
+
export * from "./trimmedAmount.js";
|
|
6
|
+
export * from "./axelar.js";
|
|
3
7
|
export * from "./layouts/index.js";
|
|
4
8
|
export type * from "./layouts/index.js";
|
|
5
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAE5B,cAAc,oBAAoB,CAAC;AACnC,mBAAmB,oBAAoB,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,7 +17,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
18
18
|
const index_js_1 = require("./layouts/index.js");
|
|
19
19
|
(0, sdk_definitions_1.registerPayloadTypes)("Ntt", index_js_1.nttNamedPayloads);
|
|
20
|
+
(0, sdk_definitions_1.registerPayloadTypes)("MultiTokenNtt", index_js_1.multiTokenNttNamedPayloads);
|
|
20
21
|
__exportStar(require("./ntt.js"), exports);
|
|
21
22
|
__exportStar(require("./nttWithExecutor.js"), exports);
|
|
23
|
+
__exportStar(require("./multiTokenNtt.js"), exports);
|
|
24
|
+
__exportStar(require("./multiTokenNttWithExecutor.js"), exports);
|
|
25
|
+
__exportStar(require("./trimmedAmount.js"), exports);
|
|
26
|
+
__exportStar(require("./axelar.js"), exports);
|
|
22
27
|
__exportStar(require("./layouts/index.js"), exports);
|
|
23
28
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAA4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAA4E;AAC5E,iDAG4B;AAE5B,IAAA,sCAAoB,EAAC,KAAK,EAAE,2BAAgB,CAAC,CAAC;AAC9C,IAAA,sCAAoB,EAAC,eAAe,EAAE,qCAA0B,CAAC,CAAC;AAElE,2CAAyB;AACzB,uDAAqC;AACrC,qDAAmC;AACnC,iEAA+C;AAC/C,qDAAmC;AACnC,8CAA4B;AAE5B,qDAAmC"}
|
|
@@ -385,14 +385,174 @@ export declare const nttNamedPayloads: readonly [readonly ["WormholeTransfer", r
|
|
|
385
385
|
};
|
|
386
386
|
readonly name: "transceiver";
|
|
387
387
|
}]]];
|
|
388
|
+
export declare const multiTokenNttNamedPayloads: readonly [readonly ["WormholeTransfer", readonly [{
|
|
389
|
+
readonly name: "prefix";
|
|
390
|
+
readonly binary: "bytes";
|
|
391
|
+
readonly custom: Uint8Array<ArrayBuffer>;
|
|
392
|
+
readonly omit: true;
|
|
393
|
+
}, {
|
|
394
|
+
readonly binary: "bytes";
|
|
395
|
+
readonly size: 32;
|
|
396
|
+
readonly custom: {
|
|
397
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
398
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
399
|
+
};
|
|
400
|
+
readonly name: "sourceNttManager";
|
|
401
|
+
}, {
|
|
402
|
+
readonly binary: "bytes";
|
|
403
|
+
readonly size: 32;
|
|
404
|
+
readonly custom: {
|
|
405
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
406
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
407
|
+
};
|
|
408
|
+
readonly name: "recipientNttManager";
|
|
409
|
+
}, import("binary-layout").CustomizableBytesReturn<{
|
|
410
|
+
readonly name: "nttManagerPayload";
|
|
411
|
+
readonly lengthSize: 2;
|
|
412
|
+
}, readonly [{
|
|
413
|
+
readonly name: "id";
|
|
414
|
+
readonly binary: "bytes";
|
|
415
|
+
readonly size: 32;
|
|
416
|
+
}, {
|
|
417
|
+
readonly binary: "bytes";
|
|
418
|
+
readonly size: 32;
|
|
419
|
+
readonly custom: {
|
|
420
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
421
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
422
|
+
};
|
|
423
|
+
readonly name: "sender";
|
|
424
|
+
}, import("binary-layout").CustomizableBytesReturn<{
|
|
425
|
+
readonly name: "payload";
|
|
426
|
+
readonly lengthSize: 2;
|
|
427
|
+
}, readonly [{
|
|
428
|
+
readonly name: "prefix";
|
|
429
|
+
readonly binary: "bytes";
|
|
430
|
+
readonly custom: Uint8Array<ArrayBuffer>;
|
|
431
|
+
readonly omit: true;
|
|
432
|
+
}, {
|
|
433
|
+
readonly custom: {
|
|
434
|
+
to: (val: number) => "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Fantom" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "HyperCore";
|
|
435
|
+
from: (val: "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Fantom" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "HyperCore") => number;
|
|
436
|
+
};
|
|
437
|
+
readonly binary: "uint";
|
|
438
|
+
readonly size: 2;
|
|
439
|
+
readonly name: "toChain";
|
|
440
|
+
}, {
|
|
441
|
+
readonly binary: "bytes";
|
|
442
|
+
readonly size: 32;
|
|
443
|
+
readonly custom: {
|
|
444
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
445
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
446
|
+
};
|
|
447
|
+
readonly name: "callee";
|
|
448
|
+
}, {
|
|
449
|
+
readonly binary: "bytes";
|
|
450
|
+
readonly size: 32;
|
|
451
|
+
readonly custom: {
|
|
452
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
453
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
454
|
+
};
|
|
455
|
+
readonly name: "sender";
|
|
456
|
+
}, import("binary-layout").CustomizableBytesReturn<{
|
|
457
|
+
readonly name: "data";
|
|
458
|
+
readonly lengthSize: 2;
|
|
459
|
+
}, readonly [{
|
|
460
|
+
readonly name: "prefix";
|
|
461
|
+
readonly binary: "bytes";
|
|
462
|
+
readonly custom: Uint8Array<ArrayBuffer>;
|
|
463
|
+
readonly omit: true;
|
|
464
|
+
}, {
|
|
465
|
+
readonly binary: "bytes";
|
|
466
|
+
readonly layout: readonly [{
|
|
467
|
+
readonly name: "decimals";
|
|
468
|
+
readonly binary: "uint";
|
|
469
|
+
readonly size: 1;
|
|
470
|
+
}, {
|
|
471
|
+
readonly name: "amount";
|
|
472
|
+
readonly binary: "uint";
|
|
473
|
+
readonly size: 8;
|
|
474
|
+
}];
|
|
475
|
+
readonly name: "trimmedAmount";
|
|
476
|
+
}, {
|
|
477
|
+
readonly binary: "bytes";
|
|
478
|
+
readonly layout: readonly [{
|
|
479
|
+
readonly binary: "bytes";
|
|
480
|
+
readonly layout: readonly [{
|
|
481
|
+
readonly binary: "bytes";
|
|
482
|
+
readonly size: number;
|
|
483
|
+
readonly custom: {
|
|
484
|
+
to: (val: Uint8Array) => string;
|
|
485
|
+
from: (val: string) => Uint8Array;
|
|
486
|
+
};
|
|
487
|
+
readonly name: "name";
|
|
488
|
+
}, {
|
|
489
|
+
readonly binary: "bytes";
|
|
490
|
+
readonly size: number;
|
|
491
|
+
readonly custom: {
|
|
492
|
+
to: (val: Uint8Array) => string;
|
|
493
|
+
from: (val: string) => Uint8Array;
|
|
494
|
+
};
|
|
495
|
+
readonly name: "symbol";
|
|
496
|
+
}, {
|
|
497
|
+
readonly name: "decimals";
|
|
498
|
+
readonly binary: "uint";
|
|
499
|
+
readonly size: 1;
|
|
500
|
+
}];
|
|
501
|
+
readonly name: "meta";
|
|
502
|
+
}, {
|
|
503
|
+
readonly binary: "bytes";
|
|
504
|
+
readonly layout: readonly [{
|
|
505
|
+
readonly custom: {
|
|
506
|
+
to: (val: number) => "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Fantom" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "HyperCore";
|
|
507
|
+
from: (val: "Solana" | "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Algorand" | "Fantom" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Pythnet" | "Btc" | "Base" | "Sei" | "Scroll" | "Mantle" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Fogo" | "Sonic" | "Converge" | "Plume" | "XRPLEVM" | "Plasma" | "CreditCoin" | "Stacks" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Neutron" | "Celestia" | "Stargaze" | "Seda" | "Dymension" | "Provenance" | "Noble" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "HyperCore") => number;
|
|
508
|
+
};
|
|
509
|
+
readonly binary: "uint";
|
|
510
|
+
readonly size: 2;
|
|
511
|
+
readonly name: "chainId";
|
|
512
|
+
}, {
|
|
513
|
+
readonly binary: "bytes";
|
|
514
|
+
readonly size: 32;
|
|
515
|
+
readonly custom: {
|
|
516
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
517
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
518
|
+
};
|
|
519
|
+
readonly name: "tokenAddress";
|
|
520
|
+
}];
|
|
521
|
+
readonly name: "token";
|
|
522
|
+
}];
|
|
523
|
+
readonly name: "token";
|
|
524
|
+
}, {
|
|
525
|
+
readonly binary: "bytes";
|
|
526
|
+
readonly size: 32;
|
|
527
|
+
readonly custom: {
|
|
528
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
529
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
530
|
+
};
|
|
531
|
+
readonly name: "sender";
|
|
532
|
+
}, {
|
|
533
|
+
readonly binary: "bytes";
|
|
534
|
+
readonly size: 32;
|
|
535
|
+
readonly custom: {
|
|
536
|
+
to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
|
|
537
|
+
from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
|
|
538
|
+
};
|
|
539
|
+
readonly name: "to";
|
|
540
|
+
}, import("binary-layout").CustomizableBytesReturn<{
|
|
541
|
+
readonly name: "additionalPayload";
|
|
542
|
+
readonly lengthSize: 2;
|
|
543
|
+
}, import("binary-layout").CustomizableBytes>]>]>]>, import("binary-layout").CustomizableBytesReturn<{
|
|
544
|
+
readonly name: "transceiverPayload";
|
|
545
|
+
readonly lengthSize: 2;
|
|
546
|
+
}, Uint8Array<ArrayBuffer>>]]];
|
|
388
547
|
declare module "@wormhole-foundation/sdk-definitions" {
|
|
389
548
|
namespace WormholeRegistry {
|
|
390
|
-
interface PayloadLiteralToLayoutMapping extends RegisterPayloadTypes<"Ntt", typeof nttNamedPayloads> {
|
|
549
|
+
interface PayloadLiteralToLayoutMapping extends RegisterPayloadTypes<"Ntt", typeof nttNamedPayloads>, RegisterPayloadTypes<"MultiTokenNtt", typeof multiTokenNttNamedPayloads> {
|
|
391
550
|
}
|
|
392
551
|
}
|
|
393
552
|
}
|
|
394
553
|
export * from "./amount.js";
|
|
395
554
|
export * from "./manager.js";
|
|
555
|
+
export * from "./multiToken.js";
|
|
396
556
|
export * from "./prefix.js";
|
|
397
557
|
export * from "./transceiver.js";
|
|
398
558
|
export * from "./transceiverInstructions.js";
|
|
@@ -400,6 +560,7 @@ export * from "./transfer.js";
|
|
|
400
560
|
export * from "./wormhole.js";
|
|
401
561
|
export type * from "./amount.js";
|
|
402
562
|
export type * from "./manager.js";
|
|
563
|
+
export type * from "./multiToken.js";
|
|
403
564
|
export type * from "./prefix.js";
|
|
404
565
|
export type * from "./transceiver.js";
|
|
405
566
|
export type * from "./transceiverInstructions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB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Ac,8BAA8B,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,cAAc,CAAC;AAClC,mBAAmB,iBAAiB,CAAC;AACrC,mBAAmB,aAAa,CAAC;AACjC,mBAAmB,kBAAkB,CAAC;AACtC,mBAAmB,8BAA8B,CAAC;AAClD,mBAAmB,eAAe,CAAC;AACnC,mBAAmB,eAAe,CAAC"}
|
|
@@ -14,11 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.nttNamedPayloads = void 0;
|
|
17
|
+
exports.multiTokenNttNamedPayloads = exports.nttNamedPayloads = void 0;
|
|
18
18
|
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
19
19
|
const manager_js_1 = require("./manager.js");
|
|
20
20
|
const transceiver_js_1 = require("./transceiver.js");
|
|
21
21
|
const transfer_js_1 = require("./transfer.js");
|
|
22
|
+
const multiToken_js_1 = require("./multiToken.js");
|
|
22
23
|
const wormhole_js_1 = require("./wormhole.js");
|
|
23
24
|
exports.nttNamedPayloads = [
|
|
24
25
|
[
|
|
@@ -32,8 +33,15 @@ exports.nttNamedPayloads = [
|
|
|
32
33
|
["TransceiverInfo", transceiver_js_1.transceiverInfo],
|
|
33
34
|
["TransceiverRegistration", transceiver_js_1.transceiverRegistration],
|
|
34
35
|
];
|
|
36
|
+
exports.multiTokenNttNamedPayloads = [
|
|
37
|
+
[
|
|
38
|
+
"WormholeTransfer",
|
|
39
|
+
(0, wormhole_js_1.wormholeTransceiverMessageLayout)((0, manager_js_1.nttManagerMessageLayout)((0, multiToken_js_1.genericMessageLayout)(multiToken_js_1.multiTokenNativeTokenTransferLayout))),
|
|
40
|
+
],
|
|
41
|
+
];
|
|
35
42
|
__exportStar(require("./amount.js"), exports);
|
|
36
43
|
__exportStar(require("./manager.js"), exports);
|
|
44
|
+
__exportStar(require("./multiToken.js"), exports);
|
|
37
45
|
__exportStar(require("./prefix.js"), exports);
|
|
38
46
|
__exportStar(require("./transceiver.js"), exports);
|
|
39
47
|
__exportStar(require("./transceiverInstructions.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0EAI8C;AAC9C,6CAAuD;AACvD,qDAA4E;AAC5E,+CAA0D;AAC1D,+CAAiE;AAEpD,QAAA,gBAAgB,GAAG;IAC9B;QACE,kBAAkB;QAClB,IAAA,8CAAgC,EAC9B,IAAA,oCAAuB,EAAC,uCAAyB,CAAC,CACnD;KACF;IACD;QACE,iCAAiC;QACjC,IAAA,2CAAyB,EACvB,IAAA,8CAAgC,EAC9B,IAAA,oCAAuB,EAAC,uCAAyB,CAAC,CACnD,CACF;KACF;IACD,CAAC,iBAAiB,EAAE,gCAAe,CAAC;IACpC,CAAC,yBAAyB,EAAE,wCAAuB,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layouts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0EAI8C;AAC9C,6CAAuD;AACvD,qDAA4E;AAC5E,+CAA0D;AAC1D,mDAGyB;AACzB,+CAAiE;AAEpD,QAAA,gBAAgB,GAAG;IAC9B;QACE,kBAAkB;QAClB,IAAA,8CAAgC,EAC9B,IAAA,oCAAuB,EAAC,uCAAyB,CAAC,CACnD;KACF;IACD;QACE,iCAAiC;QACjC,IAAA,2CAAyB,EACvB,IAAA,8CAAgC,EAC9B,IAAA,oCAAuB,EAAC,uCAAyB,CAAC,CACnD,CACF;KACF;IACD,CAAC,iBAAiB,EAAE,gCAAe,CAAC;IACpC,CAAC,yBAAyB,EAAE,wCAAuB,CAAC;CACpB,CAAC;AAEtB,QAAA,0BAA0B,GAAG;IACxC;QACE,kBAAkB;QAClB,IAAA,8CAAgC,EAC9B,IAAA,oCAAuB,EACrB,IAAA,oCAAoB,EAAC,mDAAmC,CAAC,CAC1D,CACF;KACF;CAC+B,CAAC;AAcnC,8CAA4B;AAC5B,+CAA6B;AAC7B,kDAAgC;AAChC,8CAA4B;AAC5B,mDAAiC;AACjC,+DAA6C;AAC7C,gDAA8B;AAC9B,gDAA8B"}
|