@ardrive/turbo-sdk 1.21.0 → 1.22.0-alpha.1

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.
@@ -310551,7 +310551,7 @@ var import_winston = __toESM(require_winston(), 1);
310551
310551
  init_dirname();
310552
310552
  init_buffer2();
310553
310553
  init_process2();
310554
- var version16 = "1.20.2";
310554
+ var version16 = "1.21.1-alpha.1";
310555
310555
 
310556
310556
  // src/common/logger.ts
310557
310557
  var TurboWinstonLogger = class _TurboWinstonLogger {
@@ -350455,9 +350455,29 @@ var TurboWebArweaveSigner = class extends TurboDataItemAbstractSigner {
350455
350455
  stream: fileStream,
350456
350456
  size: fileSizeFactory()
350457
350457
  });
350458
+ let signedDataItem;
350458
350459
  this.logger.debug("Signing data item...");
350459
- const signedDataItem = createData(buffer2, this.signer, dataItemOpts);
350460
- await signedDataItem.sign(this.signer);
350460
+ if (this.signer instanceof InjectedArweaveSigner) {
350461
+ this.logger.debug(
350462
+ "Arconnect signer detected, signing with Arconnect signData Item API..."
350463
+ );
350464
+ const sign6 = Buffer.from(
350465
+ await this.signer["signer"].signDataItem({
350466
+ data: Uint8Array.from(buffer2),
350467
+ tags: dataItemOpts?.tags,
350468
+ target: dataItemOpts?.target,
350469
+ anchor: dataItemOpts?.anchor
350470
+ })
350471
+ );
350472
+ signedDataItem = new DataItem(sign6);
350473
+ } else {
350474
+ signedDataItem = createData(
350475
+ Uint8Array.from(buffer2),
350476
+ this.signer,
350477
+ dataItemOpts
350478
+ );
350479
+ await signedDataItem.sign(this.signer);
350480
+ }
350461
350481
  this.logger.debug("Successfully signed data item...");
350462
350482
  return {
350463
350483
  // while this returns a Buffer - it needs to match our return type for uploading
@@ -26,11 +26,12 @@ async function uploadFile(options) {
26
26
  }
27
27
  const turbo = await (0, utils_js_1.turboFromOptions)(options);
28
28
  const paidBy = await (0, utils_js_1.paidByFromOptions)(options, turbo);
29
+ const customTags = (0, utils_js_1.getTagsFromOptions)(options);
29
30
  const fileSize = (0, fs_1.statSync)(filePath).size;
30
31
  const result = await turbo.uploadFile({
31
32
  fileStreamFactory: () => (0, fs_1.createReadStream)(filePath),
32
33
  fileSizeFactory: () => fileSize,
33
- dataItemOpts: { tags: [...constants_js_1.turboCliTags], paidBy }, // TODO: Inject user tags
34
+ dataItemOpts: { tags: [...constants_js_1.turboCliTags, ...customTags], paidBy },
34
35
  });
35
36
  console.log('Uploaded file:', JSON.stringify(result, null, 2));
36
37
  }
