@ardrive/turbo-sdk 1.23.4 → 1.24.0-alpha.1

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 (57) hide show
  1. package/README.md +126 -159
  2. package/bundles/web.bundle.min.js +71362 -57694
  3. package/lib/cjs/cli/commands/cryptoFund.js +1 -1
  4. package/lib/cjs/cli/constants.js +18 -9
  5. package/lib/cjs/cli/options.js +10 -0
  6. package/lib/cjs/cli/utils.js +20 -10
  7. package/lib/cjs/common/factory.js +3 -1
  8. package/lib/cjs/common/signer.js +1 -0
  9. package/lib/cjs/common/token/ario.js +116 -0
  10. package/lib/cjs/common/token/arweave.js +16 -11
  11. package/lib/cjs/common/token/index.js +5 -0
  12. package/lib/cjs/node/factory.js +3 -1
  13. package/lib/cjs/types.js +1 -0
  14. package/lib/cjs/utils/common.js +34 -0
  15. package/lib/cjs/version.js +1 -1
  16. package/lib/cjs/web/factory.js +3 -1
  17. package/lib/esm/cli/commands/cryptoFund.js +1 -1
  18. package/lib/esm/cli/constants.js +17 -9
  19. package/lib/esm/cli/options.js +10 -0
  20. package/lib/esm/cli/utils.js +19 -9
  21. package/lib/esm/common/factory.js +3 -1
  22. package/lib/esm/common/signer.js +1 -0
  23. package/lib/esm/common/token/ario.js +110 -0
  24. package/lib/esm/common/token/arweave.js +16 -11
  25. package/lib/esm/common/token/index.js +5 -0
  26. package/lib/esm/node/factory.js +3 -1
  27. package/lib/esm/types.js +1 -0
  28. package/lib/esm/utils/common.js +33 -0
  29. package/lib/esm/version.js +1 -1
  30. package/lib/esm/web/factory.js +3 -1
  31. package/lib/types/cli/constants.d.ts +1 -17
  32. package/lib/types/cli/constants.d.ts.map +1 -1
  33. package/lib/types/cli/options.d.ts +10 -0
  34. package/lib/types/cli/options.d.ts.map +1 -1
  35. package/lib/types/cli/types.d.ts +2 -0
  36. package/lib/types/cli/types.d.ts.map +1 -1
  37. package/lib/types/cli/utils.d.ts.map +1 -1
  38. package/lib/types/common/factory.d.ts +1 -1
  39. package/lib/types/common/factory.d.ts.map +1 -1
  40. package/lib/types/common/signer.d.ts +2 -2
  41. package/lib/types/common/signer.d.ts.map +1 -1
  42. package/lib/types/common/token/ario.d.ts +33 -0
  43. package/lib/types/common/token/ario.d.ts.map +1 -0
  44. package/lib/types/common/token/arweave.d.ts.map +1 -1
  45. package/lib/types/common/token/index.d.ts +1 -0
  46. package/lib/types/common/token/index.d.ts.map +1 -1
  47. package/lib/types/node/factory.d.ts +1 -1
  48. package/lib/types/node/factory.d.ts.map +1 -1
  49. package/lib/types/types.d.ts +11 -3
  50. package/lib/types/types.d.ts.map +1 -1
  51. package/lib/types/utils/common.d.ts +14 -0
  52. package/lib/types/utils/common.d.ts.map +1 -1
  53. package/lib/types/version.d.ts +1 -1
  54. package/lib/types/version.d.ts.map +1 -1
  55. package/lib/types/web/factory.d.ts +1 -1
  56. package/lib/types/web/factory.d.ts.map +1 -1
  57. package/package.json +3 -2
@@ -1,6 +1,20 @@
1
1
  import { TokenType, TurboSigner, TurboWallet } from '../types.js';
2
2
  export declare function sleep(ms: number): Promise<void>;
3
3
  export declare function isWeb(): boolean;
