@ardrive/turbo-sdk 1.0.0-alpha.22 → 1.0.0-alpha.24

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.
@@ -11,7 +11,7 @@ class TurboUnauthenticatedClient {
11
11
  /**
12
12
  * Returns the supported fiat currency conversion rate for 1AR based on current market prices.
13
13
  */
14
- async getFiatToAR({ currency, }) {
14
+ getFiatToAR({ currency, }) {
15
15
  return this.paymentService.getFiatToAR({ currency });
16
16
  }
17
17
  /**
@@ -20,43 +20,49 @@ class TurboUnauthenticatedClient {
20
20
  * Note: this does not take into account varying adjustments and promotions for different sizes of data. If you want to calculate the total
21
21
  * cost in 'winc' for a given number of bytes, use getUploadCosts.
22
22
  */
23
- async getFiatRates() {
23
+ getFiatRates() {
24
24
  return this.paymentService.getFiatRates();
25
25
  }
26
26
  /**
27
27
  * Returns a comprehensive list of supported countries that can purchase credits through the Turbo Payment Service.
28
28
  */
29
- async getSupportedCountries() {
29
+ getSupportedCountries() {
30
30
  return this.paymentService.getSupportedCountries();
31
31
  }
32
32
  /**
33
33
  * Returns a list of all supported fiat currencies.
34
34
  */
35
- async getSupportedCurrencies() {
35
+ getSupportedCurrencies() {
36
36
  return this.paymentService.getSupportedCurrencies();
37
37
  }
38
38
  /**
39
39
  * Determines the price in 'winc' to upload one data item of a specific size in bytes, including all Turbo cost adjustments and fees.
40
40
  */
41
- async getUploadCosts({ bytes, }) {
41
+ getUploadCosts({ bytes, }) {
42
42
  return this.paymentService.getUploadCosts({ bytes });
43
43
  }
44
44
  /**
45
45
  * Determines the amount of 'winc' that would be returned for a given currency and amount, including all Turbo cost adjustments and fees.
46
46
  */
47
- async getWincForFiat({ amount, currency, }) {
48
- return this.paymentService.getWincForFiat({ amount, currency });
47
+ getWincForFiat(params) {
48
+ return this.paymentService.getWincForFiat(params);
49
49
  }
50
50
  /**
51
51
  * Uploads a signed data item to the Turbo Upload Service.
52
52
  */
53
- async uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal, }) {
53
+ uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal, }) {
54
54
  return this.uploadService.uploadSignedDataItem({
55
55
  dataItemStreamFactory,
56
56
  dataItemSizeFactory,
57
57
  signal,
58
58
  });
59
59
  }
60
+ /**
61
+ * Creates a Turbo Checkout Session for a given amount and currency.
62
+ */
63
+ createCheckoutSession(params) {
64
+ return this.paymentService.createCheckoutSession(params);
65
+ }
60
66
  }
61
67
  exports.TurboUnauthenticatedClient = TurboUnauthenticatedClient;
62
68
  class TurboAuthenticatedClient extends TurboUnauthenticatedClient {
@@ -66,13 +72,13 @@ class TurboAuthenticatedClient extends TurboUnauthenticatedClient {
66
72
  /**
67
73
  * Returns the current balance of the user's wallet in 'winc'.
68
74
  */
69
- async getBalance() {
75
+ getBalance() {
70
76
  return this.paymentService.getBalance();
71
77
  }
72
78
  /**
73
79
  * Signs and uploads raw data to the Turbo Upload Service.
74
80
  */
75
- async uploadFile({ fileStreamFactory, fileSizeFactory, signal, }) {
81
+ uploadFile({ fileStreamFactory, fileSizeFactory, signal, }) {
76
82
  return this.uploadService.uploadFile({
77
83
  fileStreamFactory,
78
84
  fileSizeFactory,
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TurboAuthenticatedUploadService = exports.TurboUnauthenticatedUploadService = void 0;
3
+ exports.TurboAuthenticatedUploadService = exports.TurboUnauthenticatedUploadService = exports.developmentUploadServiceURL = exports.defaultUploadServiceURL = void 0;
4
4
  const http_js_1 = require("./http.js");
5
+ exports.defaultUploadServiceURL = 'https://upload.ardrive.io';
6
+ exports.developmentUploadServiceURL = 'https://upload.ardrive.dev';
5
7
  class TurboUnauthenticatedUploadService {
6
- constructor({ url = 'https://upload.ardrive.dev', retryConfig, }) {
8
+ constructor({ url = exports.defaultUploadServiceURL, retryConfig, }) {
7
9
  this.httpService = new http_js_1.TurboHTTPService({
8
10
  url: `${url}/v1`,
9
11
  retryConfig,
@@ -0,0 +1,27 @@
1
+ export class ZeroDecimalCurrency {
2
+ constructor(amount, type) {
3
+ this.amount = amount;
4
+ this.type = type;
5
+ }
6
+ }
7
+ export class TwoDecimalCurrency {
8
+ constructor(a, type) {
9
+ this.a = a;
10
+ this.type = type;
11
+ }
12
+ get amount() {
13
+ return this.a * 100;
14
+ }
15
+ }
16
+ // Two decimal currencies that are supported by the Turbo API
17
+ export const USD = (usd) => new TwoDecimalCurrency(usd, 'usd');
18
+ export const EUR = (eur) => new TwoDecimalCurrency(eur, 'eur');
19
+ export const GBP = (gbp) => new TwoDecimalCurrency(gbp, 'gbp');
20
+ export const CAD = (cad) => new TwoDecimalCurrency(cad, 'cad');
21
+ export const AUD = (aud) => new TwoDecimalCurrency(aud, 'aud');
22
+ export const INR = (inr) => new TwoDecimalCurrency(inr, 'inr');
23
+ export const SGD = (sgd) => new TwoDecimalCurrency(sgd, 'sgd');
24
+ export const HKD = (hkd) => new TwoDecimalCurrency(hkd, 'hkd');
25
+ export const BRL = (brl) => new TwoDecimalCurrency(brl, 'brl');
26
+ // Zero decimal currencies that are supported by the Turbo API
27
+ export const JPY = (jpy) => new ZeroDecimalCurrency(jpy, 'jpy');
@@ -1,6 +1,28 @@
1
- import { TurboUnauthenticatedPaymentService } from './payment.js';
1
+ import { TurboUnauthenticatedPaymentService, defaultPaymentServiceURL, developmentPaymentServiceURL, } from './payment.js';
2
2
  import { TurboUnauthenticatedClient } from './turbo.js';
3
- import { TurboUnauthenticatedUploadService } from './upload.js';
3
+ import { TurboUnauthenticatedUploadService, defaultUploadServiceURL, developmentUploadServiceURL, } from './upload.js';
4
+ /**
5
+ * Testing configuration.
6
+ */
7
+ export const developmentTurboConfiguration = {
8
+ paymentServiceConfig: {
9
+ url: developmentPaymentServiceURL,
10
+ },
11
+ uploadServiceConfig: {
12
+ url: developmentUploadServiceURL,
13
+ },
14
+ };
15
+ /**
16
+ * Production configuration.
17
+ */
18
+ export const defaultTurboConfiguration = {
19
+ paymentServiceConfig: {
20
+ url: defaultPaymentServiceURL,
21
+ },
22
+ uploadServiceConfig: {
23
+ url: defaultUploadServiceURL,
24
+ },
25
+ };
4
26
  export class TurboBaseFactory {
5
27
  static unauthenticated({ paymentServiceConfig = {}, uploadServiceConfig = {}, } = {}) {
6
28
  const paymentService = new TurboUnauthenticatedPaymentService({
@@ -17,3 +17,4 @@
17
17
  export * from './upload.js';
18
18
  export * from './payment.js';
19
19
  export * from './turbo.js';
20
+ export * from './currency.js';
@@ -1,27 +1,29 @@
1
1
  import { TurboHTTPService } from './http.js';
2
+ export const developmentPaymentServiceURL = 'https://payment.ardrive.dev';
3
+ export const defaultPaymentServiceURL = 'https://payment.ardrive.io';
2
4
  export class TurboUnauthenticatedPaymentService {
3
- constructor({ url = 'https://payment.ardrive.dev', retryConfig, }) {
5
+ constructor({ url = defaultPaymentServiceURL, retryConfig, }) {
4
6
  this.httpService = new TurboHTTPService({
5
7
  url: `${url}/v1`,
6
8
  retryConfig,
7
9
  });
8
10
  }
9
- async getFiatRates() {
11
+ getFiatRates() {
10
12
  return this.httpService.get({
11
13
  endpoint: '/rates',
12
14
  });
13
15
  }
14
- async getFiatToAR({ currency, }) {
16
+ getFiatToAR({ currency, }) {
15
17
  return this.httpService.get({
16
18
  endpoint: `/rates/${currency}`,
17
19
  });
18
20
  }
19
- async getSupportedCountries() {
21
+ getSupportedCountries() {
20
22
  return this.httpService.get({
21
23
  endpoint: '/countries',
22
24
  });
23
25
  }
24
- async getSupportedCurrencies() {
26
+ getSupportedCurrencies() {
25
27
  return this.httpService.get({
26
28
  endpoint: '/currencies',
27
29
  });
@@ -33,15 +35,38 @@ export class TurboUnauthenticatedPaymentService {
33
35
  const wincCostsForBytes = await Promise.all(fetchPricePromises);
34
36
  return wincCostsForBytes;
35
37
  }
36
- async getWincForFiat({ amount, currency }) {
38
+ getWincForFiat({ amount, }) {
39
+ const { amount: paymentAmount, type: currencyType } = amount;
37
40
  return this.httpService.get({
38
- endpoint: `/price/${currency}/${amount}`,
41
+ endpoint: `/price/${currencyType}/${paymentAmount}`,
39
42
  });
40
43
  }
44
+ appendPromoCodesToQuery(promoCodes) {
45
+ const promoCodesQuery = promoCodes.join(',');
46
+ return promoCodesQuery ? `?promoCode=${promoCodesQuery}` : '';
47
+ }
48
+ async getCheckout({ amount, owner, promoCodes = [] }, headers) {
49
+ const { amount: paymentAmount, type: currencyType } = amount;
50
+ const endpoint = `/top-up/checkout-session/${owner}/${currencyType}/${paymentAmount}${this.appendPromoCodesToQuery(promoCodes)}`;
51
+ const { adjustments, paymentSession, topUpQuote } = await this.httpService.get({
52
+ endpoint,
53
+ headers,
54
+ });
55
+ return {
56
+ winc: topUpQuote.winstonCreditAmount,
57
+ adjustments,
58
+ url: paymentSession.url,
59
+ paymentAmount: topUpQuote.paymentAmount,
60
+ quotedPaymentAmount: topUpQuote.quotedPaymentAmount,
61
+ };
62
+ }
63
+ createCheckoutSession(params) {
64
+ return this.getCheckout(params);
65
+ }
41
66
  }
42
67
  // NOTE: to avoid redundancy, we use inheritance here - but generally prefer composition over inheritance
43
68
  export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymentService {
44
- constructor({ url = 'https://payment.ardrive.dev', retryConfig, signer, }) {
69
+ constructor({ url = defaultPaymentServiceURL, retryConfig, signer, }) {
45
70
  super({ url, retryConfig });
46
71
  this.signer = signer;
47
72
  }
@@ -55,4 +80,13 @@ export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymen
55
80
  // 404's don't return a balance, so default to 0
56
81
  return balance.winc ? balance : { winc: '0' };
57
82
  }
83
+ async getWincForFiat({ amount, promoCodes = [], }) {
84
+ return this.httpService.get({
85
+ endpoint: `/price/${amount.type}/${amount.amount}${this.appendPromoCodesToQuery(promoCodes)}`,
86
+ headers: await this.signer.generateSignedRequestHeaders(),
87
+ });
88
+ }
89
+ async createCheckoutSession(params) {
90
+ return this.getCheckout(params, await this.signer.generateSignedRequestHeaders());
91
+ }
58
92
  }
@@ -8,7 +8,7 @@ export class TurboUnauthenticatedClient {
8
8
  /**
9
9
  * Returns the supported fiat currency conversion rate for 1AR based on current market prices.
10
10
  */
11
- async getFiatToAR({ currency, }) {
11
+ getFiatToAR({ currency, }) {
12
12
  return this.paymentService.getFiatToAR({ currency });
13
13
  }
14
14
  /**
@@ -17,43 +17,49 @@ export class TurboUnauthenticatedClient {
17
17
  * Note: this does not take into account varying adjustments and promotions for different sizes of data. If you want to calculate the total
18
18
  * cost in 'winc' for a given number of bytes, use getUploadCosts.
19
19
  */
20
- async getFiatRates() {
20
+ getFiatRates() {
21
21
  return this.paymentService.getFiatRates();
22
22
  }
23
23
  /**
24
24
  * Returns a comprehensive list of supported countries that can purchase credits through the Turbo Payment Service.
25
25
  */
26
- async getSupportedCountries() {
26
+ getSupportedCountries() {
27
27
  return this.paymentService.getSupportedCountries();
28
28
  }
29
29
  /**
30
30
  * Returns a list of all supported fiat currencies.
31
31
  */
32
- async getSupportedCurrencies() {
32
+ getSupportedCurrencies() {
33
33
  return this.paymentService.getSupportedCurrencies();
34
34
  }
35
35
  /**
36
36
  * Determines the price in 'winc' to upload one data item of a specific size in bytes, including all Turbo cost adjustments and fees.
37
37
  */
38
- async getUploadCosts({ bytes, }) {
38
+ getUploadCosts({ bytes, }) {
39
39
  return this.paymentService.getUploadCosts({ bytes });
40
40
  }
41
41
  /**
42
42
  * Determines the amount of 'winc' that would be returned for a given currency and amount, including all Turbo cost adjustments and fees.
43
43
  */
44
- async getWincForFiat({ amount, currency, }) {
45
- return this.paymentService.getWincForFiat({ amount, currency });
44
+ getWincForFiat(params) {
45
+ return this.paymentService.getWincForFiat(params);
46
46
  }
47
47
  /**
48
48
  * Uploads a signed data item to the Turbo Upload Service.
49
49
  */
50
- async uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal, }) {
50
+ uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal, }) {
51
51
  return this.uploadService.uploadSignedDataItem({
52
52
  dataItemStreamFactory,
53
53
  dataItemSizeFactory,
54
54
  signal,
55
55
  });
56
56
  }
57
+ /**
58
+ * Creates a Turbo Checkout Session for a given amount and currency.
59
+ */
60
+ createCheckoutSession(params) {
61
+ return this.paymentService.createCheckoutSession(params);
62
+ }
57
63
  }
58
64
  export class TurboAuthenticatedClient extends TurboUnauthenticatedClient {
59
65
  constructor({ paymentService, uploadService, }) {
@@ -62,13 +68,13 @@ export class TurboAuthenticatedClient extends TurboUnauthenticatedClient {
62
68
  /**
63
69
  * Returns the current balance of the user's wallet in 'winc'.
64
70
  */
65
- async getBalance() {
71
+ getBalance() {
66
72
  return this.paymentService.getBalance();
67
73
  }
68
74
  /**
69
75
  * Signs and uploads raw data to the Turbo Upload Service.
70
76
  */
71
- async uploadFile({ fileStreamFactory, fileSizeFactory, signal, }) {
77
+ uploadFile({ fileStreamFactory, fileSizeFactory, signal, }) {
72
78
  return this.uploadService.uploadFile({
73
79
  fileStreamFactory,
74
80
  fileSizeFactory,
@@ -1,6 +1,8 @@
1
1
  import { TurboHTTPService } from './http.js';
2
+ export const defaultUploadServiceURL = 'https://upload.ardrive.io';
3
+ export const developmentUploadServiceURL = 'https://upload.ardrive.dev';
2
4
  export class TurboUnauthenticatedUploadService {
3
- constructor({ url = 'https://upload.ardrive.dev', retryConfig, }) {
5
+ constructor({ url = defaultUploadServiceURL, retryConfig, }) {
4
6
  this.httpService = new TurboHTTPService({
5
7
  url: `${url}/v1`,
6
8
  retryConfig,
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Copyright (C) 2022-2023 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
+ */
17
+ import { Currency } from '../types.js';
18
+ export interface CurrencyMap {
19
+ amount: number;
20
+ type: Currency;
21
+ }
22
+ export declare class ZeroDecimalCurrency implements CurrencyMap {
23
+ readonly amount: number;
24
+ readonly type: Currency;
25
+ constructor(amount: number, type: Currency);
26
+ }
27
+ export declare class TwoDecimalCurrency implements CurrencyMap {
28
+ private a;
29
+ readonly type: Currency;
30
+ constructor(a: number, type: Currency);
31
+ get amount(): number;
32
+ }
33
+ export declare const USD: (usd: number) => TwoDecimalCurrency;
34
+ export declare const EUR: (eur: number) => TwoDecimalCurrency;
35
+ export declare const GBP: (gbp: number) => TwoDecimalCurrency;
36
+ export declare const CAD: (cad: number) => TwoDecimalCurrency;
37
+ export declare const AUD: (aud: number) => TwoDecimalCurrency;
38
+ export declare const INR: (inr: number) => TwoDecimalCurrency;
39
+ export declare const SGD: (sgd: number) => TwoDecimalCurrency;
40
+ export declare const HKD: (hkd: number) => TwoDecimalCurrency;
41
+ export declare const BRL: (brl: number) => TwoDecimalCurrency;
42
+ export declare const JPY: (jpy: number) => ZeroDecimalCurrency;
43
+ //# sourceMappingURL=currency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../../src/common/currency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,qBAAa,mBAAoB,YAAW,WAAW;aAEnC,MAAM,EAAE,MAAM;aACd,IAAI,EAAE,QAAQ;gBADd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,QAAQ;CAEjC;AAED,qBAAa,kBAAmB,YAAW,WAAW;IAElD,OAAO,CAAC,CAAC;aACO,IAAI,EAAE,QAAQ;gBADtB,CAAC,EAAE,MAAM,EACD,IAAI,EAAE,QAAQ;IAGhC,IAAI,MAAM,WAET;CACF;AAGD,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AACvE,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AACvE,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AACvE,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AACvE,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AACvE,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AACvE,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AACvE,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AACvE,eAAO,MAAM,GAAG,QAAS,MAAM,uBAAuC,CAAC;AAGvE,eAAO,MAAM,GAAG,QAAS,MAAM,wBAAwC,CAAC"}
@@ -14,9 +14,31 @@
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 { TurboPublicConfiguration } from '../types.js';
17
+ import { TurboUnauthenticatedConfiguration } from '../types.js';
18
18
  import { TurboUnauthenticatedClient } from './turbo.js';
19
+ /**
20
+ * Testing configuration.
21
+ */
22
+ export declare const developmentTurboConfiguration: {
23
+ paymentServiceConfig: {
24
+ url: string;
25
+ };
26
+ uploadServiceConfig: {
27
+ url: string;
28
+ };
29
+ };
30
+ /**
31
+ * Production configuration.
32
+ */
33
+ export declare const defaultTurboConfiguration: {
34
+ paymentServiceConfig: {
35
+ url: string;
36
+ };
37
+ uploadServiceConfig: {
38
+ url: string;
39
+ };
40
+ };
19
41
  export declare class TurboBaseFactory {
20
- static unauthenticated({ paymentServiceConfig, uploadServiceConfig, }?: TurboPublicConfiguration): TurboUnauthenticatedClient;
42
+ static unauthenticated({ paymentServiceConfig, uploadServiceConfig, }?: TurboUnauthenticatedConfiguration): TurboUnauthenticatedClient;
21
43
  }
22
44
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/common/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAGxD,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,eAAe,CAAC,EACrB,oBAAyB,EACzB,mBAAwB,GACzB,GAAE,wBAA6B;CAYjC"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/common/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAMhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAOxD;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;CAOzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;CAOrC,CAAC;AAEF,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,eAAe,CAAC,EACrB,oBAAyB,EACzB,mBAAwB,GACzB,GAAE,iCAAsC;CAY1C"}
@@ -17,4 +17,5 @@
17
17
  export * from './upload.js';
18
18
  export * from './payment.js';
19
19
  export * from './turbo.js';
20
+ export * from './currency.js';
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
@@ -14,11 +14,13 @@
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 { Currency, TurboAuthenticatedPaymentServiceInterface, TurboAuthenticatedPaymentServiceInterfaceConfiguration, TurboBalanceResponse, TurboCountriesResponse, TurboCurrenciesResponse, TurboFiatToArResponse, TurboPriceResponse, TurboRatesResponse, TurboUnauthenticatedPaymentServiceInterface, TurboUnauthenticatedPaymentServiceInterfaceConfiguration, TurboWalletSigner } from '../types.js';
17
+ import { Currency, TurboAuthenticatedPaymentServiceConfiguration, TurboAuthenticatedPaymentServiceInterface, TurboBalanceResponse, TurboCheckoutSessionParams, TurboCheckoutSessionResponse, TurboCountriesResponse, TurboCurrenciesResponse, TurboFiatToArResponse, TurboPriceResponse, TurboRatesResponse, TurboSignedRequestHeaders, TurboUnauthenticatedPaymentServiceConfiguration, TurboUnauthenticatedPaymentServiceInterface, TurboWalletSigner, TurboWincForFiatParams, TurboWincForFiatResponse } from '../types.js';
18
18
  import { TurboHTTPService } from './http.js';
19
+ export declare const developmentPaymentServiceURL = "https://payment.ardrive.dev";
20
+ export declare const defaultPaymentServiceURL = "https://payment.ardrive.io";
19
21
  export declare class TurboUnauthenticatedPaymentService implements TurboUnauthenticatedPaymentServiceInterface {
20
22
  protected readonly httpService: TurboHTTPService;
21
- constructor({ url, retryConfig, }: TurboUnauthenticatedPaymentServiceInterfaceConfiguration);
23
+ constructor({ url, retryConfig, }: TurboUnauthenticatedPaymentServiceConfiguration);
22
24
  getFiatRates(): Promise<TurboRatesResponse>;
23
25
  getFiatToAR({ currency, }: {
24
26
  currency: Currency;
@@ -28,14 +30,22 @@ export declare class TurboUnauthenticatedPaymentService implements TurboUnauthen
28
30
  getUploadCosts({ bytes, }: {
29
31
  bytes: number[];
30
32
  }): Promise<TurboPriceResponse[]>;
31
- getWincForFiat({ amount, currency }: {
32
- amount: any;
33
- currency: any;
34
- }): Promise<TurboPriceResponse>;
33
+ getWincForFiat({ amount, }: TurboWincForFiatParams): Promise<TurboWincForFiatResponse>;
34
+ protected appendPromoCodesToQuery(promoCodes: string[]): string;
35
+ protected getCheckout({ amount, owner, promoCodes }: TurboCheckoutSessionParams, headers?: TurboSignedRequestHeaders): Promise<{
36
+ winc: string;
37
+ adjustments: import("../types.js").Adjustment[];
38
+ url: string;
39
+ paymentAmount: number;
40
+ quotedPaymentAmount: number;
41
+ }>;
42
+ createCheckoutSession(params: TurboCheckoutSessionParams): Promise<TurboCheckoutSessionResponse>;
35
43
  }
36
44
  export declare class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymentService implements TurboAuthenticatedPaymentServiceInterface {
37
45
  protected readonly signer: TurboWalletSigner;
38
- constructor({ url, retryConfig, signer, }: TurboAuthenticatedPaymentServiceInterfaceConfiguration);
46
+ constructor({ url, retryConfig, signer, }: TurboAuthenticatedPaymentServiceConfiguration);
39
47
  getBalance(): Promise<TurboBalanceResponse>;
48
+ getWincForFiat({ amount, promoCodes, }: TurboWincForFiatParams): Promise<TurboWincForFiatResponse>;
49
+ createCheckoutSession(params: TurboCheckoutSessionParams): Promise<TurboCheckoutSessionResponse>;
40
50
  }
41
51
  //# sourceMappingURL=payment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/common/payment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,QAAQ,EACR,yCAAyC,EACzC,sDAAsD,EACtD,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,2CAA2C,EAC3C,wDAAwD,EACxD,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB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AAU,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;CAMzC"}
@@ -14,11 +14,11 @@
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 { Currency, TurboAbortSignal, TurboAuthenticatedClientInterface, TurboAuthenticatedPaymentServiceInterface, TurboAuthenticatedUploadServiceInterface, TurboBalanceResponse, TurboCountriesResponse, TurboCurrenciesResponse, TurboFiatToArResponse, TurboFileFactory, TurboPriceResponse, TurboPrivateClientConfiguration, TurboPublicClientConfiguration, TurboRatesResponse, TurboSignedDataItemFactory, TurboUnauthenticatedClientInterface, TurboUnauthenticatedPaymentServiceInterface, TurboUnauthenticatedUploadServiceInterface, TurboUploadDataItemResponse } from '../types.js';
17
+ import { Currency, TurboAbortSignal, TurboAuthenticatedClientConfiguration, TurboAuthenticatedClientInterface, TurboAuthenticatedPaymentServiceInterface, TurboAuthenticatedUploadServiceInterface, TurboBalanceResponse, TurboCheckoutSessionParams, TurboCheckoutSessionResponse, TurboCountriesResponse, TurboCurrenciesResponse, TurboFiatToArResponse, TurboFileFactory, TurboPriceResponse, TurboRatesResponse, TurboSignedDataItemFactory, TurboUnauthenticatedClientConfiguration, TurboUnauthenticatedClientInterface, TurboUnauthenticatedPaymentServiceInterface, TurboUnauthenticatedUploadServiceInterface, TurboUploadDataItemResponse, TurboWincForFiatParams, TurboWincForFiatResponse } from '../types.js';
18
18
  export declare class TurboUnauthenticatedClient implements TurboUnauthenticatedClientInterface {
19
19
  protected paymentService: TurboUnauthenticatedPaymentServiceInterface;
20
20
  protected uploadService: TurboUnauthenticatedUploadServiceInterface;
21
- constructor({ uploadService, paymentService, }: TurboPublicClientConfiguration);
21
+ constructor({ uploadService, paymentService, }: TurboUnauthenticatedClientConfiguration);
22
22
  /**
23
23
  * Returns the supported fiat currency conversion rate for 1AR based on current market prices.
24
24
  */
@@ -49,19 +49,20 @@ export declare class TurboUnauthenticatedClient implements TurboUnauthenticatedC
49
49
  /**
50
50
  * Determines the amount of 'winc' that would be returned for a given currency and amount, including all Turbo cost adjustments and fees.
51
51
  */
52
- getWincForFiat({ amount, currency, }: {
53
- amount: number;
54
- currency: Currency;
55
- }): Promise<Omit<TurboPriceResponse, 'adjustments'>>;
52
+ getWincForFiat(params: TurboWincForFiatParams): Promise<TurboWincForFiatResponse>;
56
53
  /**
57
54
  * Uploads a signed data item to the Turbo Upload Service.
58
55
  */
59
56
  uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal, }: TurboSignedDataItemFactory & TurboAbortSignal): Promise<TurboUploadDataItemResponse>;
57
+ /**
58
+ * Creates a Turbo Checkout Session for a given amount and currency.
59
+ */
60
+ createCheckoutSession(params: TurboCheckoutSessionParams): Promise<TurboCheckoutSessionResponse>;
60
61
  }
61
62
  export declare class TurboAuthenticatedClient extends TurboUnauthenticatedClient implements TurboAuthenticatedClientInterface {
62
63
  protected paymentService: TurboAuthenticatedPaymentServiceInterface;
63
64
  protected uploadService: TurboAuthenticatedUploadServiceInterface;
64
- constructor({ paymentService, uploadService, }: TurboPrivateClientConfiguration);
65
+ constructor({ paymentService, uploadService, }: TurboAuthenticatedClientConfiguration);
65
66
  /**
66
67
  * Returns the current balance of the user's wallet in 'winc'.
67
68
  */
@@ -1 +1 @@
1
- {"version":3,"file":"turbo.d.ts","sourceRoot":"","sources":["../../../src/common/turbo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,iCAAiC,EACjC,yCAAyC,EACzC,wCAAwC,EACxC,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,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IAI1D;;OAEG;IACH,cAAc,CAAC,EACb,KAAK,GACN,EAAE;QACD,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAIjC;;OAEG;IACH,cAAc,CACZ,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;OAEG;IACH,oBAAoB,CAAC,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,MAAM,GACP,EAAE,0BAA0B,GAC3B,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAQzD;;OAEG;IACH,qBAAqB,CACnB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,4BAA4B,CAAC;CAGzC;AAED,qBAAa,wBACX,SAAQ,0BACR,YAAW,iCAAiC;IAG5C,SAAS,CAAC,cAAc,EAAE,yCAAyC,CAAC;IACpE,SAAS,CAAC,aAAa,EAAE,wCAAwC,CAAC;gBAEtD,EACV,cAAc,EACd,aAAa,GACd,EAAE,qCAAqC;IAIxC;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAI3C;;OAEG;IACH,UAAU,CAAC,EACT,iBAAiB,EACjB,eAAe,EACf,MAAM,GACP,EAAE,gBAAgB,GACjB,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAO1D"}
@@ -14,11 +14,13 @@
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 { TurboAbortSignal, TurboAuthenticatedUploadServiceConfiguration, TurboAuthenticatedUploadServiceInterface, TurboFileFactory, TurboSignedDataItemFactory, TurboUnauthenticatedUploadServiceInterface, TurboUnauthenticatedUploadServiceInterfaceConfiguration, TurboUploadDataItemResponse, TurboWalletSigner } from '../types.js';
17
+ import { TurboAbortSignal, TurboAuthenticatedUploadServiceConfiguration, TurboAuthenticatedUploadServiceInterface, TurboFileFactory, TurboSignedDataItemFactory, TurboUnauthenticatedUploadServiceConfiguration, TurboUnauthenticatedUploadServiceInterface, TurboUploadDataItemResponse, TurboWalletSigner } from '../types.js';
18
18
  import { TurboHTTPService } from './http.js';
19
+ export declare const defaultUploadServiceURL = "https://upload.ardrive.io";
20
+ export declare const developmentUploadServiceURL = "https://upload.ardrive.dev";
19
21
  export declare class TurboUnauthenticatedUploadService implements TurboUnauthenticatedUploadServiceInterface {
20
22
  protected httpService: TurboHTTPService;
21
- constructor({ url, retryConfig, }: TurboUnauthenticatedUploadServiceInterfaceConfiguration);
23
+ constructor({ url, retryConfig, }: TurboUnauthenticatedUploadServiceConfiguration);
22
24
  uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal, }: TurboSignedDataItemFactory & TurboAbortSignal): Promise<TurboUploadDataItemResponse>;
23
25
  }
24
26
  export declare class TurboAuthenticatedUploadService extends TurboUnauthenticatedUploadService implements TurboAuthenticatedUploadServiceInterface {
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/common/upload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,gBAAgB,EAChB,4CAA4C,EAC5C,wCAAwC,EACxC,gBAAgB,EAChB,0BAA0B,EAC1B,0CAA0C,EAC1C,uDAAuD,EACvD,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,qBAAa,iCACX,YAAW,0CAA0C;IAErD,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAAC;gBAE5B,EACV,GAAkC,EAClC,WAAW,GACZ,EAAE,uDAAuD;IAOpD,oBAAoB,CAAC,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,MAAM,GACP,EAAE,0BAA0B,GAC3B,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAa1D;AAGD,qBAAa,+BACX,SAAQ,iCACR,YAAW,wCAAwC;IAEnD,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;gBAExB,EACV,GAAkC,EAClC,WAAW,EACX,MAAM,GACP,EAAE,4CAA4C;IAKzC,UAAU,CAAC,EACf,iBAAiB,EACjB,eAAe,EACf,MAAM,GACP,EAAE,gBAAgB,GACjB,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAmB1D"}
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/common/upload.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,gBAAgB,EAChB,4CAA4C,EAC5C,wCAAwC,EACxC,gBAAgB,EAChB,0BAA0B,EAC1B,8CAA8C,EAC9C,0CAA0C,EAC1C,2BAA2B,EAC3B,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AACnE,eAAO,MAAM,2BAA2B,+BAA+B,CAAC;AAExE,qBAAa,iCACX,YAAW,0CAA0C;IAErD,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAAC;gBAE5B,EACV,GAA6B,EAC7B,WAAW,GACZ,EAAE,8CAA8C;IAO3C,oBAAoB,CAAC,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,MAAM,GACP,EAAE,0BAA0B,GAC3B,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAa1D;AAGD,qBAAa,+BACX,SAAQ,iCACR,YAAW,wCAAwC;IAEnD,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;gBAExB,EACV,GAAkC,EAClC,WAAW,EACX,MAAM,GACP,EAAE,4CAA4C;IAKzC,UAAU,CAAC,EACf,iBAAiB,EACjB,eAAe,EACf,MAAM,GACP,EAAE,gBAAgB,GACjB,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAmB1D"}
@@ -16,8 +16,8 @@
16
16
  */
17
17
  import { TurboBaseFactory } from '../common/factory.js';
18
18
  import { TurboAuthenticatedClient } from '../common/index.js';
19
- import { TurboPrivateConfiguration } from '../types.js';
19
+ import { TurboAuthenticatedConfiguration } from '../types.js';
20
20
  export declare class TurboFactory extends TurboBaseFactory {
21
- static authenticated({ privateKey, paymentServiceConfig, uploadServiceConfig, }: TurboPrivateConfiguration): TurboAuthenticatedClient;
21
+ static authenticated({ privateKey, paymentServiceConfig, uploadServiceConfig, }: TurboAuthenticatedConfiguration): TurboAuthenticatedClient;
22
22
  }
23
23
  //# sourceMappingURL=factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/node/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,wBAAwB,EAGzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGxD,qBAAa,YAAa,SAAQ,gBAAgB;IAChD,MAAM,CAAC,aAAa,CAAC,EACnB,UAAU,EACV,oBAAyB,EACzB,mBAAwB,GACzB,EAAE,yBAAyB;CAe7B"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/node/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,wBAAwB,EAGzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAG9D,qBAAa,YAAa,SAAQ,gBAAgB;IAChD,MAAM,CAAC,aAAa,CAAC,EACnB,UAAU,EACV,oBAAyB,EACzB,mBAAwB,GACzB,EAAE,+BAA+B;CAenC"}