@dignetwork/dig-sdk 0.0.1-alpha.194 → 0.0.1-alpha.196

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 +1 @@
1
- {"version":3,"file":"ContentServer.d.ts","sourceRoot":"","sources":["../../src/DigNetwork/ContentServer.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAOlC,qBAAa,aAAa;IACxB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAQ;gBAExB,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAYjC,MAAM,CACjB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC;IAeL,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAS3D,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAcxD;;;;OAIG;IACU,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC;IA6B5B,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC;IAQ9B,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC;IAM9B,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAqB7C,OAAO,CAClB,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAA;KAAE,CAAC;IAqBvD,SAAS,CAAC,OAAO,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QACjE,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;KACpC,CAAC;IAmBF;;;;;;OAMG;IACU,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA0BrD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;YAmDrD,IAAI;YA0EJ,SAAS;YAMT,gBAAgB;YAiChB,KAAK;YA+GL,eAAe;CA4G9B"}
1
+ {"version":3,"file":"ContentServer.d.ts","sourceRoot":"","sources":["../../src/DigNetwork/ContentServer.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAQlC,qBAAa,aAAa;IACxB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAS;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAQ;gBAExB,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAYjC,MAAM,CACjB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC;IAiBL,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAW3D,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAcxD;;;;OAIG;IACU,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC;IA6B5B,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC;IAQ9B,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC;IAM9B,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAiB7C,OAAO,CAClB,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAA;KAAE,CAAC;IAiBvD,SAAS,CAAC,OAAO,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QACjE,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;KACpC,CAAC;IAoBF;;;;;;OAMG;IACU,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IA0BrD,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;YA+CrD,IAAI;YA0EJ,SAAS;YAMT,gBAAgB;YAiChB,KAAK;YA+GL,eAAe;CA4G9B"}
@@ -9,6 +9,7 @@ const http_1 = __importDefault(require("http"));
9
9
  const url_1 = require("url");
10
10
  const utils_1 = require("../utils");
11
11
  const node_cache_1 = __importDefault(require("node-cache"));
12
+ const utils_2 = require("../utils");
12
13
  const hasRootHashCache = new node_cache_1.default({ stdTTL: 86400 });
13
14
  const wellKnownCache = new node_cache_1.default({ stdTTL: 86400 });
14
15
  class ContentServer {
@@ -23,8 +24,9 @@ class ContentServer {
23
24
  }
24
25
  // Method to get the content of a specified key from the peer, with optional challenge query
25
26
  async getKey(key, rootHash, challengeHex) {
27
+ const udi = new utils_2.Udi("chia", this.storeId, rootHash, key);
26
28
  // Construct the base URL
27
- let url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/chia.${this.storeId}.${rootHash}/${key}`;
29
+ let url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi.toString()}`;
28
30
  // If a challenge is provided, append it as a query parameter
29
31
  if (challengeHex) {
30
32
  url += `?challenge=${challengeHex}`;
@@ -33,8 +35,9 @@ class ContentServer {
33
35
  }
34
36
  // New method to get only the first chunk of the content
35
37
  async getKeyChunk(key, rootHash) {
38
+ const udi = new utils_2.Udi("chia", this.storeId, rootHash, key);
36
39
  // Construct the base URL
37
- let url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/chia.${this.storeId}.${rootHash}/${key}`;
40
+ let url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi.toString()}`;
38
41
  return this.fetchFirstChunk(url);
39
42
  }
40
43
  // Method to get the payment address from the peer
@@ -87,11 +90,8 @@ class ContentServer {
87
90
  // Method to get the index of keys in a store
88
91
  async getKeysIndex(rootHash) {
89
92
  try {
90
- let udi = `chia.${this.storeId}`;
91
- if (rootHash) {
92
- udi += `.${rootHash}`;
93
- }
94
- const url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi}`;
93
+ const udi = new utils_2.Udi("chia", this.storeId, rootHash);
94
+ const url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi.toString()}`;
95
95
  return this.fetchJson(url);
96
96
  }
97
97
  catch (error) {
@@ -104,11 +104,8 @@ class ContentServer {
104
104
  // Method to check if a specific key exists (HEAD request)
105
105
  async headKey(key, rootHash) {
106
106
  try {
107
- let udi = `chia.${this.storeId}`;
108
- if (rootHash) {
109
- udi += `.${rootHash}`;
110
- }
111
- const url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi}/${key}`;
107
+ const udi = new utils_2.Udi("chia", this.storeId, rootHash, key);
108
+ const url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi.toString()}`;
112
109
  return this.head(url);
113
110
  }
114
111
  catch (error) {
@@ -120,8 +117,9 @@ class ContentServer {
120
117
  }
121
118
  // Method to check if a specific store exists (HEAD request)
122
119
  async headStore(options) {
120
+ const udi = new utils_2.Udi("chia", this.storeId);
123
121
  try {
124
- let url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/chia.${this.storeId}`;
122
+ let url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi.toString()}`;
125
123
  if (options?.hasRootHash) {
126
124
  url += `?hasRootHash=${options.hasRootHash}`;
127
125
  }
@@ -162,12 +160,9 @@ class ContentServer {
162
160
  return hasHash;
163
161
  }
164
162
  streamKey(key, rootHash) {
165
- let udi = `chia.${this.storeId}`;
166
- if (rootHash) {
167
- udi += `.${rootHash}`;
168
- }
163
+ const udi = new utils_2.Udi("chia", this.storeId, rootHash, key);
169
164
  return new Promise((resolve, reject) => {
170
- const url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi}/${key}`;
165
+ const url = `https://${(0, utils_1.formatHost)(this.ipAddress)}:${ContentServer.port}/${udi.toString()}`;
171
166
  const urlObj = new url_1.URL(url);
172
167
  const requestOptions = {
173
168
  hostname: urlObj.hostname,
@@ -0,0 +1,44 @@
1
+ /**
2
+ * SubDomain Class
3
+ *
4
+ * Encapsulates the logic for encoding and decoding a combination of
5
+ * chain and storeId into a DNS-friendly identifier using Base62 encoding and HMAC.
6
+ */
7
+ declare class SubDomain {
8
+ private static readonly BASE62_CHARSET;
9
+ private static base62;
10
+ private static readonly DEFAULT_STORE_ID_LENGTH;
11
+ private static readonly HMAC_LENGTH;
12
+ private static readonly COMPRESSION_KEY;
13
+ readonly chain: string;
14
+ readonly storeId: string;
15
+ readonly encodedId: string;
16
+ /**
17
+ * Constructor for SubDomain
18
+ *
19
+ * @param chain - The chain name (e.g., "CHAIN1234").
20
+ * @param storeId - The store ID as a 64-character hexadecimal string.
21
+ * @throws Will throw an error if inputs are invalid or encoding exceeds DNS limits.
22
+ */
23
+ constructor(chain: string, storeId: string);
24
+ /**
25
+ * Encodes the provided chain and storeId into a DNS-friendly identifier with HMAC.
26
+ *
27
+ * @returns The Base62-encoded identifier with appended HMAC.
28
+ * @throws Will throw an error if encoding fails.
29
+ */
30
+ private encode;
31
+ /**
32
+ * Decodes the provided identifier back into the original chain and storeId after verifying HMAC.
33
+ *
34
+ * @param encodedId - The Base62-encoded identifier with appended HMAC.
35
+ * @returns An object containing the original chain and storeId.
36
+ * @throws Will throw an error if decoding fails, HMAC verification fails, or data lengths mismatch.
37
+ */
38
+ static decode(encodedId: string): {
39
+ chain: string;
40
+ storeId: string;
41
+ };
42
+ }
43
+ export { SubDomain };
44
+ //# sourceMappingURL=Subdomain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Subdomain.d.ts","sourceRoot":"","sources":["../../src/utils/Subdomain.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,cAAM,SAAS;IAEb,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAC6B;IAGnE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAmC;IAGxD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAM;IACrD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAM;IAGzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAC6B;IAGpE,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,SAAS,EAAE,MAAM,CAAC;IAElC;;;;;;OAMG;gBACS,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAM1C;;;;;OAKG;IACH,OAAO,CAAC,MAAM;IAoEd;;;;;;OAMG;WACW,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;CAuE5E;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ // SubDomain.ts
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.SubDomain = void 0;
8
+ const base_x_1 = __importDefault(require("base-x"));
9
+ const crypto_1 = __importDefault(require("crypto"));
10
+ /**
11
+ * SubDomain Class
12
+ *
13
+ * Encapsulates the logic for encoding and decoding a combination of
14
+ * chain and storeId into a DNS-friendly identifier using Base62 encoding and HMAC.
15
+ */
16
+ class SubDomain {
17
+ /**
18
+ * Constructor for SubDomain
19
+ *
20
+ * @param chain - The chain name (e.g., "CHAIN1234").
21
+ * @param storeId - The store ID as a 64-character hexadecimal string.
22
+ * @throws Will throw an error if inputs are invalid or encoding exceeds DNS limits.
23
+ */
24
+ constructor(chain, storeId) {
25
+ this.chain = chain;
26
+ this.storeId = storeId;
27
+ this.encodedId = this.encode();
28
+ }
29
+ /**
30
+ * Encodes the provided chain and storeId into a DNS-friendly identifier with HMAC.
31
+ *
32
+ * @returns The Base62-encoded identifier with appended HMAC.
33
+ * @throws Will throw an error if encoding fails.
34
+ */
35
+ encode() {
36
+ // Validate inputs
37
+ if (!this.chain || typeof this.chain !== "string") {
38
+ throw new Error("Invalid chain: Chain must be a non-empty string.");
39
+ }
40
+ if (!this.storeId ||
41
+ typeof this.storeId !== "string" ||
42
+ !/^[0-9a-fA-F]{64}$/.test(this.storeId)) {
43
+ throw new Error("Invalid storeId: StoreId must be a 64-character hexadecimal string.");
44
+ }
45
+ // Ensure the chain length is within 1-255 characters to fit in one byte
46
+ const chainLength = this.chain.length;
47
+ if (chainLength < 1 || chainLength > 255) {
48
+ throw new Error("Invalid chain: Length must be between 1 and 255 characters.");
49
+ }
50
+ // Convert chain length to a single byte Buffer
51
+ const chainLengthBuffer = Buffer.from([chainLength]);
52
+ // Convert chain to a Buffer (UTF-8)
53
+ const chainBuffer = Buffer.from(this.chain, "utf8");
54
+ // Convert storeId from hex string to Buffer
55
+ const storeIdBuffer = Buffer.from(this.storeId, "hex");
56
+ // Validate storeId byte length
57
+ if (storeIdBuffer.length !== SubDomain.DEFAULT_STORE_ID_LENGTH) {
58
+ throw new Error(`Invalid storeId length: Expected ${SubDomain.DEFAULT_STORE_ID_LENGTH} bytes, got ${storeIdBuffer.length} bytes.`);
59
+ }
60
+ // Concatenate chain_length, chain, and storeId buffers
61
+ const dataBuffer = Buffer.concat([
62
+ chainLengthBuffer,
63
+ chainBuffer,
64
+ storeIdBuffer,
65
+ ]);
66
+ // Create HMAC using SHA256
67
+ const hmac = crypto_1.default.createHmac("sha256", SubDomain.COMPRESSION_KEY);
68
+ hmac.update(dataBuffer);
69
+ const hmacDigest = hmac.digest(); // 32 bytes
70
+ // Concatenate dataBuffer and hmacDigest
71
+ const finalBuffer = Buffer.concat([dataBuffer, hmacDigest]);
72
+ // Encode the final buffer using Base62
73
+ const encodedId = SubDomain.base62.encode(finalBuffer);
74
+ // Ensure DNS label length does not exceed 63 characters
75
+ if (encodedId.length > 63) {
76
+ throw new Error(`Encoded identifier length (${encodedId.length}) exceeds DNS label limit of 63 characters.`);
77
+ }
78
+ return encodedId;
79
+ }
80
+ /**
81
+ * Decodes the provided identifier back into the original chain and storeId after verifying HMAC.
82
+ *
83
+ * @param encodedId - The Base62-encoded identifier with appended HMAC.
84
+ * @returns An object containing the original chain and storeId.
85
+ * @throws Will throw an error if decoding fails, HMAC verification fails, or data lengths mismatch.
86
+ */
87
+ static decode(encodedId) {
88
+ // Validate input
89
+ if (!encodedId || typeof encodedId !== "string") {
90
+ throw new Error("Invalid encodedId: encodedId must be a non-empty string.");
91
+ }
92
+ // Decode the Base62 string back to a Buffer
93
+ const decodedBuffer = SubDomain.base62.decode(encodedId);
94
+ if (!decodedBuffer) {
95
+ throw new Error("Failed to decode Base62 string.");
96
+ }
97
+ // Ensure there's at least 1 byte for chain_length and 64 bytes for storeId and HMAC
98
+ if (decodedBuffer.length <
99
+ 1 + SubDomain.DEFAULT_STORE_ID_LENGTH + SubDomain.HMAC_LENGTH) {
100
+ throw new Error("Decoded data is too short to contain required fields.");
101
+ }
102
+ // Extract chain_length (1 byte)
103
+ const chain_length = Buffer.from(decodedBuffer).readUInt8(0);
104
+ // Define the expected total length
105
+ const expected_length = 1 +
106
+ chain_length +
107
+ SubDomain.DEFAULT_STORE_ID_LENGTH +
108
+ SubDomain.HMAC_LENGTH;
109
+ if (decodedBuffer.length !== expected_length) {
110
+ throw new Error(`Decoded data length mismatch: expected ${expected_length} bytes, got ${decodedBuffer.length} bytes.`);
111
+ }
112
+ // Extract chain, storeId, and received HMAC from the buffer
113
+ const chain = Buffer.from(decodedBuffer.slice(1, 1 + chain_length)).toString("utf8");
114
+ const storeIdBuffer = decodedBuffer.slice(1 + chain_length, 1 + chain_length + SubDomain.DEFAULT_STORE_ID_LENGTH);
115
+ const receivedHmac = decodedBuffer.slice(1 + chain_length + SubDomain.DEFAULT_STORE_ID_LENGTH, expected_length);
116
+ // Recompute HMAC over [chain_length][chain][storeId]
117
+ const dataBuffer = decodedBuffer.slice(0, 1 + chain_length + SubDomain.DEFAULT_STORE_ID_LENGTH);
118
+ const hmac = crypto_1.default.createHmac("sha256", SubDomain.COMPRESSION_KEY);
119
+ hmac.update(dataBuffer);
120
+ const expectedHmac = hmac.digest(); // 32 bytes
121
+ // Compare HMACs securely
122
+ if (!crypto_1.default.timingSafeEqual(receivedHmac, expectedHmac)) {
123
+ throw new Error("HMAC verification failed: Invalid identifier.");
124
+ }
125
+ // Convert storeId buffer to hex string
126
+ const storeId = Buffer.from(storeIdBuffer).toString("hex");
127
+ return { chain, storeId };
128
+ }
129
+ }
130
+ exports.SubDomain = SubDomain;
131
+ // Define the Base62 character set
132
+ SubDomain.BASE62_CHARSET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
133
+ // Initialize the Base62 encoder/decoder
134
+ SubDomain.base62 = (0, base_x_1.default)(SubDomain.BASE62_CHARSET);
135
+ // Define expected byte length for storeId
136
+ SubDomain.DEFAULT_STORE_ID_LENGTH = 32; // bytes
137
+ SubDomain.HMAC_LENGTH = 32; // bytes for HMAC-SHA256
138
+ // Hardcoded compression key
139
+ SubDomain.COMPRESSION_KEY = "7a4e8d2f6b1c9a3f5d8e2c4b7a1f9d3e6b8c5a2f4d7e9b1c8a3f5d2e6b9c4a7";
@@ -15,4 +15,5 @@ export * from './promiseUtils';
15
15
  export * from './PeerRanker';
16
16
  export * from './DigCache';
17
17
  export * from './Udi';
18
+ export * from './Subdomain';
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC"}
@@ -31,3 +31,4 @@ __exportStar(require("./promiseUtils"), exports);
31
31
  __exportStar(require("./PeerRanker"), exports);
32
32
  __exportStar(require("./DigCache"), exports);
33
33
  __exportStar(require("./Udi"), exports);
34
+ __exportStar(require("./Subdomain"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dignetwork/dig-sdk",
3
- "version": "0.0.1-alpha.194",
3
+ "version": "0.0.1-alpha.196",
4
4
  "description": "",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",
@@ -30,6 +30,7 @@
30
30
  "archiver": "^7.0.1",
31
31
  "async-mutex": "^0.5.0",
32
32
  "axios": "^1.7.7",
33
+ "base-x": "^5.0.0",
33
34
  "bip39": "^3.1.0",
34
35
  "bottleneck": "^2.19.5",
35
36
  "chia-bls": "^1.0.2",