@ardrive/turbo-sdk 1.9.0-alpha.2 → 1.9.1-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 (66) hide show
  1. package/README.md +45 -11
  2. package/bundles/web.bundle.min.js +11 -4
  3. package/lib/cjs/common/factory.js +1 -1
  4. package/lib/cjs/common/index.js +1 -1
  5. package/lib/cjs/common/logger.js +2 -2
  6. package/lib/cjs/common/payment.js +6 -1
  7. package/lib/cjs/common/signer.js +1 -1
  8. package/lib/cjs/common/token/arweave.js +1 -1
  9. package/lib/cjs/common/token/ethereum.js +3 -3
  10. package/lib/cjs/common/token/solana.js +1 -1
  11. package/lib/cjs/node/factory.js +1 -1
  12. package/lib/cjs/node/index.js +1 -1
  13. package/lib/cjs/node/signer.js +1 -1
  14. package/lib/cjs/utils/axiosClient.js +1 -1
  15. package/lib/cjs/utils/base64.js +1 -1
  16. package/lib/cjs/utils/common.js +1 -1
  17. package/lib/cjs/utils/errors.js +1 -1
  18. package/lib/cjs/version.js +2 -2
  19. package/lib/cjs/web/factory.js +1 -1
  20. package/lib/cjs/web/index.js +1 -1
  21. package/lib/cjs/web/signer.js +1 -1
  22. package/lib/esm/common/factory.js +1 -1
  23. package/lib/esm/common/index.js +1 -1
  24. package/lib/esm/common/logger.js +2 -2
  25. package/lib/esm/common/payment.js +6 -1
  26. package/lib/esm/common/signer.js +1 -1
  27. package/lib/esm/common/token/arweave.js +1 -1
  28. package/lib/esm/common/token/ethereum.js +3 -3
  29. package/lib/esm/common/token/solana.js +1 -1
  30. package/lib/esm/node/factory.js +1 -1
  31. package/lib/esm/node/index.js +1 -1
  32. package/lib/esm/node/signer.js +1 -1
  33. package/lib/esm/utils/axiosClient.js +1 -1
  34. package/lib/esm/utils/base64.js +1 -1
  35. package/lib/esm/utils/common.js +1 -1
  36. package/lib/esm/utils/errors.js +1 -1
  37. package/lib/esm/version.js +2 -2
  38. package/lib/esm/web/factory.js +1 -1
  39. package/lib/esm/web/index.js +1 -1
  40. package/lib/esm/web/signer.js +1 -1
  41. package/lib/types/common/currency.d.ts +1 -1
  42. package/lib/types/common/http.d.ts +1 -1
  43. package/lib/types/common/index.d.ts +1 -1
  44. package/lib/types/common/jwk.d.ts +1 -1
  45. package/lib/types/common/logger.d.ts +1 -1
  46. package/lib/types/common/logger.d.ts.map +1 -1
  47. package/lib/types/common/payment.d.ts.map +1 -1
  48. package/lib/types/common/token/arweave.d.ts +1 -1
  49. package/lib/types/common/token/ethereum.d.ts +1 -1
  50. package/lib/types/common/token/index.d.ts +1 -1
  51. package/lib/types/common/token/solana.d.ts +1 -1
  52. package/lib/types/common/turbo.d.ts +1 -1
  53. package/lib/types/common/upload.d.ts +1 -1
  54. package/lib/types/node/factory.d.ts +1 -1
  55. package/lib/types/node/index.d.ts +1 -1
  56. package/lib/types/node/signer.d.ts +1 -1
  57. package/lib/types/types.d.ts +1 -1
  58. package/lib/types/utils/axiosClient.d.ts +1 -1
  59. package/lib/types/utils/common.d.ts +1 -1
  60. package/lib/types/utils/errors.d.ts +1 -1
  61. package/lib/types/utils/readableStream.d.ts +1 -1
  62. package/lib/types/version.d.ts +2 -2
  63. package/lib/types/version.d.ts.map +1 -1
  64. package/lib/types/web/index.d.ts +1 -1
  65. package/lib/types/web/signer.d.ts +1 -1
  66. package/package.json +6 -4
package/README.md CHANGED
@@ -6,17 +6,31 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
6
6
 
7
7
  ## Table of Contents
8
8
 
