@ardrive/turbo-sdk 1.5.0-alpha.3 → 1.5.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.
@@ -130843,7 +130843,7 @@ var import_winston = __toESM(require_winston(), 1);
130843
130843
  init_dirname();
130844
130844
  init_buffer2();
130845
130845
  init_process2();
130846
- var version21 = "1.5.0-alpha.2";
130846
+ var version21 = "1.5.0-alpha.4";
130847
130847
 
130848
130848
  // src/common/logger.ts
130849
130849
  var TurboWinstonLogger = class {
@@ -139816,6 +139816,8 @@ var tokenTypes = [
139816
139816
  export {
139817
139817
  ARToTokenAmount,
139818
139818
  AUD,
139819
+ InjectedArweaveSigner as ArconnectSigner,
139820
+ ArweaveSigner,
139819
139821
  ArweaveToken,
139820
139822
  BRL,
139821
139823
  CAD,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TurboDataItemAbstractSigner = exports.ArweaveSigner = exports.ArconnectSigner = void 0;
3
+ exports.TurboDataItemAbstractSigner = void 0;
4
4
  /**
5
5
  * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
@@ -17,9 +17,6 @@ exports.TurboDataItemAbstractSigner = exports.ArweaveSigner = exports.ArconnectS
17
17
  * You should have received a copy of the GNU Affero General Public License
18
18
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
- const arbundles_1 = require("arbundles");
21
- Object.defineProperty(exports, "ArconnectSigner", { enumerable: true, get: function () { return arbundles_1.ArconnectSigner; } });
22
- Object.defineProperty(exports, "ArweaveSigner", { enumerable: true, get: function () { return arbundles_1.ArweaveSigner; } });
23
20
  const crypto_1 = require("crypto");
24
21
  const base64_js_1 = require("../utils/base64.js");
25
22
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TurboNodeArweaveSigner = void 0;
3
+ exports.TurboNodeArweaveSigner = exports.ArweaveSigner = exports.ArconnectSigner = void 0;
4
4
  /**
5
5
  * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
@@ -18,8 +18,13 @@ exports.TurboNodeArweaveSigner = void 0;
18
18
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
  const arbundles_1 = require("arbundles");
21
+ Object.defineProperty(exports, "ArconnectSigner", { enumerable: true, get: function () { return arbundles_1.ArconnectSigner; } });
22
+ Object.defineProperty(exports, "ArweaveSigner", { enumerable: true, get: function () { return arbundles_1.ArweaveSigner; } });
21
23
  const signer_js_1 = require("../common/signer.js");
22
24
  const base64_js_1 = require("../utils/base64.js");
25
+ /**
26
+ * Node implementation of TurboDataItemSigner.
27
+ */
23
28
  class TurboNodeArweaveSigner extends signer_js_1.TurboDataItemAbstractSigner {
24
29
  constructor(p) {
25
30
  super(p);
@@ -18,4 +18,4 @@
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.version = void 0;
20
20
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
21
- exports.version = '1.5.0-alpha.3';
21
+ exports.version = '1.5.0';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TurboWebArweaveSigner = void 0;
3
+ exports.TurboWebArweaveSigner = exports.ArweaveSigner = exports.ArconnectSigner = void 0;
4
4
  /**
5
5
  * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
@@ -18,8 +18,13 @@ exports.TurboWebArweaveSigner = void 0;
18
18
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
  */
20
20
  const arbundles_1 = require("arbundles");
21
+ Object.defineProperty(exports, "ArconnectSigner", { enumerable: true, get: function () { return arbundles_1.ArconnectSigner; } });
22
+ Object.defineProperty(exports, "ArweaveSigner", { enumerable: true, get: function () { return arbundles_1.ArweaveSigner; } });
21
23
  const signer_js_1 = require("../common/signer.js");
22
24
  const readableStream_js_1 = require("../utils/readableStream.js");
25
+ /**
26
+ * Web implementation of TurboDataItemSigner.
27
+ */
23
28
  class TurboWebArweaveSigner extends signer_js_1.TurboDataItemAbstractSigner {
24
29
  constructor(p) {
25
30
  super(p);
@@ -14,13 +14,8 @@
14
14
  * You should have received a copy of the GNU Affero General Public License
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
- import { ArconnectSigner, ArweaveSigner } from 'arbundles';
18
17
  import { randomBytes } from 'crypto';
19
18
  import { toB64Url } from '../utils/base64.js';
20
- /**
21
- * Utility exports to avoid clients having to install arbundles
22
- */
23
- export { ArconnectSigner, ArweaveSigner };
24
19
  /**
25
20
  * Abstract class for signing TurboDataItems.
26
21
  */
@@ -14,9 +14,16 @@
14
14
  * You should have received a copy of the GNU Affero General Public License
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
- import { serializeTags, streamSigner } from 'arbundles';
17
+ import { ArconnectSigner, ArweaveSigner, serializeTags, streamSigner, } from 'arbundles';
18
18
  import { TurboDataItemAbstractSigner } from '../common/signer.js';
19
19
  import { fromB64Url } from '../utils/base64.js';
20
+ /**
21
+ * Utility exports to avoid clients having to install arbundles
22
+ */
23
+ export { ArconnectSigner, ArweaveSigner };
24
+ /**
25
+ * Node implementation of TurboDataItemSigner.
26
+ */
20
27
  export class TurboNodeArweaveSigner extends TurboDataItemAbstractSigner {
21
28
  constructor(p) {
22
29
  super(p);
@@ -15,4 +15,4 @@
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
18
- export const version = '1.5.0-alpha.3';
18
+ export const version = '1.5.0';
@@ -14,9 +14,16 @@
14
14
  * You should have received a copy of the GNU Affero General Public License
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
- import { ArconnectSigner, createData } from 'arbundles';
17
+ import { ArconnectSigner, ArweaveSigner, createData } from 'arbundles';
18
18
  import { TurboDataItemAbstractSigner } from '../common/signer.js';
19
19
  import { readableStreamToBuffer } from '../utils/readableStream.js';
20
+ /**
21
+ * Utility exports to avoid clients having to install arbundles
22
+ */
23
+ export { ArconnectSigner, ArweaveSigner };
24
+ /**
25
+ * Web implementation of TurboDataItemSigner.
26
+ */
20
27
  export class TurboWebArweaveSigner extends TurboDataItemAbstractSigner {
21
28
  constructor(p) {
22
29
  super(p);
@@ -1,26 +1,5 @@
1
1
  /// <reference types="node" />
2
- /**
3
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU Affero General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU Affero General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Affero General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
- */
18
- import { ArconnectSigner, ArweaveSigner } from 'arbundles';
19
2
  import { FileStreamFactory, TurboDataItemSigner, TurboDataItemSignerParams, TurboFileFactory, TurboLogger, TurboSignedDataItemFactory, TurboSigner } from '../types.js';
20
- /**
21
- * Utility exports to avoid clients having to install arbundles
22
- */
23
- export { ArconnectSigner, ArweaveSigner };
24
3
  /**
25
4
  * Abstract class for signing TurboDataItems.
26
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/common/signer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,W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AAO,CAAC,UAAU,CAAC;CAGnE"}
@@ -1,7 +1,31 @@
1
1
  /// <reference types="node" />
2
+ /**
3
+ * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { ArconnectSigner, ArweaveSigner } from 'arbundles';
2
19
  import { Readable } from 'node:stream';
3
20
  import { TurboDataItemAbstractSigner } from '../common/signer.js';
4
21
  import { DataItemOptions, StreamSizeFactory, TurboDataItemSignerParams } from '../types.js';
22
+ /**
23
+ * Utility exports to avoid clients having to install arbundles
24
+ */
25
+ export { ArconnectSigner, ArweaveSigner };
26
+ /**
27
+ * Node implementation of TurboDataItemSigner.
28
+ */
5
29
  export declare class TurboNodeArweaveSigner extends TurboDataItemAbstractSigner {
6
30
  constructor(p: TurboDataItemSignerParams);
7
31
  signDataItem({ fileStreamFactory, fileSizeFactory, dataItemOpts, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/node/signer.ts"],"names":[],"mappings":";AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AAGrB,qBAAa,sBAAuB,SAAQ,2BAA2B;gBACzD,CAAC,EAAE,yBAAyB;IAIlC,YAAY,CAAC,EACjB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,EAAE;QACD,iBAAiB,EAAE,MAAM,QAAQ,CAAC;QAClC,eAAe,EAAE,iBAAiB,CAAC;QACnC,YAAY,CAAC,EAAE,eAAe,CAAC;KAChC,GAAG,OAAO,CAAC;QACV,qBAAqB,EAAE,MAAM,QAAQ,CAAC;QACtC,mBAAmB,EAAE,iBAAiB,CAAC;KACxC,CAAC;IAyBF,OAAO,CAAC,8BAA8B;CAkCvC"}
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/node/signer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,eAAe,EACf,aAAa,EAGd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAE1C;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,2BAA2B;gBACzD,CAAC,EAAE,yBAAyB;IAIlC,YAAY,CAAC,EACjB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,EAAE;QACD,iBAAiB,EAAE,MAAM,QAAQ,CAAC;QAClC,eAAe,EAAE,iBAAiB,CAAC;QACnC,YAAY,CAAC,EAAE,eAAe,CAAC;KAChC,GAAG,OAAO,CAAC;QACV,qBAAqB,EAAE,MAAM,QAAQ,CAAC;QACtC,mBAAmB,EAAE,iBAAiB,CAAC;KACxC,CAAC;IAyBF,OAAO,CAAC,8BAA8B;CAkCvC"}
@@ -14,5 +14,5 @@
14
14
  * You should have received a copy of the GNU Affero General Public License
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
- export declare const version = "1.5.0-alpha.2";
17
+ export declare const version = "1.5.0-alpha.4";
18
18
  //# sourceMappingURL=version.d.ts.map
@@ -1,6 +1,30 @@
1
1
  /// <reference types="node" />
2
+ /**
3
+ * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or
8
+ * (at your option) any later version.
9
+ *
10
+ * This program is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ * GNU Affero General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Affero General Public License
16
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
+ */
18
+ import { ArconnectSigner, ArweaveSigner } from 'arbundles';
2
19
  import { TurboDataItemAbstractSigner } from '../common/signer.js';
3
20
  import { StreamSizeFactory, TurboDataItemSignerParams, TurboSignedRequestHeaders, WebTurboFileFactory } from '../types.js';
21
+ /**
22
+ * Utility exports to avoid clients having to install arbundles
23
+ */
24
+ export { ArconnectSigner, ArweaveSigner };
25
+ /**
26
+ * Web implementation of TurboDataItemSigner.
27
+ */
4
28
  export declare class TurboWebArweaveSigner extends TurboDataItemAbstractSigner {
5
29
  constructor(p: TurboDataItemSignerParams);
6
30
  private setPublicKey;
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAGrB,qBAAa,qBAAsB,SAAQ,2BAA2B;gBACxD,CAAC,EAAE,yBAAyB;YAI1B,YAAY;IAUb,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;IAoBW,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;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAc,MAAM,WAAW,CAAC;AAEvE,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;AAE1C;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,2BAA2B;gBACxD,CAAC,EAAE,yBAAyB;YAI1B,YAAY;IAUb,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;IAoBW,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.5.0-alpha.3",
3
+ "version": "1.5.0",
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",