@wormhole-foundation/sdk-evm-ntt 4.0.13 → 4.0.14
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/index.d.ts +2 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +24 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +24 -6
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** Explicitly register EVM NTT protocols. Idempotent — safe to call multiple times. */
|
|
2
|
+
export declare function register(topLevel?: boolean): void;
|
|
2
3
|
export * as ethers_contracts from "./ethers-contracts/index.js";
|
|
3
4
|
export * from "./ntt.js";
|
|
4
5
|
export * from "./nttWithExecutor.js";
|
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":"AAWA,uFAAuF;AACvF,wBAAgB,QAAQ,CAAC,QAAQ,UAAQ,GAAG,IAAI,CAuB/C;AAMD,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAC;AAChE,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -37,17 +37,36 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.ethers_contracts = void 0;
|
|
40
|
+
exports.register = register;
|
|
40
41
|
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
41
42
|
const sdk_evm_1 = require("@wormhole-foundation/sdk-evm");
|
|
42
43
|
const ntt_js_1 = require("./ntt.js");
|
|
43
44
|
const nttWithExecutor_js_1 = require("./nttWithExecutor.js");
|
|
44
45
|
const multiTokenNtt_js_1 = require("./multiTokenNtt.js");
|
|
45
46
|
const multiTokenNttWithExecutor_js_1 = require("./multiTokenNttWithExecutor.js");
|
|
46
|
-
require("@wormhole-foundation/sdk-definitions-ntt");
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
(
|
|
50
|
-
(
|
|
47
|
+
const sdk_definitions_ntt_1 = require("@wormhole-foundation/sdk-definitions-ntt");
|
|
48
|
+
/** Explicitly register EVM NTT protocols. Idempotent — safe to call multiple times. */
|
|
49
|
+
function register(topLevel = false) {
|
|
50
|
+
if (topLevel) {
|
|
51
|
+
console.warn("@wormhole-foundation/sdk-evm-ntt: auto-registration on import is deprecated. Import { register } and call it explicitly.");
|
|
52
|
+
}
|
|
53
|
+
(0, sdk_definitions_ntt_1.register)();
|
|
54
|
+
if (!(0, sdk_definitions_1.protocolIsRegistered)(sdk_evm_1._platform, "Ntt")) {
|
|
55
|
+
(0, sdk_definitions_1.registerProtocol)(sdk_evm_1._platform, "Ntt", ntt_js_1.EvmNtt);
|
|
56
|
+
}
|
|
57
|
+
if (!(0, sdk_definitions_1.protocolIsRegistered)(sdk_evm_1._platform, "NttWithExecutor")) {
|
|
58
|
+
(0, sdk_definitions_1.registerProtocol)(sdk_evm_1._platform, "NttWithExecutor", nttWithExecutor_js_1.EvmNttWithExecutor);
|
|
59
|
+
}
|
|
60
|
+
if (!(0, sdk_definitions_1.protocolIsRegistered)(sdk_evm_1._platform, "MultiTokenNtt")) {
|
|
61
|
+
(0, sdk_definitions_1.registerProtocol)(sdk_evm_1._platform, "MultiTokenNtt", multiTokenNtt_js_1.EvmMultiTokenNtt);
|
|
62
|
+
}
|
|
63
|
+
if (!(0, sdk_definitions_1.protocolIsRegistered)(sdk_evm_1._platform, "MultiTokenNttWithExecutor")) {
|
|
64
|
+
(0, sdk_definitions_1.registerProtocol)(sdk_evm_1._platform, "MultiTokenNttWithExecutor", multiTokenNttWithExecutor_js_1.EvmMultiTokenNttWithExecutor);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Backward-compatible: auto-register on import
|
|
68
|
+
// TODO: remove this next time we are cool with a major version bump and are OK requiring integrators to make code changes
|
|
69
|
+
register(true);
|
|
51
70
|
exports.ethers_contracts = __importStar(require("./ethers-contracts/index.js"));
|
|
52
71
|
__exportStar(require("./ntt.js"), exports);
|
|
53
72
|
__exportStar(require("./nttWithExecutor.js"), exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,4BAuBC;AAnCD,0EAG8C;AAC9C,0DAAyD;AACzD,qCAAkC;AAClC,6DAA0D;AAC1D,yDAAsD;AACtD,iFAA8E;AAC9E,kFAA2F;AAE3F,uFAAuF;AACvF,SAAgB,QAAQ,CAAC,QAAQ,GAAG,KAAK;IACvC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CACV,0HAA0H,CAC3H,CAAC;IACJ,CAAC;IACD,IAAA,8BAAmB,GAAE,CAAC;IACtB,IAAI,CAAC,IAAA,sCAAoB,EAAC,mBAAS,EAAE,KAAK,CAAC,EAAE,CAAC;QAC5C,IAAA,kCAAgB,EAAC,mBAAS,EAAE,KAAK,EAAE,eAAM,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,CAAC,IAAA,sCAAoB,EAAC,mBAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC;QACxD,IAAA,kCAAgB,EAAC,mBAAS,EAAE,iBAAiB,EAAE,uCAAkB,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,CAAC,IAAA,sCAAoB,EAAC,mBAAS,EAAE,eAAe,CAAC,EAAE,CAAC;QACtD,IAAA,kCAAgB,EAAC,mBAAS,EAAE,eAAe,EAAE,mCAAgB,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,CAAC,IAAA,sCAAoB,EAAC,mBAAS,EAAE,2BAA2B,CAAC,EAAE,CAAC;QAClE,IAAA,kCAAgB,EACd,mBAAS,EACT,2BAA2B,EAC3B,2DAA4B,CAC7B,CAAC;IACJ,CAAC;AACH,CAAC;AAED,+CAA+C;AAC/C,0HAA0H;AAC1H,QAAQ,CAAC,IAAI,CAAC,CAAC;AAEf,gFAAgE;AAChE,2CAAyB;AACzB,uDAAqC;AACrC,qDAAmC;AACnC,iEAA+C"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** Explicitly register EVM NTT protocols. Idempotent — safe to call multiple times. */
|
|
2
|
+
export declare function register(topLevel?: boolean): void;
|
|
2
3
|
export * as ethers_contracts from "./ethers-contracts/index.js";
|
|
3
4
|
export * from "./ntt.js";
|
|
4
5
|
export * from "./nttWithExecutor.js";
|
package/dist/esm/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":"AAWA,uFAAuF;AACvF,wBAAgB,QAAQ,CAAC,QAAQ,UAAQ,GAAG,IAAI,CAuB/C;AAMD,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAC;AAChE,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
import { registerProtocol } from "@wormhole-foundation/sdk-definitions";
|
|
1
|
+
import { registerProtocol, protocolIsRegistered, } from "@wormhole-foundation/sdk-definitions";
|
|
2
2
|
import { _platform } from "@wormhole-foundation/sdk-evm";
|
|
3
3
|
import { EvmNtt } from "./ntt.js";
|
|
4
4
|
import { EvmNttWithExecutor } from "./nttWithExecutor.js";
|
|
5
5
|
import { EvmMultiTokenNtt } from "./multiTokenNtt.js";
|
|
6
6
|
import { EvmMultiTokenNttWithExecutor } from "./multiTokenNttWithExecutor.js";
|
|
7
|
-
import "@wormhole-foundation/sdk-definitions-ntt";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import { register as registerDefinitions } from "@wormhole-foundation/sdk-definitions-ntt";
|
|
8
|
+
/** Explicitly register EVM NTT protocols. Idempotent — safe to call multiple times. */
|
|
9
|
+
export function register(topLevel = false) {
|
|
10
|
+
if (topLevel) {
|
|
11
|
+
console.warn("@wormhole-foundation/sdk-evm-ntt: auto-registration on import is deprecated. Import { register } and call it explicitly.");
|
|
12
|
+
}
|
|
13
|
+
registerDefinitions();
|
|
14
|
+
if (!protocolIsRegistered(_platform, "Ntt")) {
|
|
15
|
+
registerProtocol(_platform, "Ntt", EvmNtt);
|
|
16
|
+
}
|
|
17
|
+
if (!protocolIsRegistered(_platform, "NttWithExecutor")) {
|
|
18
|
+
registerProtocol(_platform, "NttWithExecutor", EvmNttWithExecutor);
|
|
19
|
+
}
|
|
20
|
+
if (!protocolIsRegistered(_platform, "MultiTokenNtt")) {
|
|
21
|
+
registerProtocol(_platform, "MultiTokenNtt", EvmMultiTokenNtt);
|
|
22
|
+
}
|
|
23
|
+
if (!protocolIsRegistered(_platform, "MultiTokenNttWithExecutor")) {
|
|
24
|
+
registerProtocol(_platform, "MultiTokenNttWithExecutor", EvmMultiTokenNttWithExecutor);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
// Backward-compatible: auto-register on import
|
|
28
|
+
// TODO: remove this next time we are cool with a major version bump and are OK requiring integrators to make code changes
|
|
29
|
+
register(true);
|
|
12
30
|
export * as ethers_contracts from "./ethers-contracts/index.js";
|
|
13
31
|
export * from "./ntt.js";
|
|
14
32
|
export * from "./nttWithExecutor.js";
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,QAAQ,IAAI,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE3F,uFAAuF;AACvF,MAAM,UAAU,QAAQ,CAAC,QAAQ,GAAG,KAAK;IACvC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CACV,0HAA0H,CAC3H,CAAC;IACJ,CAAC;IACD,mBAAmB,EAAE,CAAC;IACtB,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;QAC5C,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC;QACxD,gBAAgB,CAAC,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,CAAC;QACtD,gBAAgB,CAAC,SAAS,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE,2BAA2B,CAAC,EAAE,CAAC;QAClE,gBAAgB,CACd,SAAS,EACT,2BAA2B,EAC3B,4BAA4B,CAC7B,CAAC;IACJ,CAAC;AACH,CAAC;AAED,+CAA+C;AAC/C,0HAA0H;AAC1H,QAAQ,CAAC,IAAI,CAAC,CAAC;AAEf,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAC;AAChE,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wormhole-foundation/sdk-evm-ntt",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.14",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/wormhole-foundation/native-token-transfers.git"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"prettier": "prettier --write ./src ./__tests__"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@wormhole-foundation/sdk-definitions-ntt": "4.0.
|
|
49
|
+
"@wormhole-foundation/sdk-definitions-ntt": "4.0.14",
|
|
50
50
|
"ethers": "^6.5.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|