@ardrive/turbo-sdk 1.0.0-alpha.1 → 1.0.0-alpha.11

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 (80) hide show
  1. package/README.md +13 -13
  2. package/bundles/web.bundle.min.js +6 -5
  3. package/lib/cjs/common/factory.js +17 -0
  4. package/lib/cjs/common/http.js +49 -0
  5. package/lib/cjs/common/index.js +35 -0
  6. package/lib/cjs/common/jwk.js +2 -0
  7. package/lib/cjs/common/payment.js +86 -0
  8. package/lib/cjs/common/turbo.js +105 -0
  9. package/lib/cjs/common/upload.js +59 -0
  10. package/lib/cjs/node/factory.js +34 -0
  11. package/lib/cjs/node/index.js +36 -0
  12. package/lib/cjs/node/signer.js +61 -0
  13. package/lib/cjs/types.js +2 -0
  14. package/lib/cjs/utils/axiosClient.js +60 -0
  15. package/lib/cjs/utils/base64.js +47 -0
  16. package/lib/cjs/utils/errors.js +33 -0
  17. package/lib/cjs/utils/readableStream.js +28 -0
  18. package/lib/cjs/web/factory.js +34 -0
  19. package/lib/cjs/web/index.js +36 -0
  20. package/lib/cjs/web/signer.js +71 -0
  21. package/lib/{web → esm/node}/index.js +1 -0
  22. package/lib/{node → esm/web}/index.js +1 -0
  23. package/lib/{web → esm/web}/signer.js +6 -3
  24. package/lib/{common → types/common}/factory.d.ts +2 -1
  25. package/lib/types/common/factory.d.ts.map +1 -0
  26. package/lib/{common → types/common}/http.d.ts +2 -1
  27. package/lib/types/common/http.d.ts.map +1 -0
  28. package/lib/{common → types/common}/index.d.ts +1 -0
  29. package/lib/types/common/index.d.ts.map +1 -0
  30. package/lib/types/{arweave.d.ts → common/jwk.d.ts} +1 -0
  31. package/lib/types/common/jwk.d.ts.map +1 -0
  32. package/lib/{common → types/common}/payment.d.ts +2 -1
  33. package/lib/types/common/payment.d.ts.map +1 -0
  34. package/lib/{common → types/common}/turbo.d.ts +2 -1
  35. package/lib/types/common/turbo.d.ts.map +1 -0
  36. package/lib/{common → types/common}/upload.d.ts +2 -1
  37. package/lib/types/common/upload.d.ts.map +1 -0
  38. package/lib/{node → types/node}/factory.d.ts +2 -1
  39. package/lib/types/node/factory.d.ts.map +1 -0
  40. package/lib/{web → types/node}/index.d.ts +2 -0
  41. package/lib/types/node/index.d.ts.map +1 -0
  42. package/lib/{node → types/node}/signer.d.ts +3 -2
  43. package/lib/types/node/signer.d.ts.map +1 -0
  44. package/lib/types/{turbo.d.ts → types.d.ts} +2 -1
  45. package/lib/types/types.d.ts.map +1 -0
  46. package/lib/{utils → types/utils}/axiosClient.d.ts +1 -0
  47. package/lib/types/utils/axiosClient.d.ts.map +1 -0
  48. package/lib/{utils → types/utils}/base64.d.ts +3 -2
  49. package/lib/types/utils/base64.d.ts.map +1 -0
  50. package/lib/{utils → types/utils}/errors.d.ts +1 -0
  51. package/lib/types/utils/errors.d.ts.map +1 -0
  52. package/lib/{utils → types/utils}/readableStream.d.ts +1 -0
  53. package/lib/types/utils/readableStream.d.ts.map +1 -0
  54. package/lib/{web → types/web}/factory.d.ts +2 -1
  55. package/lib/types/web/factory.d.ts.map +1 -0
  56. package/lib/{node → types/web}/index.d.ts +2 -0
  57. package/lib/types/web/index.d.ts.map +1 -0
  58. package/lib/{web → types/web}/signer.d.ts +4 -3
  59. package/lib/types/web/signer.d.ts.map +1 -0
  60. package/package.json +16 -14
  61. package/lib/LICENSE.md +0 -661
  62. package/lib/README.md +0 -114
  63. package/lib/package.json +0 -106
  64. package/lib/types/index.d.ts +0 -18
  65. package/lib/types/index.js +0 -18
  66. /package/lib/{common → esm/common}/factory.js +0 -0
  67. /package/lib/{common → esm/common}/http.js +0 -0
  68. /package/lib/{common → esm/common}/index.js +0 -0
  69. /package/lib/{types/arweave.js → esm/common/jwk.js} +0 -0
  70. /package/lib/{common → esm/common}/payment.js +0 -0
  71. /package/lib/{common → esm/common}/turbo.js +0 -0
  72. /package/lib/{common → esm/common}/upload.js +0 -0
  73. /package/lib/{node → esm/node}/factory.js +0 -0
  74. /package/lib/{node → esm/node}/signer.js +0 -0
  75. /package/lib/{types/turbo.js → esm/types.js} +0 -0
  76. /package/lib/{utils → esm/utils}/axiosClient.js +0 -0
  77. /package/lib/{utils → esm/utils}/base64.js +0 -0
  78. /package/lib/{utils → esm/utils}/errors.js +0 -0
  79. /package/lib/{utils → esm/utils}/readableStream.js +0 -0
  80. /package/lib/{web → esm/web}/factory.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/web/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
