@socket.tech/dl-common 1.0.3-test.3 → 1.0.3-test.5

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.
@@ -94,6 +94,8 @@ export interface AttestSuccess {
94
94
  packetId: string;
95
95
  proposalCount: number;
96
96
  signature: string;
97
+ digest: string;
98
+ signerAddress: string;
97
99
  }
98
100
  export interface AttestFailure {
99
101
  proposalValid: false;
@@ -1,7 +1,7 @@
1
1
  export interface PacketDetails {
2
2
  chainSlug: number;
3
3
  capacitorAddr: string;
4
- packetNonce: string;
4
+ packetCount: string;
5
5
  }
6
6
  export interface MessageDetails {
7
7
  chainSlug: number;
@@ -10,5 +10,5 @@ export interface MessageDetails {
10
10
  }
11
11
  export declare const unpackPacketId: (packetId: string) => PacketDetails;
12
12
  export declare const unpackMessageId: (messageId: string) => MessageDetails;
13
- export declare const packPacketId: (chainSlug: number, capacitorAddr: string, packetNonce: string) => string;
13
+ export declare const packPacketId: (chainSlug: number, capacitorAddr: string, packetCount: string) => string;
14
14
  export declare function encodePacketId(chainSlug: number, capacitorAddress: string, packetCount: number): string;
@@ -9,11 +9,11 @@ const unpackPacketId = (packetId) => {
9
9
  const slugLength = packetId.length - 58;
10
10
  const chainSlug = parseInt(ethers_1.BigNumber.from(`0x${packetId.substring(2, 2 + slugLength)}`).toString());
11
11
  const capacitorAddr = (0, address_1.toLowerCase)(`0x${packetId.substring(2 + slugLength, 40 + 2 + slugLength)}`);
12
- const packetNonce = ethers_1.BigNumber.from(`0x${packetId.substring(40 + 2 + slugLength)}`).toString();
12
+ const packetCount = ethers_1.BigNumber.from(`0x${packetId.substring(40 + 2 + slugLength)}`).toString();
13
13
  return {
14
14
  chainSlug,
15
15
  capacitorAddr,
16
- packetNonce,
16
+ packetCount,
17
17
  };
18
18
  };
19
19
  exports.unpackPacketId = unpackPacketId;
@@ -30,8 +30,8 @@ const unpackMessageId = (messageId) => {
30
30
  };
31
31
  };
32
32
  exports.unpackMessageId = unpackMessageId;
33
- const packPacketId = (chainSlug, capacitorAddr, packetNonce) => {
34
- const nonce = ethers_1.BigNumber.from(packetNonce).toHexString();
33
+ const packPacketId = (chainSlug, capacitorAddr, packetCount) => {
34
+ const nonce = ethers_1.BigNumber.from(packetCount).toHexString();
35
35
  const nonceHex = nonce.length <= 16 ? (0, utils_1.hexZeroPad)(nonce, 8).substring(2) : nonce.substring(2);
36
36
  const slug = ethers_1.BigNumber.from(chainSlug).toHexString();
37
37
  const slugHex = slug.length <= 10 ? (0, utils_1.hexZeroPad)(slug, 4) : slug;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socket.tech/dl-common",
3
- "version": "1.0.3-test.3",
3
+ "version": "1.0.3-test.5",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "description": "common utilities for socket data layer.",