@wormhole-foundation/sdk-solana-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/ts/sdk/index.d.ts +2 -1
- package/dist/cjs/ts/sdk/index.d.ts.map +1 -1
- package/dist/cjs/ts/sdk/index.js +18 -3
- package/dist/cjs/ts/sdk/index.js.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/ts/sdk/index.d.ts +2 -1
- package/dist/esm/ts/sdk/index.d.ts.map +1 -1
- package/dist/esm/ts/sdk/index.js +18 -4
- package/dist/esm/ts/sdk/index.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "@wormhole-foundation/sdk-definitions-ntt";
|
|
2
1
|
import "./side-effects";
|
|
2
|
+
/** Explicitly register Solana NTT protocols. Idempotent — safe to call multiple times. */
|
|
3
|
+
export declare function register(topLevel?: boolean): void;
|
|
3
4
|
export * from "./ntt.js";
|
|
4
5
|
export * from "./nttWithExecutor.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ts/sdk/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ts/sdk/index.ts"],"names":[],"mappings":"AAQA,OAAO,gBAAgB,CAAC;AAExB,0FAA0F;AAC1F,wBAAgB,QAAQ,CAAC,QAAQ,UAAQ,GAAG,IAAI,CAa/C;AAMD,cAAc,UAAU,CAAC;AACzB,cAAc,sBAAsB,CAAC"}
|
package/dist/cjs/ts/sdk/index.js
CHANGED
|
@@ -14,14 +14,29 @@ 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.register = register;
|
|
17
18
|
const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
|
|
18
19
|
const sdk_solana_1 = require("@wormhole-foundation/sdk-solana");
|
|
19
20
|
const ntt_js_1 = require("./ntt.js");
|
|
20
21
|
const nttWithExecutor_js_1 = require("./nttWithExecutor.js");
|
|
21
|
-
require("@wormhole-foundation/sdk-definitions-ntt");
|
|
22
|
+
const sdk_definitions_ntt_1 = require("@wormhole-foundation/sdk-definitions-ntt");
|
|
22
23
|
require("./side-effects");
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
/** Explicitly register Solana NTT protocols. Idempotent — safe to call multiple times. */
|
|
25
|
+
function register(topLevel = false) {
|
|
26
|
+
if (topLevel) {
|
|
27
|
+
console.warn("@wormhole-foundation/sdk-solana-ntt: auto-registration on import is deprecated. Import { register } and call it explicitly.");
|
|
28
|
+
}
|
|
29
|
+
(0, sdk_definitions_ntt_1.register)();
|
|
30
|
+
if (!(0, sdk_definitions_1.protocolIsRegistered)(sdk_solana_1._platform, "Ntt")) {
|
|
31
|
+
(0, sdk_definitions_1.registerProtocol)(sdk_solana_1._platform, "Ntt", ntt_js_1.SolanaNtt);
|
|
32
|
+
}
|
|
33
|
+
if (!(0, sdk_definitions_1.protocolIsRegistered)(sdk_solana_1._platform, "NttWithExecutor")) {
|
|
34
|
+
(0, sdk_definitions_1.registerProtocol)(sdk_solana_1._platform, "NttWithExecutor", nttWithExecutor_js_1.SolanaNttWithExecutor);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Backward-compatible: auto-register on import
|
|
38
|
+
// TODO: remove this next time we are cool with a major version bump and are OK requiring integrators to make code changes
|
|
39
|
+
register(true);
|
|
25
40
|
__exportStar(require("./ntt.js"), exports);
|
|
26
41
|
__exportStar(require("./nttWithExecutor.js"), exports);
|
|
27
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../ts/sdk/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../ts/sdk/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAWA,4BAaC;AAxBD,0EAG8C;AAC9C,gEAA4D;AAC5D,qCAAqC;AACrC,6DAA6D;AAC7D,kFAA2F;AAC3F,0BAAwB;AAExB,0FAA0F;AAC1F,SAAgB,QAAQ,CAAC,QAAQ,GAAG,KAAK;IACvC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CACV,6HAA6H,CAC9H,CAAC;IACJ,CAAC;IACD,IAAA,8BAAmB,GAAE,CAAC;IACtB,IAAI,CAAC,IAAA,sCAAoB,EAAC,sBAAS,EAAE,KAAK,CAAC,EAAE,CAAC;QAC5C,IAAA,kCAAgB,EAAC,sBAAS,EAAE,KAAK,EAAE,kBAAS,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,CAAC,IAAA,sCAAoB,EAAC,sBAAS,EAAE,iBAAiB,CAAC,EAAE,CAAC;QACxD,IAAA,kCAAgB,EAAC,sBAAS,EAAE,iBAAiB,EAAE,0CAAqB,CAAC,CAAC;IACxE,CAAC;AACH,CAAC;AAED,+CAA+C;AAC/C,0HAA0H;AAC1H,QAAQ,CAAC,IAAI,CAAC,CAAC;AAEf,2CAAyB;AACzB,uDAAqC"}
|