@ardrive/turbo-sdk 1.2.0 → 1.3.0-alpha.2
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 +13 -2
- package/bundles/web.bundle.min.js +46326 -48343
- package/lib/cjs/node/factory.js +16 -5
- package/lib/cjs/node/signer.js +5 -10
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/web/factory.js +16 -5
- package/lib/cjs/web/signer.js +17 -14
- package/lib/esm/node/factory.js +16 -5
- package/lib/esm/node/signer.js +6 -8
- package/lib/esm/version.js +1 -1
- package/lib/esm/web/factory.js +16 -5
- package/lib/esm/web/signer.js +17 -11
- package/lib/types/common/payment.d.ts +2 -2
- package/lib/types/common/payment.d.ts.map +1 -1
- package/lib/types/common/upload.d.ts +2 -2
- package/lib/types/common/upload.d.ts.map +1 -1
- package/lib/types/node/factory.d.ts +1 -17
- package/lib/types/node/factory.d.ts.map +1 -1
- package/lib/types/node/signer.d.ts +5 -22
- package/lib/types/node/signer.d.ts.map +1 -1
- package/lib/types/types.d.ts +6 -4
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/lib/types/web/factory.d.ts +1 -17
- package/lib/types/web/factory.d.ts.map +1 -1
- package/lib/types/web/signer.d.ts +5 -22
- package/lib/types/web/signer.d.ts.map +1 -1
- package/package.json +2 -1
@@ -1,30 +1,13 @@
|
|
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 { ArweaveSigner } from 'arbundles';
|
19
2
|
import { JWKInterface } from '../common/jwk.js';
|
20
|
-
import { StreamSizeFactory, TurboLogger,
|
21
|
-
export declare class TurboWebArweaveSigner implements
|
3
|
+
import { StreamSizeFactory, TurboDataItemSigner, TurboLogger, TurboSigner, WebTurboFileFactory } from '../types.js';
|
4
|
+
export declare class TurboWebArweaveSigner implements TurboDataItemSigner {
|
22
5
|
protected privateKey: JWKInterface;
|
23
|
-
protected signer:
|
6
|
+
protected signer: TurboSigner;
|
24
7
|
protected logger: TurboLogger;
|
25
|
-
constructor({
|
26
|
-
privateKey: JWKInterface;
|
8
|
+
constructor({ logger, signer, }: {
|
27
9
|
logger: TurboLogger;
|
10
|
+
signer: TurboSigner;
|
28
11
|
});
|
29
12
|
signDataItem({ fileStreamFactory, fileSizeFactory, dataItemOpts, }: WebTurboFileFactory): Promise<{
|
30
13
|
dataItemStreamFactory: () => Buffer;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":";AAmBA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAIrB,qBAAa,qBAAsB,YAAW,mBAAmB;IAC/D,SAAS,CAAC,UAAU,EAAE,YAAY,CAAC;IACnC,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;gBAClB,EACV,MAAM,EACN,MAAM,GACP,EAAE;QACD,MAAM,EAAE,WAAW,CAAC;QACpB,MAAM,EAAE,WAAW,CAAC;KACrB;IAKK,YAAY,CAAC,EACjB,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;IA2BI,4BAA4B;;;;;CAoBnC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ardrive/turbo-sdk",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.3.0-alpha.2",
|
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",
|
@@ -58,6 +58,7 @@
|
|
58
58
|
"test": "c8 mocha --config .mocharc --exit",
|
59
59
|
"test:web": "c8 mocha --config .mocharc --exclude tests/**/*.node.test.ts --exit",
|
60
60
|
"test:node": "c8 mocha --config .mocharc --exclude tests/**/*.web.test.ts --exit",
|
61
|
+
"test:docker": "docker compose up -d ; PAYMENT_SERVICE_URL=http://localhost:4000 UPLOAD_SERVICE_URL=http://localhost:3000 yarn test ; docker compose down -v",
|
61
62
|
"prepare": "husky install",
|
62
63
|
"example:mjs": "cd examples/mjs && yarn && node index.mjs",
|
63
64
|
"example:cjs": "cd examples/cjs && yarn && node index.cjs",
|