@@ -16,10 +16,10 @@
16
16
  * You should have received a copy of the GNU Affero General Public License
17
17
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18
18
  */
19
- import { ArweaveSigner } from 'arbundles/web';
19
+ import { ArweaveSigner } from 'arbundles';
20
20
  import { ReadableStream } from 'node:stream/web';
21
- import { JWKInterface } from '../types/arweave.js';
22
- import { TurboWalletSigner } from '../types/turbo.js';
21
+ import { JWKInterface } from '../common/jwk.js';
22
+ import { TurboWalletSigner } from '../types.js';
23
23
  export declare class TurboWebArweaveSigner implements TurboWalletSigner {
24
24
  protected privateKey: JWKInterface;
25
25
  protected signer: ArweaveSigner;
@@ -35,3 +35,4 @@ export declare class TurboWebArweaveSigner implements TurboWalletSigner {
35
35
  'x-signature': string;
36
36
  }>;
37
37
  }
38
+ //# sourceMappingURL=signer.d.ts.map
@@ -0,0 +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;AAIhD,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,GAClB,EAAE;QACD,iBAAiB,EAAE,MAAM,cAAc,CAAC;KACzC,GAAG,OAAO,CAAC,MAAM,CAAC;IAYb,4BAA4B;;;;;CAanC"}
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.0.0-alpha.1",
4
- "main": "./lib/node/index.js",
5
- "types": "./lib/types/index.d.ts",
3
+ "version": "1.0.0-alpha.11",
6
4
  "type": "module",
5
+ "main": "./lib/cjs/node/index.js",
6
+ "types": "./lib/types/node/index.d.ts",
7
+ "module": "./lib/esm/node/index.js",
8
+ "browser": "./bundles/web.bundle.min.js",
7
9
  "repository": {
8
10
  "type": "git",
9
11
  "url": "https://github.com/ardriveapp/turbo-sdk.git"
@@ -21,20 +23,19 @@
21
23
  },
22
24
  "exports": {
23
25
  ".": {
24
- "import": "./lib/node/index.js",
25
- "require": "./lib/node/index.js",
26
- "types": "./lib/types/index.d.ts",
27
- "browser": "./bundles/web.bundle.min.js"
26
+ "import": "./lib/esm/node/index.js",
27
+ "require": "./lib/cjs/node/index.js",
28
+ "types": "./lib/types/node/index.d.ts"
28
29
  },
29
30
  "./node": {
30
- "import": "./lib/node/index.js",
31
- "require": "./lib/node/index.js",
32
- "types": "./lib/types/index.d.ts"
31
+ "import": "./lib/esm/node/index.js",
32
+ "require": "./lib/cjs/node/index.js",
33
+ "types": "./lib/types/node/index.d.ts"
33
34
  },
34
35
  "./web": {
35
36
  "import": "./lib/web/index.js",
36
37
  "require": "./lib/web/index.js",
37
- "types": "./lib/types/index.d.ts",
38
+ "types": "./lib/types/web/index.d.ts",
38
39
  "browser": "./bundles/web.bundle.min.js"
39
40
  }
40
41
  },
@@ -44,10 +45,11 @@
44
45
  "license": "AGPL-3.0-or-later",
45
46
  "scripts": {
46
47
  "build:web": "node bundle.cjs",
47
- "build:esm": "yarn tsc -p tsconfig.node.json && yarn tsc -p tsconfig.web.json && cp package.json README.md LICENSE.md ./lib",
48
- "build": "yarn clean && yarn build:web && yarn build:esm",
48
+ "build:esm": "yarn tsc -p tsconfig.json",
49
+ "build:cjs": "yarn tsc -p tsconfig.cjs.json",
50
+ "build:types": "yarn tsc -p tsconfig.types.json",
51
+ "build": "yarn clean && yarn build:web && yarn build:esm && yarn build:cjs && yarn build:types",
49
52
  "clean": "rimraf [ lib coverage bundles ]",
50
- "postinstall": "husky install",
51
53
  "lint": "eslint src",
52
54
  "lint:fix": "eslint src --fix",
53
55
  "format": "prettier --check .",