@midnightntwrk/wallet-sdk-address-format 4.0.0-beta.1 → 4.0.0-beta.3

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/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  Bech32m address encoding and decoding for the Midnight network.
4
4
 
5
+ The canonical encoding rules are defined in the [Wallet Specification](../../docs/spec/Specification.md) (Address format
6
+ section), with test vectors maintained in the [spec reference implementation](../spec-reference).
7
+
5
8
  ## Installation
6
9
 
7
10
  ```bash
package/dist/index.d.ts CHANGED
@@ -98,6 +98,7 @@ export declare class DustAddress {
98
98
  static readonly encodePublicKey: (networkId: string, publicKey: DustPublicKey) => string;
99
99
  constructor(data: bigint);
100
100
  serialize(): Buffer;
101
+ get hexString(): string;
101
102
  equals(other: bigint): boolean;
102
103
  equals(other: DustAddress): boolean;
103
104
  }
package/dist/index.js CHANGED
@@ -226,6 +226,9 @@ export class DustAddress {
226
226
  serialize() {
227
227
  return ScaleBigInt.encode(this.data);
228
228
  }
229
+ get hexString() {
230
+ return this.serialize().toString('hex');
231
+ }
229
232
  equals(other) {
230
233
  const otherAddress = typeof other === 'bigint' ? other : other.data;
231
234
  return otherAddress === this.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midnightntwrk/wallet-sdk-address-format",
3
- "version": "4.0.0-beta.1",
3
+ "version": "4.0.0-beta.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -26,7 +26,7 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@midnightntwrk/ledger-v9": "1.0.0-rc.2",
29
+ "@midnightntwrk/ledger-v9": "1.0.0-rc.4",
30
30
  "@scure/base": "^2.0.0",
31
31
  "@subsquid/scale-codec": "^4.0.1"
32
32
  },