@ardrive/turbo-sdk 1.0.0-beta.1 → 1.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 +58 -15
- package/bundles/web.bundle.min.js +171 -37
- package/lib/cjs/common/currency.js +42 -0
- package/lib/cjs/common/index.js +1 -0
- package/lib/cjs/common/payment.js +43 -9
- package/lib/cjs/common/turbo.js +45 -12
- package/lib/cjs/common/upload.js +13 -5
- package/lib/cjs/node/signer.js +33 -2
- package/lib/cjs/utils/readableStream.js +6 -4
- package/lib/cjs/web/signer.js +9 -4
- package/lib/esm/common/currency.js +27 -0
- package/lib/esm/common/index.js +1 -0
- package/lib/esm/common/payment.js +42 -8
- package/lib/esm/common/turbo.js +46 -13
- package/lib/esm/common/upload.js +12 -4
- package/lib/esm/node/signer.js +33 -2
- package/lib/esm/utils/readableStream.js +6 -4
- package/lib/esm/web/signer.js +9 -4
- package/lib/types/common/currency.d.ts +43 -0
- package/lib/types/common/currency.d.ts.map +1 -0
- package/lib/types/common/factory.d.ts +2 -2
- package/lib/types/common/factory.d.ts.map +1 -1
- package/lib/types/common/index.d.ts +1 -0
- package/lib/types/common/index.d.ts.map +1 -1
- package/lib/types/common/payment.d.ts +17 -7
- package/lib/types/common/payment.d.ts.map +1 -1
- package/lib/types/common/turbo.d.ts +32 -9
- package/lib/types/common/turbo.d.ts.map +1 -1
- package/lib/types/common/upload.d.ts +6 -4
- package/lib/types/common/upload.d.ts.map +1 -1
- package/lib/types/node/factory.d.ts +2 -2
- package/lib/types/node/factory.d.ts.map +1 -1
- package/lib/types/node/signer.d.ts +8 -3
- package/lib/types/node/signer.d.ts.map +1 -1
- package/lib/types/types.d.ts +52 -18
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/utils/readableStream.d.ts +2 -1
- package/lib/types/utils/readableStream.d.ts.map +1 -1
- package/lib/types/web/factory.d.ts +2 -2
- package/lib/types/web/factory.d.ts.map +1 -1
- package/lib/types/web/signer.d.ts +7 -3
- package/lib/types/web/signer.d.ts.map +1 -1
- package/package.json +1 -1
@@ -19,16 +19,20 @@
|
|
19
19
|
import { ArweaveSigner } from 'arbundles';
|
20
20
|
import { ReadableStream } from 'node:stream/web';
|
21
21
|
import { JWKInterface } from '../common/jwk.js';
|
22
|
-
import { TurboWalletSigner } from '../types.js';
|
22
|
+
import { StreamSizeFactory, TurboWalletSigner } from '../types.js';
|
23
23
|
export declare class TurboWebArweaveSigner implements TurboWalletSigner {
|
24
24
|
protected privateKey: JWKInterface;
|
25
25
|
protected signer: ArweaveSigner;
|
26
26
|
constructor({ privateKey }: {
|
27
27
|
privateKey: JWKInterface;
|
28
28
|
});
|
29
|
-
signDataItem({ fileStreamFactory, }: {
|
29
|
+
signDataItem({ fileStreamFactory, fileSizeFactory, }: {
|
30
30
|
fileStreamFactory: () => ReadableStream;
|
31
|
-
|
31
|
+
fileSizeFactory: StreamSizeFactory;
|
32
|
+
}): Promise<{
|
33
|
+
dataItemStreamFactory: () => Buffer;
|
34
|
+
dataItemSizeFactory: StreamSizeFactory;
|
35
|
+
}>;
|
32
36
|
generateSignedRequestHeaders(): Promise<{
|
33
37
|
'x-public-key': string;
|
34
38
|
'x-nonce': string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,aAAa,EAAc,MAAM,WAAW,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/web/signer.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,aAAa,EAAc,MAAM,WAAW,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAInE,qBAAa,qBAAsB,YAAW,iBAAiB;IAC7D,SAAS,CAAC,UAAU,EAAE,YAAY,CAAC;IACnC,SAAS,CAAC,MAAM,EAAE,aAAa,CAAC;gBAEpB,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,YAAY,CAAA;KAAE;IAKlD,YAAY,CAAC,EACjB,iBAAiB,EACjB,eAAe,GAChB,EAAE;QACD,iBAAiB,EAAE,MAAM,cAAc,CAAC;QACxC,eAAe,EAAE,iBAAiB,CAAC;KACpC,GAAG,OAAO,CAAC;QAEV,qBAAqB,EAAE,MAAM,MAAM,CAAC;QACpC,mBAAmB,EAAE,iBAAiB,CAAC;KACxC,CAAC;IAiBI,4BAA4B;;;;;CAanC"}
|