4
+ export declare const tokenToDevGatewayMap: Record<TokenType, string>;
5
+ export declare const tokenToDevAoConfigMap: {
6
+ ario: {
7
+ processId: string;
8
+ cuUrl: string;
9
+ };
10
+ };
11
+ export declare const defaultProdGatewayUrls: Record<TokenType, string>;
12
+ export declare const defaultProdAoConfigs: {
13
+ ario: {
14
+ processId: string;
15
+ cuUrl: string;
16
+ };
17
+ };
4
18
  export declare function createTurboSigner({ signer: clientProvidedSigner, privateKey: clientProvidedPrivateKey, token, }: {
5
19
  signer?: TurboSigner;
6
20
  privateKey?: TurboWallet;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/utils/common.ts"],"names":[],"mappings":"AAwBA,OAAO,EACL,SAAS,EACT,WAAW,EACX,WAAW,EAIZ,MAAM,aAAa,CAAC;AAErB,wBA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AwB,EACpC,KAAiB,GAClB,EAAE;IACD,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,SAAS,CAAC;CAClB,GAAG,WAAW,CAoCd;AAED,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAGxE;AAED,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,CActB"}
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "1.23.4-alpha.2";
16
+ export declare const version = "1.23.5";
17
17
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,eAAO,MAAM,OAAO,WAAW,CAAC"}
@@ -19,6 +19,6 @@ import { GetTurboSignerParams, TurboAuthenticatedConfiguration, TurboAuthenticat
19
19
  export declare class TurboFactory extends TurboBaseFactory {
20
20
  protected getSigner({ providedPrivateKey, logger, providedSigner, providedWalletAdapter, token, }: GetTurboSignerParams): TurboDataItemAbstractSigner;
21
21
  protected getAuthenticatedUploadService(config: TurboAuthenticatedUploadServiceConfiguration): TurboAuthenticatedUploadServiceInterface;
22
- static authenticated({ privateKey, signer: providedSigner, paymentServiceConfig, uploadServiceConfig, token, gatewayUrl, tokenMap, tokenTools, walletAdapter, }: TurboAuthenticatedConfiguration): import("./index.js").TurboAuthenticatedClient;
22
+ static authenticated({ privateKey, signer: providedSigner, paymentServiceConfig, uploadServiceConfig, token, gatewayUrl, tokenMap, tokenTools, walletAdapter, cuUrl, processId, }: TurboAuthenticatedConfiguration): import("./index.js").TurboAuthenticatedClient;
23
23
  }
24
24
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/web/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,4CAA4C,EAC5C,wCAAwC,EACzC,MAAM,aAAa,CAAC;AAKrB,qBAAa,YAAa,SAAQ,gBAAgB;IAChD,SAAS,CAAC,SAAS,CAAC,EAClB,kBAAkB,EAClB,MAAM,EACN,cAAc,EACd,qBAAqB,EACrB,KAAK,GACN,EAAE,oBAAoB,GAAG,2BAA2B;IAarD,SAAS,CAAC,6BAA6B,CACrC,MAAM,EAAE,4CAA4C,GACnD,wCAAwC;IAK3C,MAAM,CAAC,aAAa,CAAC,EACnB,UAAU,EACV,MAAM,EAAE,cAAc,EACtB,oBAAyB,EACzB,mBAAwB,EACxB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,GACd,EAAE,+BAA+B;CAcnC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/web/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,4CAA4C,EAC5C,wCAAwC,EACzC,MAAM,aAAa,CAAC;AAKrB,qBAAa,YAAa,SAAQ,gBAAgB;IAChD,SAAS,CAAC,SAAS,CAAC,EAClB,kBAAkB,EAClB,MAAM,EACN,cAAc,EACd,qBAAqB,EACrB,KAAK,GACN,EAAE,oBAAoB,GAAG,2BAA2B;IAarD,SAAS,CAAC,6BAA6B,CACrC,MAAM,EAAE,4CAA4C,GACnD,wCAAwC;IAK3C,MAAM,CAAC,aAAa,CAAC,EACnB,UAAU,EACV,MAAM,EAAE,cAAc,EACtB,oBAAyB,EACzB,mBAAwB,EACxB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,UAAU,EACV,aAAa,EACb,KAAK,EACL,SAAS,GACV,EAAE,+BAA+B;CAgBnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.23.4",
3
+ "version": "1.24.0-alpha.1",
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",
@@ -71,7 +71,7 @@
71
71
  "example:ts:cjs": "cd examples/typescript/cjs && yarn && yarn test",
72
72
  "docker:up": "docker compose up --quiet-pull -d",
73
73
  "docker:down": "docker compose down -v",
74
- "docs": "markdown-toc-gen insert README.md"
74
+ "docs": "markdown-toc-gen insert README.md --max-depth 3"
75
75
  },
76
76
  "dependencies": {
77
77
  "@cosmjs/amino": "^0.32.4",
@@ -81,6 +81,7 @@
81
81
  "@dha-team/arbundles": "^1.0.1",
82
82
  "@ethersproject/signing-key": "^5.7.0",
83
83
  "@kyvejs/sdk": "^1.4.5",
84
+ "@permaweb/aoconnect": "0.0.57",
84
85
  "@solana/web3.js": "^1.91.7",
85
86
  "arweave": "^1.15.1",
86
87
  "axios": "1.4.0",