@@ -22,9 +22,10 @@ async function uploadFolder(options) {
22
22
  const turbo = await (0, utils_js_1.turboFromOptions)(options);
23
23
  const paidBy = await (0, utils_js_1.paidByFromOptions)(options, turbo);
24
24
  const { disableManifest, fallbackFile, folderPath, indexFile, maxConcurrentUploads, } = (0, utils_js_1.getUploadFolderOptions)(options);
25
+ const customTags = (0, utils_js_1.getTagsFromOptions)(options);
25
26
  const result = await turbo.uploadFolder({
26
27
  folderPath: folderPath,
27
- dataItemOpts: { tags: [...constants_js_1.turboCliTags], paidBy }, // TODO: Inject user tags
28
+ dataItemOpts: { tags: [...constants_js_1.turboCliTags, ...customTags], paidBy },
28
29
  manifestOptions: {
29
30
  disableManifest,
30
31
  indexFile,
@@ -40,6 +40,11 @@ exports.optionMap = {
40
40
  alias: '-a, --address <nativeAddress>',
41
41
  description: 'Native address to use for action',
42
42
  },
43
+ tags: {
44
+ description: 'An array of additional tags for the write action, in "--tags name1 value1 name2 value2" format',
45
+ alias: '--tags <tags...>',
46
+ type: 'array',
47
+ },
43
48
  value: {
44
49
  alias: '-v, --value <value>',
45
50
  description: 'Value of fiat currency or crypto token for action. e.g: 10.50 for $10.50 USD or 0.0001 for 0.0001 AR',
@@ -168,6 +173,7 @@ exports.uploadOptions = [
168
173
  exports.optionMap.paidBy,
169
174
  exports.optionMap.ignoreApprovals,
170
175
  exports.optionMap.useSignerBalanceFirst,
176
+ exports.optionMap.tags,
171
177
  ];
172
178
  exports.uploadFolderOptions = [
173
179
  ...exports.uploadOptions,
@@ -16,6 +16,8 @@ exports.configFromOptions = configFromOptions;
16
16
  exports.turboFromOptions = turboFromOptions;
17
17
  exports.paidByFromOptions = paidByFromOptions;
18
18
  exports.getUploadFolderOptions = getUploadFolderOptions;
19
+ exports.parseTags = parseTags;
20
+ exports.getTagsFromOptions = getTagsFromOptions;
19
21
  /**
20
22
  * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
21
23
  *
@@ -217,3 +219,31 @@ function getUploadFolderOptions(options) {
217
219
  maxConcurrentUploads: +(options.maxConcurrency ?? 1),
218
220
  };
219
221
  }
222
+ /**
223
+ * Parse tags array from CLI input into Tag array
224
+ * Accepts format: ["name1", "value1", "name2", "value2"]
225
+ * @param tagsArr Array of alternating tag names and values
226
+ * @returns Array of {name: string, value: string} objects
227
+ */
228
+ function parseTags(tagsArr) {
229
+ if (!tagsArr || tagsArr.length === 0) {
230
+ return [];
231
+ }
232
+ if (tagsArr.length % 2 !== 0) {
233
+ throw new Error('Invalid tags format. Tags must be provided in pairs of name and value.');
234
+ }
235
+ const tags = [];
236
+ const arr = [...tagsArr];
237
+ while (arr.length) {
238
+ const name = arr.shift();
239
+ const value = arr.shift();
240
+ if (name === undefined || value === undefined) {
241
+ throw new Error('Invalid tag format. Each tag must have both a name and value.');
242
+ }
243
+ tags.push({ name, value });
244
+ }
245
+ return tags;
246
+ }
247
+ function getTagsFromOptions(options) {
248
+ return parseTags(options.tags);
249
+ }
@@ -17,4 +17,4 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.version = void 0;
19
19
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
20
- exports.version = '1.21.0';
20
+ exports.version = '1.22.0-alpha.1';
@@ -53,9 +53,22 @@ class TurboWebArweaveSigner extends signer_js_1.TurboDataItemAbstractSigner {
53
53
  stream: fileStream,
54
54
  size: fileSizeFactory(),
55
55
  });
56
+ let signedDataItem;
56
57
  this.logger.debug('Signing data item...');
57
- const signedDataItem = (0, arbundles_1.createData)(buffer, this.signer, dataItemOpts);
58
- await signedDataItem.sign(this.signer);
58
+ if (this.signer instanceof arbundles_1.ArconnectSigner) {
59
+ this.logger.debug('Arconnect signer detected, signing with Arconnect signData Item API...');
60
+ const sign = node_buffer_1.Buffer.from(await this.signer['signer'].signDataItem({
61
+ data: Uint8Array.from(buffer),
62
+ tags: dataItemOpts?.tags,
63
+ target: dataItemOpts?.target,
64
+ anchor: dataItemOpts?.anchor,
65
+ }));
66
+ signedDataItem = new arbundles_1.DataItem(sign);
67
+ }
68
+ else {
69
+ signedDataItem = (0, arbundles_1.createData)(Uint8Array.from(buffer), this.signer, dataItemOpts);
70
+ await signedDataItem.sign(this.signer);
71
+ }
59
72
  this.logger.debug('Successfully signed data item...');
60
73
  return {
61
74
  // while this returns a Buffer - it needs to match our return type for uploading
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { createReadStream, statSync } from 'fs';
17
17
  import { turboCliTags } from '../constants.js';
18
- import { paidByFromOptions, turboFromOptions } from '../utils.js';
18
+ import { getTagsFromOptions, paidByFromOptions, turboFromOptions, } from '../utils.js';
19
19
  export async function uploadFile(options) {
20
20
  const { filePath } = options;
21
21
  if (filePath === undefined) {
@@ -23,11 +23,12 @@ export async function uploadFile(options) {
23
23
  }
24
24
  const turbo = await turboFromOptions(options);
25
25
  const paidBy = await paidByFromOptions(options, turbo);
26
+ const customTags = getTagsFromOptions(options);
26
27
  const fileSize = statSync(filePath).size;
27
28
  const result = await turbo.uploadFile({
28
29
  fileStreamFactory: () => createReadStream(filePath),
29
30
  fileSizeFactory: () => fileSize,
30
- dataItemOpts: { tags: [...turboCliTags], paidBy }, // TODO: Inject user tags
31
+ dataItemOpts: { tags: [...turboCliTags, ...customTags], paidBy },
31
32
  });
32
33
  console.log('Uploaded file:', JSON.stringify(result, null, 2));
33
34
  }
@@ -14,14 +14,15 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { turboCliTags } from '../constants.js';
17
- import { getUploadFolderOptions, paidByFromOptions, turboFromOptions, } from '../utils.js';
17
+ import { getTagsFromOptions, getUploadFolderOptions, paidByFromOptions, turboFromOptions, } from '../utils.js';
18
18
  export async function uploadFolder(options) {
19
19
  const turbo = await turboFromOptions(options);
20
20
  const paidBy = await paidByFromOptions(options, turbo);
21
21
  const { disableManifest, fallbackFile, folderPath, indexFile, maxConcurrentUploads, } = getUploadFolderOptions(options);
22
+ const customTags = getTagsFromOptions(options);
22
23
  const result = await turbo.uploadFolder({
23
24
  folderPath: folderPath,
24
- dataItemOpts: { tags: [...turboCliTags], paidBy }, // TODO: Inject user tags
25
+ dataItemOpts: { tags: [...turboCliTags, ...customTags], paidBy },
25
26
  manifestOptions: {
26
27
  disableManifest,
27
28
  indexFile,
@@ -37,6 +37,11 @@ export const optionMap = {
37
37
  alias: '-a, --address <nativeAddress>',
38
38
  description: 'Native address to use for action',
39
39
  },
40
+ tags: {
41
+ description: 'An array of additional tags for the write action, in "--tags name1 value1 name2 value2" format',
42
+ alias: '--tags <tags...>',
43
+ type: 'array',
44
+ },
40
45
  value: {
41
46
  alias: '-v, --value <value>',
42
47
  description: 'Value of fiat currency or crypto token for action. e.g: 10.50 for $10.50 USD or 0.0001 for 0.0001 AR',
@@ -165,6 +170,7 @@ export const uploadOptions = [
165
170
  optionMap.paidBy,
166
171
  optionMap.ignoreApprovals,
167
172
  optionMap.useSignerBalanceFirst,
173
+ optionMap.tags,
168
174
  ];
169
175
  export const uploadFolderOptions = [
170
176
  ...uploadOptions,
@@ -199,3 +199,31 @@ export function getUploadFolderOptions(options) {
199
199
  maxConcurrentUploads: +(options.maxConcurrency ?? 1),
200
200
  };
201
201
  }
202
+ /**
203
+ * Parse tags array from CLI input into Tag array
204
+ * Accepts format: ["name1", "value1", "name2", "value2"]
205
+ * @param tagsArr Array of alternating tag names and values
206
+ * @returns Array of {name: string, value: string} objects
207
+ */
208
+ export function parseTags(tagsArr) {
209
+ if (!tagsArr || tagsArr.length === 0) {
210
+ return [];
211
+ }
212
+ if (tagsArr.length % 2 !== 0) {
213
+ throw new Error('Invalid tags format. Tags must be provided in pairs of name and value.');
214
+ }
215
+ const tags = [];
216
+ const arr = [...tagsArr];
217
+ while (arr.length) {
218
+ const name = arr.shift();
219
+ const value = arr.shift();
220
+ if (name === undefined || value === undefined) {
221
+ throw new Error('Invalid tag format. Each tag must have both a name and value.');
222
+ }
223
+ tags.push({ name, value });
224
+ }
225
+ return tags;
226
+ }
227
+ export function getTagsFromOptions(options) {
228
+ return parseTags(options.tags);
229
+ }
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '1.21.0';
17
+ export const version = '1.22.0-alpha.1';
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ArconnectSigner, ArweaveSigner, EthereumSigner, HexSolanaSigner, InjectedEthereumSigner, createData, } from '@dha-team/arbundles';
16
+ import { ArconnectSigner, ArweaveSigner, DataItem, EthereumSigner, HexSolanaSigner, InjectedEthereumSigner, createData, } from '@dha-team/arbundles';
17
17
  import { Buffer } from 'node:buffer';
18
18
  import { TurboDataItemAbstractSigner } from '../common/signer.js';
19
19
  import { readableStreamToBuffer } from '../utils/readableStream.js';
@@ -50,9 +50,22 @@ export class TurboWebArweaveSigner extends TurboDataItemAbstractSigner {
50
50
  stream: fileStream,
51
51
  size: fileSizeFactory(),
52
52
  });
53
+ let signedDataItem;
53
54
  this.logger.debug('Signing data item...');
54
- const signedDataItem = createData(buffer, this.signer, dataItemOpts);
55
- await signedDataItem.sign(this.signer);
55
+ if (this.signer instanceof ArconnectSigner) {
56
+ this.logger.debug('Arconnect signer detected, signing with Arconnect signData Item API...');
57
+ const sign = Buffer.from(await this.signer['signer'].signDataItem({
58
+ data: Uint8Array.from(buffer),
59
+ tags: dataItemOpts?.tags,
60
+ target: dataItemOpts?.target,
61
+ anchor: dataItemOpts?.anchor,
62
+ }));
63
+ signedDataItem = new DataItem(sign);
64
+ }
65
+ else {
66
+ signedDataItem = createData(Uint8Array.from(buffer), this.signer, dataItemOpts);
67
+ await signedDataItem.sign(this.signer);
68
+ }
56
69
  this.logger.debug('Successfully signed data item...');
57
70
  return {
58
71
  // while this returns a Buffer - it needs to match our return type for uploading
@@ -1 +1 @@
1
- {"version":3,"file":"uploadFile.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFile.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB1E"}
1
+ {"version":3,"file":"uploadFile.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFile.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOhD,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB1E"}
@@ -1 +1 @@
1
- {"version":3,"file":"uploadFolder.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFolder.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAOlD,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAwBf"}
1
+ {"version":3,"file":"uploadFolder.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFolder.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAQlD,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
@@ -37,6 +37,11 @@ export declare const optionMap: {
37
37
  readonly alias: "-a, --address <nativeAddress>";
38
38
  readonly description: "Native address to use for action";
39
39
  };
40
+ readonly tags: {
41
+ readonly description: "An array of additional tags for the write action, in \"--tags name1 value1 name2 value2\" format";
42
+ readonly alias: "--tags <tags...>";
43
+ readonly type: "array";
44
+ };
40
45
  readonly value: {
41
46
  readonly alias: "-v, --value <value>";
42
47
  readonly description: "Value of fiat currency or crypto token for action. e.g: 10.50 for $10.50 USD or 0.0001 for 0.0001 AR";
@@ -190,6 +195,10 @@ export declare const globalOptions: ({
190
195
  readonly default: false;
191
196
  })[];
192
197
  export declare const uploadOptions: ({
198
+ readonly description: "An array of additional tags for the write action, in \"--tags name1 value1 name2 value2\" format";
199
+ readonly alias: "--tags <tags...>";
200
+ readonly type: "array";
201
+ } | {
193
202
  readonly alias: "-w, --wallet-file <filePath>";
194
203
  readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
195
204
  } | {
@@ -212,6 +221,10 @@ export declare const uploadOptions: ({
212
221
  readonly default: false;
213
222
  })[];
214
223
  export declare const uploadFolderOptions: ({
224
+ readonly description: "An array of additional tags for the write action, in \"--tags name1 value1 name2 value2\" format";
225
+ readonly alias: "--tags <tags...>";
226
+ readonly type: "array";
227
+ } | {
215
228
  readonly alias: "-w, --wallet-file <filePath>";
216
229
  readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
217
230
  } | {
@@ -250,6 +263,10 @@ export declare const uploadFolderOptions: ({
250
263
  readonly default: false;
251
264
  })[];
252
265
  export declare const uploadFileOptions: ({
266
+ readonly description: "An array of additional tags for the write action, in \"--tags name1 value1 name2 value2\" format";
267
+ readonly alias: "--tags <tags...>";
268
+ readonly type: "array";
269
+ } | {
253
270
  readonly alias: "-w, --wallet-file <filePath>";
254
271
  readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
255
272
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli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AAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAyC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;IAK/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;IAAwC,CAAC;AAE1E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;IAAuB,CAAC"}
@@ -40,6 +40,7 @@ export type UploadOptions = WalletOptions & {
40
40
  paidBy: string[];
41
41
  ignoreApprovals: boolean;
42
42
  useSignerBalanceFirst: boolean;
43
+ tags: string[] | undefined;
43
44
  };
44
45
  export type UploadFolderOptions = UploadOptions & {
45
46
  folderPath: string | undefined;
@@ -50,6 +51,7 @@ export type UploadFolderOptions = UploadOptions & {
50
51
  };
51
52
  export type UploadFileOptions = UploadOptions & {
52
53
  filePath: string | undefined;
54
+ tags: string[] | undefined;
53
55
  };
54
56
  export type TokenPriceOptions = GlobalOptions & {
55
57
  byteCount: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG;IAC1C,UAAU,EAAE,MAA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oB,GAAG,aAAa,GAAG;IACjD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC"}
@@ -28,5 +28,19 @@ export declare function getUploadFolderOptions(options: UploadFolderOptions): {
28
28
  disableManifest: boolean;
29
29
  maxConcurrentUploads: number;
30
30
  };
31
+ /**
32
+ * Parse tags array from CLI input into Tag array
33
+ * Accepts format: ["name1", "value1", "name2", "value2"]
34
+ * @param tagsArr Array of alternating tag names and values
35
+ * @returns Array of {name: string, value: string} objects
36
+ */
37
+ export declare function parseTags(tagsArr?: string[]): {
38
+ name: string;
39
+ value: string;
40
+ }[];
41
+ export declare function getTagsFromOptions(options: UploadOptions): {
42
+ name: string;
43
+ value: string;
44
+ }[];
31
45
  export {};
32
46
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGlD,OAAO,EACL,SAAS,EACT,wBAAwB,EAExB,iCAAiC,EAKlC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,QAG9C;AAED,wBAAsB,UAAU,CAAC,CAAC,SAAS,YAAY,EACrD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,iBAUtC;AAED,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,O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AAgB,iBAAiB,CAC/B,OAAO,EAAE,aAAa,GACrB,iCAAiC,CA8CnC;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,wBAAwB,CAAC,CAOnC;AAED,wBAAsB,iBAAiB,CACrC,EACE,MAAM,EAAE,cAAc,EACtB,eAAe,EACf,qBAAqB,GACtB,EAAE,aAAa,EAChB,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAwB/B;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,GAAG;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,eAAe,EAAE,OAAO,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAYA;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CA0BnC;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAEnC"}
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "1.20.2";
16
+ export declare const version = "1.21.1-alpha.1";
17
17
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EAGhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAE3E;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,2BAA2B;gBACxD,CAAC,EAAE,yBAAyB;YAI1B,YAAY;IAWb,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAK/B,YAAY,CAAC,EACxB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAE/B,qBAAqB,EAAE,MAAM,MAAM,CAAC;QACpC,mBAAmB,EAAE,iBAAiB,CAAC;KACxC,CAAC;IAyBW,4BAA4B,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAKlE,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CAInE"}
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,eAAe,EACf,aAAa,EAEb,cAAc,EACd,eAAe,EAGhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;AAE3E;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,2BAA2B;gBACxD,CAAC,EAAE,yBAAyB;YAI1B,YAAY;IAWb,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAK/B,YAAY,CAAC,EACxB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAE/B,qBAAqB,EAAE,MAAM,MAAM,CAAC;QACpC,mBAAmB,EAAE,iBAAiB,CAAC;KACxC,CAAC;IA6CW,4BAA4B,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAKlE,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CAInE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.21.0",
3
+ "version": "1.22.0-alpha.1",
4
4
  "main": "./lib/cjs/node/index.js",
5
5
  "types": "./lib/types/node/index.d.ts",
6
6
  "module": "./lib/esm/node/index.js",