9
+ <!-- toc -->
10
+
11
+ - [Table of Contents](#table-of-contents)
9
12
  - [Installation](#installation)
10
13
  - [Quick Start](#quick-start)
11
14
  - [Usage](#usage)
12
15
  - [Web](#web)
16
+ - [Bundlers (Webpack, Rollup, ESbuild, etc.)](#bundlers-webpack-rollup-esbuild-etc)
17
+ - [Browser](#browser)
13
18
  - [NodeJS](#nodejs)
19
+ - [CommonJS](#commonjs)
20
+ - [ESM](#esm)
14
21
  - [Typescript](#typescript)
15
22
  - [Examples](#examples)
16
23
  - [APIs](#apis)
17
24
  - [TurboFactory](#turbofactory)
18
25
  - [`unauthenticated()`](#unauthenticated)
19
26
  - [`authenticated()`](#authenticated)
27
+ - [Arweave JWK](#arweave-jwk)
28
+ - [ArweaveSigner](#arweavesigner)
29
+ - [ArconnectSigner](#arconnectsigner)
30
+ - [EthereumSigner](#ethereumsigner)
31
+ - [Ethereum Private Key](#ethereum-private-key)
32
+ - [HexSolanaSigner](#hexsolanasigner)
33
+ - [Solana Secret Key](#solana-secret-key)
20
34
  - [TurboUnauthenticatedClient](#turbounauthenticatedclient)
21
35
  - [`getSupportedCurrencies()`](#getsupportedcurrencies)
22
36
  - [`getSupportedCountries()`](#getsupportedcountries)
@@ -26,6 +40,9 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
26
40
  - [`getUploadCosts({ bytes })`](#getuploadcosts-bytes-)
27
41
  - [`uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal })`](#uploadsigneddataitem-dataitemstreamfactory-dataitemsizefactory-signal-)
28
42
  - [`createCheckoutSession({ amount, owner })`](#createcheckoutsession-amount-owner-)
43
+ - [Arweave (AR)](#arweave-ar)
44
+ - [Ethereum (ETH)](#ethereum-eth)
45
+ - [Solana (SOL)](#solana-sol)
29
46
  - [`submitFundTransaction({ txId })`](#submitfundtransaction-txid-)
30
47
  - [TurboAuthenticatedClient](#turboauthenticatedclient)
31
48
  - [`getBalance()`](#getbalance)
@@ -33,7 +50,16 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
33
50
  - [`createCheckoutSession({ amount, owner, promoCodes })`](#createcheckoutsession-amount-owner-promocodes-)
34
51
  - [`uploadFile({ fileStreamFactory, fileSizeFactory, signal, dataItemOpts })`](#uploadfile-filestreamfactory-filesizefactory-signal-dataitemopts-)
35
52
  - [`topUpWithTokens({ tokenAmount, feeMultiplier })`](#topupwithtokens-tokenamount-feemultiplier-)
53
+ - [Ethereum (ETH)](#ethereum-eth-1)
54
+ - [Solana (SOL)](#solana-sol-1)
36
55
  - [Developers](#developers)
56
+ - [Requirements](#requirements)
57
+ - [Setup & Build](#setup--build)
58
+ - [Testing](#testing)
59
+ - [Linting & Formatting](#linting--formatting)
60
+ - [Architecture](#architecture)
61
+
62
+ <!-- tocstop -->
37
63
 
38
64
  ## Installation
39
65
 
@@ -119,6 +145,9 @@ const turbo = TurboFactory.unauthenticated();
119
145
  const rates = await turbo.getFiatRates();
120
146
  ```
121
147
 
148
+ > [!WARNING]
149
+ > Polyfills are not provided by default for bundled web projects (Vite, ESBuild, Webpack, Rollup, etc.) . Depending on your apps bundler configuration and plugins, you will need to provide polyfills for various imports including `crypto`, `process`, `fs` and `buffer`. Refer to your bundler's documentation for how to provide the necessary polyfills.
150
+
122
151
  ESM:
123
152
 
124
153
  ```javascript
@@ -183,35 +212,35 @@ const turbo = TurboFactory.unauthenticated();
183
212
 
184
213
  Creates an instance of a client that accesses Turbo's authenticated and unauthenticated services. Requires either a signer, or private key to be provided.
185
214
 
186
- ##### Construct Turbo with an Arweave JWK
215
+ ##### Arweave JWK
187
216
 
188
217
  ```typescript
189
218
  const jwk = await arweave.crypto.generateJWK();
190
219
  const turbo = TurboFactory.authenticated({ privateKey: jwk });
191
220
  ```
192
221
 
193
- ##### Construct Turbo with an Arweave signer
222
+ ##### ArweaveSigner
194
223
 
195
224
  ```typescript
196
225
  const signer = new ArweaveSigner(jwk);
197
226
  const turbo = TurboFactory.authenticated({ signer });
198
227
  ```
199
228
 
200
- ##### Construct Turbo with an Arconnect signer
229
+ ##### ArconnectSigner
201
230
 
202
231
  ```typescript
203
232
  const signer = new ArconnectSigner(window.arweaveWallet);
204
233
  const turbo = TurboFactory.authenticated({ signer });
205
234
  ```
206
235
 
207
- ##### Construct Turbo with an ETH signer
236
+ ##### EthereumSigner
208
237
 
209
238
  ```typescript
210
239
  const signer = new EthereumSigner(privateKey);
211
240
  const turbo = TurboFactory.authenticated({ signer });
212
241
  ```
213
242
 
214
- ##### Construct Turbo with an ETH private key
243
+ ##### Ethereum Private Key
215
244
 
216
245
  ```typescript
217
246
  const turbo = TurboFactory.authenticated({
@@ -220,14 +249,14 @@ const turbo = TurboFactory.authenticated({
220
249
  });
221
250
  ```
222
251
 
223
- ##### Construct Turbo with a SOL signer
252
+ ##### HexSolanaSigner
224
253
 
225
254
  ```typescript
226
255
  const signer = new HexSolanaSigner(bs58.encode(secretKey));
227
256
  const turbo = TurboFactory.authenticated({ signer });
228
257
  ```
229
258
 
230
- ##### Construct Turbo with a SOL secret key
259
+ ##### Solana Secret Key
231
260
 
232
261
  ```typescript
233
262
  const turbo = TurboFactory.authenticated({
@@ -309,6 +338,8 @@ const uploadResponse = await turbo.uploadSignedDataItem({
309
338
 
310
339
  Creates a Stripe checkout session for a Turbo Top Up with the provided amount, currency, owner. The returned URL can be opened in the browser, all payments are processed by Stripe. To leverage promo codes, see [TurboAuthenticatedClient].
311
340
 
341
+ ##### Arweave (AR)
342
+
312
343
  ```typescript
313
344
  const { url, winc, paymentAmount, quotedPaymentAmount, adjustments } =
314
345
  await turbo.createCheckoutSession({
@@ -330,7 +361,7 @@ if (process.platform === 'darwin') {
330
361
  }
331
362
  ```
332
363
 
333
- ##### Top up to ETH or SOL wallets
364
+ ##### Ethereum (ETH)
334
365
 
335
366
  ```ts
336
367
  const turbo = TurboFactory.unauthenticated({ token: 'ethereum' });
@@ -341,6 +372,8 @@ const { url, winc, paymentAmount } = await turbo.createCheckoutSession({
341
372
  });
342
373
  ```
343
374
 
375
+ ##### Solana (SOL)
376
+
344
377
  ```ts
345
378
  const turbo = TurboFactory.unauthenticated({ token: 'solana' });
346
379
 
@@ -354,7 +387,8 @@ const { url, winc, paymentAmount } = await turbo.createCheckoutSession({
354
387
 
355
388
  Submits the transaction ID of a funding transaction to Turbo Payment Service for top up processing. The `txId` is the transaction ID of the transaction to be submitted.
356
389
 
357
- - Note: Use this API if you've already executed your token transfer to the Turbo wallet. Otherwise, consider using `topUpWithTokens` to execute a new token transfer to the Turbo wallet and submit its resulting transaction ID for top up processing all in one go
390
+ > [!NOTE]
391
+ > Use this API if you've already executed your token transfer to the Turbo wallet. Otherwise, consider using `topUpWithTokens` to execute a new token transfer to the Turbo wallet and submit its resulting transaction ID for top up processing all in one go
358
392
 
359
393
  ```typescript
360
394
  const turbo = TurboFactory.unauthenticated(); // defaults to arweave token type
@@ -453,7 +487,7 @@ const { winc, status, id, ...fundResult } = await turbo.topUpWithTokens({
453
487
  });
454
488
  ```
455
489
 
456
- ##### Top up ETH tokens to ETH wallet
490
+ ##### Ethereum (ETH)
457
491
 
458
492
  ```ts
459
493
  const turbo = TurboFactory.authenticated({ signer, token: 'ethereum' });
@@ -463,7 +497,7 @@ const { winc, status, id, ...fundResult } = await turbo.topUpWithTokens({
463
497
  });
464
498
  ```
465
499
 
466
- ##### Top up SOL tokens to SOL wallet
500
+ ##### Solana (SOL)
467
501
 
468
502
  ```ts
469
503
  const turbo = TurboFactory.authenticated({ signer, token: 'solana' });
@@ -161226,12 +161226,12 @@ var import_winston = __toESM(require_winston(), 1);
161226
161226
  init_dirname();
161227
161227
  init_buffer2();
161228
161228
  init_process2();
161229
- var version22 = "1.9.0-alpha.1";
161229
+ var version22 = "1.9.0";
161230
161230
 
161231
161231
  // src/common/logger.ts
161232
161232
  var TurboWinstonLogger = class {
161233
161233
  constructor({
161234
- level = "info",
161234
+ level = "debug",
161235
161235
  logFormat = "simple"
161236
161236
  } = {}) {
161237
161237
  this.logger = (0, import_winston.createLogger)({
@@ -165563,6 +165563,13 @@ var TurboAuthenticatedPaymentService = class extends TurboUnauthenticatedPayment
165563
165563
  const txId = fundTx.id;
165564
165564
  try {
165565
165565
  await this.tokenTools.pollForTxBeingAvailable({ txId });
165566
+ } catch (e12) {
165567
+ this.logger.error(
165568
+ `Failed to poll for transaction being available from ${this.token} gateway... Attempting to submit fund tx to Turbo...`,
165569
+ e12
165570
+ );
165571
+ }
165572
+ try {
165566
165573
  return {
165567
165574
  ...await this.submitFundTransaction({ txId }),
165568
165575
  target: fundTx.target,
@@ -169776,8 +169783,8 @@ var EthereumToken = class {
169776
169783
  gatewayUrl = "https://cloudflare-eth.com/",
169777
169784
  pollingOptions = {
169778
169785
  maxAttempts: 10,
169779
- pollingIntervalMs: 3e3,
169780
- initialBackoffMs: 5e3
169786
+ pollingIntervalMs: 4e3,
169787
+ initialBackoffMs: 1e4
169781
169788
  }
169782
169789
  } = {}) {
169783
169790
  this.logger = logger19;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TurboBaseFactory = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /**
18
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
18
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
19
19
  *
20
20
  * This program is free software: you can redistribute it and/or modify
21
21
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TurboWinstonLogger = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -20,7 +20,7 @@ exports.TurboWinstonLogger = void 0;
20
20
  const winston_1 = require("winston");
21
21
  const version_js_1 = require("../version.js");
22
22
  class TurboWinstonLogger {
23
- constructor({ level = 'info', logFormat = 'simple', } = {}) {
23
+ constructor({ level = 'debug', logFormat = 'simple', } = {}) {
24
24
  this.logger = (0, winston_1.createLogger)({
25
25
  level,
26
26
  defaultMeta: { client: 'turbo-sdk', version: version_js_1.version },
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TurboAuthenticatedPaymentService = exports.TurboUnauthenticatedPaymentService = exports.defaultPaymentServiceURL = exports.developmentPaymentServiceURL = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -188,6 +188,11 @@ class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymentServic
188
188
  try {
189
189
  // Let transaction settle some time
190
190
  await this.tokenTools.pollForTxBeingAvailable({ txId });
191
+ }
192
+ catch (e) {
193
+ this.logger.error(`Failed to poll for transaction being available from ${this.token} gateway... Attempting to submit fund tx to Turbo...`, e);
194
+ }
195
+ try {
191
196
  return {
192
197
  ...(await this.submitFundTransaction({ txId })),
193
198
  target: fundTx.target,
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TurboDataItemAbstractSigner = void 0;
7
7
  /**
8
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
8
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
9
9
  *
10
10
  * This program is free software: you can redistribute it and/or modify
11
11
  * it under the terms of the GNU Affero General Public License as published by
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ARToTokenAmount = exports.WinstonToTokenAmount = exports.ArweaveToken = void 0;
7
7
  /**
8
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
8
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
9
9
  *
10
10
  * This program is free software: you can redistribute it and/or modify
11
11
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EthereumToken = exports.ETHToTokenAmount = exports.weiToTokenAmount = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -27,8 +27,8 @@ exports.ETHToTokenAmount = ETHToTokenAmount;
27
27
  class EthereumToken {
28
28
  constructor({ logger = new logger_js_1.TurboWinstonLogger(), gatewayUrl = 'https://cloudflare-eth.com/', pollingOptions = {
29
29
  maxAttempts: 10,
30
- pollingIntervalMs: 3000,
31
- initialBackoffMs: 5000,
30
+ pollingIntervalMs: 4000,
31
+ initialBackoffMs: 10000,
32
32
  }, } = {}) {
33
33
  this.logger = logger;
34
34
  this.gatewayUrl = gatewayUrl;
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SolanaToken = exports.SOLToTokenAmount = exports.lamportToTokenAmount = void 0;
7
7
  /**
8
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
8
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
9
9
  *
10
10
  * This program is free software: you can redistribute it and/or modify
11
11
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TurboFactory = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /**
18
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
18
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
19
19
  *
20
20
  * This program is free software: you can redistribute it and/or modify
21
21
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TurboNodeSigner = exports.HexSolanaSigner = exports.EthereumSigner = exports.ArweaveSigner = exports.ArconnectSigner = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.createAxiosInstance = exports.defaultRequestHeaders = void 0;
30
30
  /**
31
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
31
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
32
32
  *
33
33
  * This program is free software: you can redistribute it and/or modify
34
34
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sha256B64Url = exports.toB64Url = exports.fromB64Url = exports.ownerToAddress = exports.jwkToPublicArweaveAddress = exports.base64URLRegex = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
3
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
6
6
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FailedRequestError = exports.UnauthenticatedRequestError = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
3
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
6
6
  * it under the terms of the GNU Affero General Public License as published by
@@ -18,4 +18,4 @@
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.version = void 0;
20
20
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
21
- exports.version = '1.9.0-alpha.2';
21
+ exports.version = '1.9.1-alpha.1';
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TurboFactory = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /**
18
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
18
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
19
19
  *
20
20
  * This program is free software: you can redistribute it and/or modify
21
21
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TurboWebArweaveSigner = exports.HexSolanaSigner = exports.EthereumSigner = exports.ArweaveSigner = exports.ArconnectSigner = void 0;
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -17,7 +17,7 @@
17
17
  import { createLogger, format, transports } from 'winston';
18
18
  import { version } from '../version.js';
19
19
  export class TurboWinstonLogger {
20
- constructor({ level = 'info', logFormat = 'simple', } = {}) {
20
+ constructor({ level = 'debug', logFormat = 'simple', } = {}) {
21
21
  this.logger = createLogger({
22
22
  level,
23
23
  defaultMeta: { client: 'turbo-sdk', version },
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -184,6 +184,11 @@ export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymen
184
184
  try {
185
185
  // Let transaction settle some time
186
186
  await this.tokenTools.pollForTxBeingAvailable({ txId });
187
+ }
188
+ catch (e) {
189
+ this.logger.error(`Failed to poll for transaction being available from ${this.token} gateway... Attempting to submit fund tx to Turbo...`, e);
190
+ }
191
+ try {
187
192
  return {
188
193
  ...(await this.submitFundTransaction({ txId })),
189
194
  target: fundTx.target,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -22,8 +22,8 @@ export const ETHToTokenAmount = (eth) => new BigNumber(eth).times(1e18).valueOf(
22
22
  export class EthereumToken {
23
23
  constructor({ logger = new TurboWinstonLogger(), gatewayUrl = 'https://cloudflare-eth.com/', pollingOptions = {
24
24
  maxAttempts: 10,
25
- pollingIntervalMs: 3000,
26
- initialBackoffMs: 5000,
25
+ pollingIntervalMs: 4000,
26
+ initialBackoffMs: 10000,
27
27
  }, } = {}) {
28
28
  this.logger = logger;
29
29
  this.gatewayUrl = gatewayUrl;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -15,4 +15,4 @@
15
15
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
  */
17
17
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
18
- export const version = '1.9.0-alpha.2';
18
+ export const version = '1.9.1-alpha.1';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,OAA6C,MAAM,SAAS,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,qBAAa,kBAAmB,YAAW,WAAW;IACpD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;gBACrB,EACV,KAAc,EACd,SAAoB,GACrB,GAAE;QACD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;QACxD,SAAS,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;KACtC;IAUN,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIxC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIxC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzC,WAAW,CAAC,KAAK,EAAE,MAAM;IAIzB,YAAY,CAAC,SAAS,EAAE,MAAM;CAG/B"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,OAA6C,MAAM,SAAS,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,qBAAa,kBAAmB,YAAW,WAAW;IACpD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;gBACrB,EACV,KAAe,EACf,SAAoB,GACrB,GAAE;QACD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;QACxD,SAAS,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;KACtC;IAUN,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIxC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIxC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE;IAIzC,WAAW,CAAC,KAAK,EAAE,MAAM;IAIzB,YAAY,CAAC,SAAS,EAAE,MAAM;CAG/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/common/payment.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EAET,6CAA6C,EAC7C,yCAAyC,EACzC,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,uB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4BAA4B,CAAC;IAI3B,qBAAqB,CAAC,EACjC,IAAI,GACL,EAAE;QACD,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAqCvC;AAED,qBAAa,gCACX,SAAQ,kCACR,YAAW,yCAAyC;IAEpD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IAC/C,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;gBAE1C,EACV,GAA8B,EAC9B,WAAW,EACX,MAAM,EACN,MAAiC,EACjC,KAAiB,EACjB,UAAU,GACX,EAAE,6CAA6C;IAMnC,UAAU,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAY3C,cAAc,CAAC,EAC1B,MAAM,EACN,UAAe,GAChB,EAAE,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAShD,qBAAqB,CAChC,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,4BAA4B,CAAC;YAO1B,sBAAsB;IAYvB,eAAe,CAAC,EAC3B,aAAiB,EACjB,WAAW,EAAE,YAAY,GAC1B,EAAE,yBAAyB,GAAG,OAAO,CAAC,uBAAuB,CAAC;CA+ChE"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /**
3
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
3
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
6
6
  * it under the terms of the GNU Affero General Public License as published by
@@ -2,7 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
4
  /**
5
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
5
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
6
6
  *
7
7
  * This program is free software: you can redistribute it and/or modify
8
8
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  /**
4
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
4
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
5
5
  *
6
6
  * This program is free software: you can redistribute it and/or modify
7
7
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -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.9.0-alpha.1";
17
+ export declare const version = "1.9.0";
18
18
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,kBAAkB,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,UAAU,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
3
3
  *
4
4
  * This program is free software: you can redistribute it and/or modify
5
5
  * it under the terms of the GNU Affero General Public License as published by
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /**
3
- * Copyright (C) 2022-2023 Permanent Data Solutions, Inc. All Rights Reserved.
3
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
4
4
  *
5
5
  * This program is free software: you can redistribute it and/or modify
6
6
  * it under the terms of the GNU Affero General Public License as published by
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.9.0-alpha.2",
3
+ "version": "1.9.1-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",
@@ -34,8 +34,8 @@
34
34
  "types": "./lib/types/node/index.d.ts"
35
35
  },
36
36
  "./web": {
37
- "import": "./bundles/web.bundle.min.js",
38
- "require": "./bundles/web.bundle.min.js",
37
+ "import": "./lib/esm/web/index.js",
38
+ "require": "./lib/cjs/web/index.js",
39
39
  "types": "./lib/types/web/index.d.ts",
40
40
  "browser": "./bundles/web.bundle.min.js"
41
41
  }
@@ -67,7 +67,8 @@
67
67
  "example:ts:esm": "cd examples/typescript/esm && yarn && yarn test",
68
68
  "example:ts:cjs": "cd examples/typescript/cjs && yarn && yarn test",
69
69
  "docker:up": "docker compose up --quiet-pull --pull always -d",
70
- "docker:down": "docker compose down -v"
70
+ "docker:down": "docker compose down -v",
71
+ "docs": "markdown-toc-gen insert README.md"
71
72
  },
72
73
  "dependencies": {
73
74
  "@irys/arweave": "0.0.3",
@@ -111,6 +112,7 @@
111
112
  "eslint-plugin-promise": "^6.1.1",
112
113
  "http-server": "^14.1.1",
113
114
  "husky": "^8.0.3",
115
+ "markdown-toc-gen": "^1.0.1",
114
116
  "mocha": "^10.2.0",
115
117
  "prettier": "^3.0.2",
116
118
  "rimraf": "^5.0.1",