@wormhole-foundation/sdk-aptos-tokenbridge 1.1.0 → 1.1.2-alpha.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.
@@ -1,10 +1,10 @@
1
- import { layout } from "@wormhole-foundation/sdk-connect";
1
+ import type { LayoutToType } from "@wormhole-foundation/sdk-base";
2
2
  declare const foreignAddressSeedLayout: readonly [{
3
3
  readonly binary: "bytes";
4
4
  readonly size: 32;
5
5
  readonly custom: {
6
- to: (val: Uint8Array) => import("@wormhole-foundation/sdk-connect").UniversalAddress;
7
- from: (val: import("@wormhole-foundation/sdk-connect").UniversalAddress) => Uint8Array;
6
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
7
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
8
8
  };
9
9
  readonly name: "tokenBridgeAddress";
10
10
  }, {
@@ -24,8 +24,8 @@ declare const foreignAddressSeedLayout: readonly [{
24
24
  readonly binary: "bytes";
25
25
  readonly size: 32;
26
26
  readonly custom: {
27
- to: (val: Uint8Array) => import("@wormhole-foundation/sdk-connect").UniversalAddress;
28
- from: (val: import("@wormhole-foundation/sdk-connect").UniversalAddress) => Uint8Array;
27
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
28
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
29
29
  };
30
30
  readonly name: "tokenId";
31
31
  }, {
@@ -34,6 +34,6 @@ declare const foreignAddressSeedLayout: readonly [{
34
34
  readonly custom: Uint8Array;
35
35
  readonly omit: true;
36
36
  }];
37
- export declare const serializeForeignAddressSeeds: (data: layout.LayoutToType<typeof foreignAddressSeedLayout>) => Uint8Array;
37
+ export declare const serializeForeignAddressSeeds: (data: LayoutToType<typeof foreignAddressSeedLayout>) => Uint8Array;
38
38
  export {};
39
39
  //# sourceMappingURL=foreignAddress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"foreignAddress.d.ts","sourceRoot":"","sources":["../../src/foreignAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAe,MAAM,kCAAkC,CAAC;AAGjF,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYI,CAAC;AAEnC,eAAO,MAAM,4BAA4B,SACjC,OAAO,YAAY,CAAC,+BAA+B,CAAC,KACzD,UAAoE,CAAC"}
1
+ {"version":3,"file":"foreignAddress.d.ts","sourceRoot":"","sources":["../../src/foreignAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAK1E,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYH,CAAC;AAE5B,eAAO,MAAM,4BAA4B,SACjC,aAAa,+BAA+B,CAAC,KAClD,UAA6D,CAAC"}
@@ -1,21 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serializeForeignAddressSeeds = void 0;
4
- const sdk_connect_1 = require("@wormhole-foundation/sdk-connect");
4
+ const sdk_base_1 = require("@wormhole-foundation/sdk-base");
5
+ const sdk_definitions_1 = require("@wormhole-foundation/sdk-definitions");
5
6
  const sdk_aptos_1 = require("@wormhole-foundation/sdk-aptos");
6
7
  const foreignAddressSeedLayout = [
7
- { name: "tokenBridgeAddress", ...sdk_connect_1.layoutItems.universalAddressItem },
8
- { name: "chain", ...sdk_connect_1.layoutItems.chainItem() },
8
+ { name: "tokenBridgeAddress", ...sdk_definitions_1.layoutItems.universalAddressItem },
9
+ { name: "chain", ...sdk_definitions_1.layoutItems.chainItem() },
9
10
  {
10
11
  name: "domainSeparator",
11
12
  binary: "bytes",
12
- custom: sdk_connect_1.encoding.bytes.encode(sdk_aptos_1.APTOS_SEPARATOR),
13
+ custom: sdk_base_1.encoding.bytes.encode(sdk_aptos_1.APTOS_SEPARATOR),
13
14
  omit: true,
14
15
  },
15
- { name: "tokenId", ...sdk_connect_1.layoutItems.universalAddressItem },
16
+ { name: "tokenId", ...sdk_definitions_1.layoutItems.universalAddressItem },
16
17
  // from https://github.com/aptos-labs/aptos-core/blob/25696fd266498d81d346fe86e01c330705a71465/aptos-move/framework/aptos-framework/sources/account.move#L90-L95
17
18
  { name: "domainSeparator", binary: "bytes", custom: new Uint8Array([0xff]), omit: true },
18
19
  ];
19
- const serializeForeignAddressSeeds = (data) => sdk_connect_1.layout.serializeLayout(foreignAddressSeedLayout, data);
20
+ const serializeForeignAddressSeeds = (data) => (0, sdk_base_1.serializeLayout)(foreignAddressSeedLayout, data);
20
21
  exports.serializeForeignAddressSeeds = serializeForeignAddressSeeds;
21
22
  //# sourceMappingURL=foreignAddress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"foreignAddress.js","sourceRoot":"","sources":["../../src/foreignAddress.ts"],"names":[],"mappings":";;;AAAA,kEAAiF;AACjF,8DAAiE;AAEjE,MAAM,wBAAwB,GAAG;IAC/B,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,yBAAW,CAAC,oBAAoB,EAAE;IACnE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,yBAAW,CAAC,SAAS,EAAE,EAAE;IAC7C;QACE,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,sBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,2BAAe,CAAC;QAC9C,IAAI,EAAE,IAAI;KACX;IACD,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,yBAAW,CAAC,oBAAoB,EAAE;IACxD,gKAAgK;IAChK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;CACxD,CAAC;AAE5B,MAAM,4BAA4B,GAAG,CAC1C,IAA0D,EAC9C,EAAE,CAAC,oBAAM,CAAC,eAAe,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;AAF3D,QAAA,4BAA4B,gCAE+B"}
1
+ {"version":3,"file":"foreignAddress.js","sourceRoot":"","sources":["../../src/foreignAddress.ts"],"names":[],"mappings":";;;AACA,4DAA0E;AAC1E,0EAAmE;AACnE,8DAAiE;AAEjE,MAAM,wBAAwB,GAAG;IAC/B,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACnE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,6BAAW,CAAC,SAAS,EAAE,EAAE;IAC7C;QACE,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,OAAO;QACf,MAAM,EAAE,mBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,2BAAe,CAAC;QAC9C,IAAI,EAAE,IAAI;KACX;IACD,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,6BAAW,CAAC,oBAAoB,EAAE;IACxD,gKAAgK;IAChK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;CAC/D,CAAC;AAErB,MAAM,4BAA4B,GAAG,CAC1C,IAAmD,EACvC,EAAE,CAAC,IAAA,0BAAe,EAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;AAFpD,QAAA,4BAA4B,gCAEwB"}
@@ -1,10 +1,10 @@
1
- import { layout } from "@wormhole-foundation/sdk-connect";
1
+ import type { LayoutToType } from "@wormhole-foundation/sdk-base";
2
2
  declare const foreignAddressSeedLayout: readonly [{
3
3
  readonly binary: "bytes";
4
4
  readonly size: 32;
5
5
  readonly custom: {
6
- to: (val: Uint8Array) => import("@wormhole-foundation/sdk-connect").UniversalAddress;
7
- from: (val: import("@wormhole-foundation/sdk-connect").UniversalAddress) => Uint8Array;
6
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
7
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
8
8
  };
9
9
  readonly name: "tokenBridgeAddress";
10
10
  }, {
@@ -24,8 +24,8 @@ declare const foreignAddressSeedLayout: readonly [{
24
24
  readonly binary: "bytes";
25
25
  readonly size: 32;
26
26
  readonly custom: {
27
- to: (val: Uint8Array) => import("@wormhole-foundation/sdk-connect").UniversalAddress;
28
- from: (val: import("@wormhole-foundation/sdk-connect").UniversalAddress) => Uint8Array;
27
+ to: (val: Uint8Array) => import("@wormhole-foundation/sdk-definitions").UniversalAddress;
28
+ from: (val: import("@wormhole-foundation/sdk-definitions").UniversalAddress) => Uint8Array;
29
29
  };
30
30
  readonly name: "tokenId";
31
31
  }, {
@@ -34,6 +34,6 @@ declare const foreignAddressSeedLayout: readonly [{
34
34
  readonly custom: Uint8Array;
35
35
  readonly omit: true;
36
36
  }];
37
- export declare const serializeForeignAddressSeeds: (data: layout.LayoutToType<typeof foreignAddressSeedLayout>) => Uint8Array;
37
+ export declare const serializeForeignAddressSeeds: (data: LayoutToType<typeof foreignAddressSeedLayout>) => Uint8Array;
38
38
  export {};
39
39
  //# sourceMappingURL=foreignAddress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"foreignAddress.d.ts","sourceRoot":"","sources":["../../src/foreignAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,MAAM,EAAe,MAAM,kCAAkC,CAAC;AAGjF,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYI,CAAC;AAEnC,eAAO,MAAM,4BAA4B,SACjC,OAAO,YAAY,CAAC,+BAA+B,CAAC,KACzD,UAAoE,CAAC"}
1
+ {"version":3,"file":"foreignAddress.d.ts","sourceRoot":"","sources":["../../src/foreignAddress.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAK1E,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYH,CAAC;AAE5B,eAAO,MAAM,4BAA4B,SACjC,aAAa,+BAA+B,CAAC,KAClD,UAA6D,CAAC"}
@@ -1,4 +1,5 @@
1
- import { encoding, layout, layoutItems } from "@wormhole-foundation/sdk-connect";
1
+ import { encoding, serializeLayout } from "@wormhole-foundation/sdk-base";
2
+ import { layoutItems } from "@wormhole-foundation/sdk-definitions";
2
3
  import { APTOS_SEPARATOR } from "@wormhole-foundation/sdk-aptos";
3
4
  const foreignAddressSeedLayout = [
4
5
  { name: "tokenBridgeAddress", ...layoutItems.universalAddressItem },
@@ -13,5 +14,5 @@ const foreignAddressSeedLayout = [
13
14
  // from https://github.com/aptos-labs/aptos-core/blob/25696fd266498d81d346fe86e01c330705a71465/aptos-move/framework/aptos-framework/sources/account.move#L90-L95
14
15
  { name: "domainSeparator", binary: "bytes", custom: new Uint8Array([0xff]), omit: true },
15
16
  ];
16
- export const serializeForeignAddressSeeds = (data) => layout.serializeLayout(foreignAddressSeedLayout, data);
17
+ export const serializeForeignAddressSeeds = (data) => serializeLayout(foreignAddressSeedLayout, data);
17
18
  //# sourceMappingURL=foreignAddress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"foreignAddress.js","sourceRoot":"","sources":["../../src/foreignAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,wBAAwB,GAAG;IAC/B,EAAE,IAAI,EAAE,oBAAoB,EAAE,GAAG,WAAW,CAAC,oBAAoB,EAAE;IACnE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,SAAS,EAAE,EAAE;IAC7C;QACE,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,OAAO;QACf,MAAM,EAA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AE,IAAI,EAAE;CAC/D,CAAC;AAE5B,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,IAAmD,EACvC,EAAE,CAAC,eAAe,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wormhole-foundation/sdk-aptos-tokenbridge",
3
- "version": "1.1.0",
3
+ "version": "1.1.2-alpha.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -45,8 +45,8 @@
45
45
  "prettier": "prettier --write ./src"
46
46
  },
47
47
  "dependencies": {
48
- "@wormhole-foundation/sdk-connect": "1.1.0",
49
- "@wormhole-foundation/sdk-aptos": "1.1.0"
48
+ "@wormhole-foundation/sdk-connect": "1.1.2-alpha.0",
49
+ "@wormhole-foundation/sdk-aptos": "1.1.2-alpha.0"
50
50
  },
51
51
  "type": "module",
52
52
  "exports": {