@ardrive/turbo-sdk 1.10.0-alpha.2 → 1.10.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.
Files changed (56) hide show
  1. package/bundles/web.bundle.min.js +43767 -52609
  2. package/lib/cjs/common/factory.js +2 -115
  3. package/lib/cjs/common/payment.js +2 -1
  4. package/lib/cjs/common/signer.js +4 -3
  5. package/lib/cjs/common/token/arweave.js +2 -1
  6. package/lib/cjs/common/token/solana.js +2 -1
  7. package/lib/cjs/common/upload.js +25 -2
  8. package/lib/cjs/node/factory.js +63 -0
  9. package/lib/cjs/node/signer.js +2 -1
  10. package/lib/cjs/node/upload.js +3 -3
  11. package/lib/cjs/utils/base64.js +2 -1
  12. package/lib/cjs/utils/common.js +30 -3
  13. package/lib/cjs/utils/readableStream.js +18 -1
  14. package/lib/cjs/version.js +1 -1
  15. package/lib/cjs/web/factory.js +7 -27
  16. package/lib/cjs/web/upload.js +3 -3
  17. package/lib/esm/common/factory.js +2 -115
  18. package/lib/esm/common/payment.js +1 -0
  19. package/lib/esm/common/signer.js +1 -0
  20. package/lib/esm/common/token/arweave.js +1 -0
  21. package/lib/esm/common/token/solana.js +1 -0
  22. package/lib/esm/common/upload.js +24 -1
  23. package/lib/esm/node/factory.js +63 -0
  24. package/lib/esm/node/signer.js +1 -0
  25. package/lib/esm/node/upload.js +1 -1
  26. package/lib/esm/utils/base64.js +1 -0
  27. package/lib/esm/utils/common.js +26 -0
  28. package/lib/esm/utils/readableStream.js +17 -0
  29. package/lib/esm/version.js +1 -1
  30. package/lib/esm/web/factory.js +9 -29
  31. package/lib/esm/web/upload.js +1 -1
  32. package/lib/types/common/factory.d.ts +19 -6
  33. package/lib/types/common/factory.d.ts.map +1 -1
  34. package/lib/types/common/payment.d.ts.map +1 -1
  35. package/lib/types/common/signer.d.ts +1 -0
  36. package/lib/types/common/signer.d.ts.map +1 -1
  37. package/lib/types/common/token/arweave.d.ts.map +1 -1
  38. package/lib/types/common/token/solana.d.ts.map +1 -1
  39. package/lib/types/common/upload.d.ts +1 -0
  40. package/lib/types/common/upload.d.ts.map +1 -1
  41. package/lib/types/node/factory.d.ts +5 -16
  42. package/lib/types/node/factory.d.ts.map +1 -1
  43. package/lib/types/node/signer.d.ts.map +1 -1
  44. package/lib/types/node/upload.d.ts +1 -1
  45. package/lib/types/node/upload.d.ts.map +1 -1
  46. package/lib/types/utils/base64.d.ts +1 -0
  47. package/lib/types/utils/base64.d.ts.map +1 -1
  48. package/lib/types/utils/common.d.ts +6 -16
  49. package/lib/types/utils/common.d.ts.map +1 -1
  50. package/lib/types/utils/readableStream.d.ts +1 -0
  51. package/lib/types/utils/readableStream.d.ts.map +1 -1
  52. package/lib/types/version.d.ts +1 -1
  53. package/lib/types/web/factory.d.ts.map +1 -1
  54. package/lib/types/web/upload.d.ts +1 -1
  55. package/lib/types/web/upload.d.ts.map +1 -1
  56. package/package.json +1 -1
@@ -1,19 +1,9 @@
1
- /**
2
- * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
- *
4
- * This program is free software: you can redistribute it and/or modify
5
- * it under the terms of the GNU Affero General Public License as published by
6
- * the Free Software Foundation, either version 3 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU Affero General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU Affero General Public License
15
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
- */
1
+ import { TokenType, TurboSigner, TurboWallet } from '../types.js';
17
2
  export declare function sleep(ms: number): Promise<void>;
18
3
  export declare function isWeb(): boolean;
4
+ export declare function createTurboSigner({ signer: clientProvidedSigner, privateKey: clientProvidedPrivateKey, token, }: {
5
+ signer?: TurboSigner;
6
+ privateKey?: TurboWallet;
7
+ token: TokenType;
8
+ }): TurboSigner;
19
9
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED,wBAAgB,KAAK,YAEpB"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,SAAS,EACT,WAAW,EACX,WAAW,EAGZ,MAAM,aAAa,CAAC;AAErB,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED,wBAAgB,KAAK,YAEpB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EAAE,oBAAoB,EAC5B,UAAU,EAAE,wBAAwB,EACpC,KAAiB,GAClB,EAAE;IACD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,SAAS,CAAC;CAClB,GAAG,WAAW,CAyBd"}
@@ -14,6 +14,7 @@
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 { Buffer } from 'node:buffer';
17
18
  import { ReadableStream } from 'node:stream/web';
18
19
  export declare function readableStreamToBuffer({ stream, size, }: {
19
20
  stream: ReadableStream;
@@ -1 +1 @@
1
- {"version":3,"file":"readableStream.d.ts","sourceRoot":"","sources":["../../../src/utils/readableStream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,wBAAsB,sBAAsB,CAAC,EAC3C,MAAM,EACN,IAAI,GACL,EAAE;IACD,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
1
+ {"version":3,"file":"readableStream.d.ts","sourceRoot":"","sources":["../../../src/utils/readableStream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,wBAAsB,sBAAsB,CAAC,EAC3C,MAAM,EACN,IAAI,GACL,EAAE;IACD,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
@@ -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.10.0-alpha.1";
17
+ export declare const version = "1.10.0-alpha.3";
18
18
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/web/factory.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,wBAAwB,EAGzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,SAAS,EACT,+BAA+B,EAC/B,WAAW,EACX,WAAW,EAGZ,MAAM,aAAa,CAAC;AAIrB,qBAAa,YAAa,SAAQ,gBAAgB;IAChD,SAAS,CAAC,MAAM,CAAC,SAAS,CACxB,cAAc,EAAE,WAAW,GAAG,SAAS,EACvC,kBAAkB,EAAE,WAAW,GAAG,SAAS,EAC3C,KAAK,EAAE,SAAS,GACf,2BAA2B;IA+B9B,MAAM,CAAC,aAAa,CAAC,EACnB,UAAU,EACV,MAAM,EAAE,cAAc,EACtB,oBAAyB,EACzB,mBAAwB,EACxB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,UAAU,GACX,EAAE,+BAA+B;CA+CnC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/web/factory.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,wBAAwB,EAGzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,SAAS,EACT,+BAA+B,EAC/B,WAAW,EACX,WAAW,EACZ,MAAM,aAAa,CAAC;AAKrB,qBAAa,YAAa,SAAQ,gBAAgB;IAChD,SAAS,CAAC,MAAM,CAAC,SAAS,CACxB,cAAc,EAAE,WAAW,GAAG,SAAS,EACvC,kBAAkB,EAAE,WAAW,GAAG,SAAS,EAC3C,KAAK,EAAE,SAAS,GACf,2BAA2B;IAW9B,MAAM,CAAC,aAAa,CAAC,EACnB,UAAU,EACV,MAAM,EAAE,cAAc,EACtB,oBAAyB,EACzB,mBAAwB,EACxB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,UAAU,GACX,EAAE,+BAA+B;CA+CnC"}
@@ -16,7 +16,7 @@
16
16
  */
17
17
  import { TurboAuthenticatedBaseUploadService } from '../common/upload.js';
18
18
  import { TurboAuthenticatedUploadServiceConfiguration, TurboUploadFolderParams } from '../types.js';
19
- export declare class TurboAuthenticatedWebUploadService extends TurboAuthenticatedBaseUploadService {
19
+ export declare class TurboAuthenticatedUploadService extends TurboAuthenticatedBaseUploadService {
20
20
  constructor({ url, retryConfig, signer, logger, token, }: TurboAuthenticatedUploadServiceConfiguration);
21
21
  getFiles(params: TurboUploadFolderParams): Promise<File[]>;
22
22
  getFileStreamForFile(file: File): ReadableStream;
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/web/upload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAC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M;IAInC,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIvC,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,cAAc;CAS7D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.10.0-alpha.2",
3
+ "version": "1.10.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",