@ardrive/turbo-sdk 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +242 -179
- package/bundles/web.bundle.min.js +7 -2
- package/lib/cjs/common/payment.js +4 -1
- package/lib/cjs/types.js +3 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/payment.js +4 -1
- package/lib/esm/types.js +2 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/common/payment.d.ts +2 -2
- package/lib/types/common/payment.d.ts.map +1 -1
- package/lib/types/types.d.ts +4 -2
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/lib/types/version.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -9,28 +9,31 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
|
|
9
9
|
- [Installation](#installation)
|
10
10
|
- [Quick Start](#quick-start)
|
11
11
|
- [Usage](#usage)
|
12
|
-
- [
|
13
|
-
|
14
|
-
- [ESM](#esm)
|
15
|
-
- [Web Environments](#web)
|
16
|
-
- [Bundlers (Webpack, Rollup, ESbuild, etc.)](#bundlers-webpack-rollup-esbuild-etc)
|
17
|
-
- [Browser](#browser)
|
12
|
+
- [Web](#web)
|
13
|
+
- [NodeJS](#nodejs)
|
18
14
|
- [Typescript](#typescript)
|
15
|
+
- [Examples](#examples)
|
19
16
|
- [APIs](#apis)
|
20
17
|
- [TurboFactory](#turbofactory)
|
18
|
+
- [`unauthenticated()`](#unauthenticated)
|
19
|
+
- [`authenticated()`](#authenticated)
|
21
20
|
- [TurboUnauthenticatedClient](#turbounauthenticatedclient)
|
21
|
+
- [`getSupportedCurrencies()`](#getsupportedcurrencies)
|
22
|
+
- [`getSupportedCountries()`](#getsupportedcountries)
|
23
|
+
- [`getFiatToAR({ currency })`](#getfiattoar-currency-)
|
24
|
+
- [`getFiatRates()`](#getfiatrates)
|
25
|
+
- [`getWincForFiat({ amount })`](#getwincforfiat-amount-)
|
26
|
+
- [`getUploadCosts({ bytes })`](#getuploadcosts-bytes-)
|
27
|
+
- [`uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal })`](#uploadsigneddataitem-dataitemstreamfactory-dataitemsizefactory-signal-)
|
28
|
+
- [`createCheckoutSession({ amount, owner })`](#createcheckoutsession-amount-owner-)
|
29
|
+
- [`submitFundTransaction({ txId })`](#submitfundtransaction-txid-)
|
22
30
|
- [TurboAuthenticatedClient](#turboauthenticatedclient)
|
23
|
-
- [
|
24
|
-
|
25
|
-
|
26
|
-
|
31
|
+
- [`getBalance()`](#getbalance)
|
32
|
+
- [`getWincForFiat({ amount, promoCodes })`](#getwincforfiat-amount-promocodes-)
|
33
|
+
- [`createCheckoutSession({ amount, owner, promoCodes })`](#createcheckoutsession-amount-owner-promocodes-)
|
34
|
+
- [`uploadFile({ fileStreamFactory, fileSizeFactory, signal, dataItemOpts })`](#uploadfile-filestreamfactory-filesizefactory-signal-dataitemopts-)
|
35
|
+
- [`topUpWithTokens({ tokenAmount, feeMultiplier })`](#topupwithtokens-tokenamount-feemultiplier-)
|
27
36
|
- [Developers](#developers)
|
28
|
-
- [Requirements](#requirements)
|
29
|
-
- [Setup & Build](#setup--build)
|
30
|
-
- [Testing](#testing)
|
31
|
-
- [Linting and Formatting](#linting--formatting)
|
32
|
-
- [Architecture](#architecture)
|
33
|
-
- [Contributing](./CONTRIBUTING.md)
|
34
37
|
|
35
38
|
## Installation
|
36
39
|
|
@@ -156,198 +159,258 @@ import { TurboFactory } from '@ardrive/turbo-sdk/<node/web>';
|
|
156
159
|
|
157
160
|
Types are exported from `./lib/types/[node/web]/index.d.ts` and should be automatically recognized, offering benefits such as type-checking and autocompletion.
|
158
161
|
|
162
|
+
### Examples
|
163
|
+
|
164
|
+
Examples are available in the [examples] directory. To run examples:
|
165
|
+
|
166
|
+
- `yarn example:web` - opens up the example web page
|
167
|
+
- `yarn example:cjs` - runs example CJS node script
|
168
|
+
- `yarn example:esm` - runs example ESM node script
|
169
|
+
|
159
170
|
## APIs
|
160
171
|
|
161
172
|
### TurboFactory
|
162
173
|
|
163
|
-
|
174
|
+
#### `unauthenticated()`
|
164
175
|
|
165
|
-
|
166
|
-
const turbo = TurboFactory.unauthenticated();
|
167
|
-
```
|
176
|
+
Creates an instance of a client that accesses Turbo's unauthenticated services.
|
168
177
|
|
169
|
-
|
178
|
+
```typescript
|
179
|
+
const turbo = TurboFactory.unauthenticated();
|
180
|
+
```
|
170
181
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
182
|
+
#### `authenticated()`
|
183
|
+
|
184
|
+
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
|
+
|
186
|
+
```typescript
|
187
|
+
const jwk = await arweave.crypto.generateJWK();
|
188
|
+
const turbo = TurboFactory.authenticated({ privateKey: jwk });
|
189
|
+
```
|
175
190
|
|
176
|
-
|
191
|
+
or
|
177
192
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
193
|
+
```typescript
|
194
|
+
const signer = new ArweaveSigner(jwk);
|
195
|
+
const turbo = TurboFactory.authenticated({ signer });
|
196
|
+
```
|
182
197
|
|
183
198
|
### TurboUnauthenticatedClient
|
184
199
|
|
185
|
-
|
200
|
+
#### `getSupportedCurrencies()`
|
186
201
|
|
187
|
-
|
188
|
-
const currencies = await turbo.getSupportedCurrencies();
|
189
|
-
```
|
202
|
+
Returns the list of currencies supported by the Turbo Payment Service for topping up a user balance of AR Credits (measured in Winston Credits, or winc).
|
190
203
|
|
191
|
-
|
204
|
+
```typescript
|
205
|
+
const currencies = await turbo.getSupportedCurrencies();
|
206
|
+
```
|
207
|
+
|
208
|
+
#### `getSupportedCountries()`
|
192
209
|
|
193
|
-
|
194
|
-
const countries = await turbo.getSupportedCountries();
|
195
|
-
```
|
210
|
+
Returns the list of countries supported by the Turbo Payment Service's top up workflow.
|
196
211
|
|
197
|
-
|
212
|
+
```typescript
|
213
|
+
const countries = await turbo.getSupportedCountries();
|
214
|
+
```
|
198
215
|
|
199
|
-
|
200
|
-
const fiatToAR = await turbo.getFiatToAR({ currency: 'USD' });
|
201
|
-
```
|
216
|
+
#### `getFiatToAR({ currency })`
|
202
217
|
|
203
|
-
|
218
|
+
Returns the current raw fiat to AR conversion rate for a specific currency as reported by third-party pricing oracles.
|
204
219
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
- `uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal })` - Uploads a signed data item. The provided `dataItemStreamFactory` should produce a NEW signed data item stream each time is it invoked. The `dataItemSizeFactory` is a function that returns the size of the file. The `signal` is an optional [AbortSignal] that can be used to cancel the upload or timeout the request.
|
227
|
-
|
228
|
-
```typescript
|
229
|
-
const filePath = path.join(__dirname, './my-signed-data-item');
|
230
|
-
const dataItemSize = fs.statSync(filePath).size;
|
231
|
-
const uploadResponse = await turbo.uploadSignedDataItem({
|
232
|
-
dataItemStreamFactory: () => fs.createReadStream(filePath),
|
233
|
-
dataItemSizeFactory: () => dataItemSize,
|
234
|
-
signal: AbortSignal.timeout(10_000), // cancel the upload after 10 seconds
|
220
|
+
```typescript
|
221
|
+
const fiatToAR = await turbo.getFiatToAR({ currency: 'USD' });
|
222
|
+
```
|
223
|
+
|
224
|
+
#### `getFiatRates()`
|
225
|
+
|
226
|
+
Returns the current fiat rates for 1 GiB of data for supported currencies, including all top-up adjustments and fees.
|
227
|
+
|
228
|
+
```typescript
|
229
|
+
const rates = await turbo.getFiatRates();
|
230
|
+
```
|
231
|
+
|
232
|
+
#### `getWincForFiat({ amount })`
|
233
|
+
|
234
|
+
Returns the current amount of Winston Credits including all adjustments for the provided fiat currency, amount. To leverage promo codes, see [TurboAuthenticatedClient].
|
235
|
+
|
236
|
+
```typescript
|
237
|
+
const { winc, paymentAmount, quotedPaymentAmount, adjustments } =
|
238
|
+
await turbo.getWincForFiat({
|
239
|
+
amount: USD(100),
|
240
|
+
// promo codes require an authenticated client
|
235
241
|
});
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
242
|
+
```
|
243
|
+
|
244
|
+
#### `getUploadCosts({ bytes })`
|
245
|
+
|
246
|
+
Returns the estimated cost in Winston Credits for the provided file sizes, including all upload adjustments and fees.
|
247
|
+
|
248
|
+
```typescript
|
249
|
+
const [uploadCostForFile] = await turbo.getUploadCosts({ bytes: [1024] });
|
250
|
+
const { winc, adjustments } = uploadCostForFile;
|
251
|
+
```
|
252
|
+
|
253
|
+
#### `uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal })`
|
254
|
+
|
255
|
+
Uploads a signed data item. The provided `dataItemStreamFactory` should produce a NEW signed data item stream each time is it invoked. The `dataItemSizeFactory` is a function that returns the size of the file. The `signal` is an optional [AbortSignal] that can be used to cancel the upload or timeout the request.
|
256
|
+
|
257
|
+
```typescript
|
258
|
+
const filePath = path.join(__dirname, './my-signed-data-item');
|
259
|
+
const dataItemSize = fs.statSync(filePath).size;
|
260
|
+
const uploadResponse = await turbo.uploadSignedDataItem({
|
261
|
+
dataItemStreamFactory: () => fs.createReadStream(filePath),
|
262
|
+
dataItemSizeFactory: () => dataItemSize,
|
263
|
+
signal: AbortSignal.timeout(10_000), // cancel the upload after 10 seconds
|
264
|
+
});
|
265
|
+
```
|
266
|
+
|
267
|
+
#### `createCheckoutSession({ amount, owner })`
|
268
|
+
|
269
|
+
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].
|
270
|
+
|
271
|
+
```typescript
|
272
|
+
const { url, winc, paymentAmount, quotedPaymentAmount, adjustments } =
|
273
|
+
await turbo.createCheckoutSession({
|
274
|
+
amount: USD(10.0), // $10.00 USD
|
275
|
+
owner: publicArweaveAddress,
|
276
|
+
// promo codes require an authenticated client
|
269
277
|
});
|
270
|
-
|
278
|
+
|
279
|
+
// Open checkout session in a browser
|
280
|
+
if (process.platform === 'darwin') {
|
281
|
+
// macOS
|
282
|
+
exec(`open ${url}`);
|
283
|
+
} else if (process.platform === 'win32') {
|
284
|
+
// Windows
|
285
|
+
exec(`start "" "${url}"`, { shell: true });
|
286
|
+
} else {
|
287
|
+
// Linux/Unix
|
288
|
+
open(url);
|
289
|
+
}
|
290
|
+
```
|
291
|
+
|
292
|
+
##### Top up to ETH or SOL wallets
|
293
|
+
|
294
|
+
```ts
|
295
|
+
const turbo = TurboFactory.unauthenticated({ token: 'ethereum' });
|
296
|
+
|
297
|
+
const { url, winc, paymentAmount } = await turbo.createCheckoutSession({
|
298
|
+
amount: USD(10.0), // $10.00 USD
|
299
|
+
owner: publicEthereumAddress,
|
300
|
+
});
|
301
|
+
```
|
302
|
+
|
303
|
+
```ts
|
304
|
+
const turbo = TurboFactory.unauthenticated({ token: 'solana' });
|
305
|
+
|
306
|
+
const { url, winc, paymentAmount } = await turbo.createCheckoutSession({
|
307
|
+
amount: USD(10.0), // $10.00 USD
|
308
|
+
owner: publicSolanaAddress,
|
309
|
+
});
|
310
|
+
```
|
311
|
+
|
312
|
+
#### `submitFundTransaction({ txId })`
|
313
|
+
|
314
|
+
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.
|
315
|
+
|
316
|
+
- 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
|
317
|
+
|
318
|
+
```typescript
|
319
|
+
const turbo = TurboFactory.unauthenticated(); // defaults to arweave token type
|
320
|
+
const { status, id, ...fundResult } = await turbo.submitFundTransaction({
|
321
|
+
txId: 'my-valid-arweave-fund-transaction-id',
|
322
|
+
});
|
323
|
+
```
|
271
324
|
|
272
325
|
### TurboAuthenticatedClient
|
273
326
|
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
amount: USD(100),
|
286
|
-
promoCodes: ['MY_PROMO_CODE'], // promo codes require an authenticated client
|
287
|
-
});
|
288
|
-
```
|
289
|
-
|
290
|
-
- `createCheckoutSession({ amount, owner, promoCodes })` - Creates a Stripe checkout session for a Turbo Top Up with the provided amount, currency, owner, and optional promo codes. The returned URL can be opened in the browser, all payments are processed by Stripe. Promo codes require an authenticated client.
|
291
|
-
|
292
|
-
```typescript
|
293
|
-
const { url, winc, paymentAmount, quotedPaymentAmount, adjustments } =
|
294
|
-
await turbo.createCheckoutSession({
|
295
|
-
amount: USD(10.0), // $10.00 USD
|
296
|
-
owner: publicArweaveAddress,
|
297
|
-
promoCodes: ['MY_PROMO_CODE'], // promo codes require an authenticated client
|
298
|
-
});
|
299
|
-
|
300
|
-
// Open checkout session in a browser
|
301
|
-
if (process.platform === 'darwin') {
|
302
|
-
// macOS
|
303
|
-
exec(`open ${url}`);
|
304
|
-
} else if (process.platform === 'win32') {
|
305
|
-
// Windows
|
306
|
-
exec(`start "" "${url}"`, { shell: true });
|
307
|
-
} else {
|
308
|
-
// Linux/Unix
|
309
|
-
open(url);
|
310
|
-
}
|
311
|
-
```
|
312
|
-
|
313
|
-
- `uploadFile({ fileStreamFactory, fileSizeFactory, signal, dataItemOpts })` - Signs and uploads a raw file. The provided `fileStreamFactory` should produce a NEW file data stream each time is it invoked. The `fileSizeFactory` is a function that returns the size of the file. The `signal` is an optional [AbortSignal] that can be used to cancel the upload or timeout the request. `dataItemOpts` is an optional object that can be used to configure tags, target, and anchor for the data item upload.
|
314
|
-
|
315
|
-
```typescript
|
316
|
-
const filePath = path.join(__dirname, './my-unsigned-file.txt');
|
317
|
-
const fileSize = fs.stateSync(filePath).size;
|
318
|
-
const uploadResult = await turbo.uploadFile({
|
319
|
-
fileStreamFactory: () => fs.createReadStream(filePath),
|
320
|
-
fileSizeFactory: () => fileSize,
|
321
|
-
dataItemOpts: {
|
322
|
-
// optional
|
323
|
-
tags: [
|
324
|
-
{
|
325
|
-
name: 'Content-Type',
|
326
|
-
value: 'text/plain',
|
327
|
-
},
|
328
|
-
{
|
329
|
-
name: 'My-Custom-Tag',
|
330
|
-
value: 'my-custom-value',
|
331
|
-
},
|
332
|
-
],
|
333
|
-
// no timeout or AbortSignal provided
|
334
|
-
},
|
335
|
-
});
|
336
|
-
```
|
327
|
+
#### `getBalance()`
|
328
|
+
|
329
|
+
Issues a signed request to get the credit balance of a wallet measured in AR (measured in Winston Credits, or winc).
|
330
|
+
|
331
|
+
```typescript
|
332
|
+
const { winc: balance } = await turbo.getBalance();
|
333
|
+
```
|
334
|
+
|
335
|
+
#### `getWincForFiat({ amount, promoCodes })`
|
336
|
+
|
337
|
+
Returns the current amount of Winston Credits including all adjustments for the provided fiat currency, amount, and optional promo codes.
|
337
338
|
|
338
|
-
|
339
|
+
```typescript
|
340
|
+
const { winc, paymentAmount, quotedPaymentAmount, adjustments } =
|
341
|
+
await turbo.getWincForFiat({
|
342
|
+
amount: USD(100),
|
343
|
+
promoCodes: ['MY_PROMO_CODE'], // promo codes require an authenticated client
|
344
|
+
});
|
345
|
+
```
|
339
346
|
|
340
|
-
|
341
|
-
- The `feeMultiplier` (optional) is the multiplier to apply to the reward for the transaction to modify its chances of being mined. Credits will be added to the wallet balance after the transaction is confirmed on the given blockchain. Defaults to 1.0, meaning no multiplier.
|
347
|
+
#### `createCheckoutSession({ amount, owner, promoCodes })`
|
342
348
|
|
343
|
-
|
344
|
-
const turbo = TurboFactory.authenticated({ signer, token: 'arweave' });
|
349
|
+
Creates a Stripe checkout session for a Turbo Top Up with the provided amount, currency, owner, and optional promo codes. The returned URL can be opened in the browser, all payments are processed by Stripe. Promo codes require an authenticated client.
|
345
350
|
|
346
|
-
|
347
|
-
|
348
|
-
|
351
|
+
```typescript
|
352
|
+
const { url, winc, paymentAmount, quotedPaymentAmount, adjustments } =
|
353
|
+
await turbo.createCheckoutSession({
|
354
|
+
amount: USD(10.0), // $10.00 USD
|
355
|
+
owner: publicArweaveAddress,
|
356
|
+
promoCodes: ['MY_PROMO_CODE'], // promo codes require an authenticated client
|
349
357
|
});
|
350
|
-
|
358
|
+
|
359
|
+
// Open checkout session in a browser
|
360
|
+
if (process.platform === 'darwin') {
|
361
|
+
// macOS
|
362
|
+
exec(`open ${url}`);
|
363
|
+
} else if (process.platform === 'win32') {
|
364
|
+
// Windows
|
365
|
+
exec(`start "" "${url}"`, { shell: true });
|
366
|
+
} else {
|
367
|
+
// Linux/Unix
|
368
|
+
open(url);
|
369
|
+
}
|
370
|
+
```
|
371
|
+
|
372
|
+
#### `uploadFile({ fileStreamFactory, fileSizeFactory, signal, dataItemOpts })`
|
373
|
+
|
374
|
+
Signs and uploads a raw file. The provided `fileStreamFactory` should produce a NEW file data stream each time is it invoked. The `fileSizeFactory` is a function that returns the size of the file. The `signal` is an optional [AbortSignal] that can be used to cancel the upload or timeout the request. `dataItemOpts` is an optional object that can be used to configure tags, target, and anchor for the data item upload.
|
375
|
+
|
376
|
+
```typescript
|
377
|
+
const filePath = path.join(__dirname, './my-unsigned-file.txt');
|
378
|
+
const fileSize = fs.stateSync(filePath).size;
|
379
|
+
const uploadResult = await turbo.uploadFile({
|
380
|
+
fileStreamFactory: () => fs.createReadStream(filePath),
|
381
|
+
fileSizeFactory: () => fileSize,
|
382
|
+
dataItemOpts: {
|
383
|
+
// optional
|
384
|
+
tags: [
|
385
|
+
{
|
386
|
+
name: 'Content-Type',
|
387
|
+
value: 'text/plain',
|
388
|
+
},
|
389
|
+
{
|
390
|
+
name: 'My-Custom-Tag',
|
391
|
+
value: 'my-custom-value',
|
392
|
+
},
|
393
|
+
],
|
394
|
+
// no timeout or AbortSignal provided
|
395
|
+
},
|
396
|
+
});
|
397
|
+
```
|
398
|
+
|
399
|
+
#### `topUpWithTokens({ tokenAmount, feeMultiplier })`
|
400
|
+
|
401
|
+
Tops up the connected wallet with Credits by submitting a payment transaction for the token amount to the Turbo wallet and then submitting that transaction id to Turbo Payment Service for top up processing.
|
402
|
+
|
403
|
+
- The `tokenAmount` is the amount of tokens in the token type's smallest unit value (e.g: Winston for arweave token type) to fund the wallet with.
|
404
|
+
- The `feeMultiplier` (optional) is the multiplier to apply to the reward for the transaction to modify its chances of being mined. Credits will be added to the wallet balance after the transaction is confirmed on the given blockchain. Defaults to 1.0, meaning no multiplier.
|
405
|
+
|
406
|
+
```typescript
|
407
|
+
const turbo = TurboFactory.authenticated({ signer, token: 'arweave' });
|
408
|
+
|
409
|
+
const { winc, status, id, ...fundResult } = await turbo.topUpWithTokens({
|
410
|
+
tokenAmount: WinstonToTokenAmount(100_000_000), // 0.0001 AR
|
411
|
+
feeMultiplier: 1.1, // 10% increase in reward for improved mining chances
|
412
|
+
});
|
413
|
+
```
|
351
414
|
|
352
415
|
## Developers
|
353
416
|
|
@@ -130843,7 +130843,7 @@ var import_winston = __toESM(require_winston(), 1);
|
|
130843
130843
|
init_dirname();
|
130844
130844
|
init_buffer2();
|
130845
130845
|
init_process2();
|
130846
|
-
var version21 = "1.5.0
|
130846
|
+
var version21 = "1.5.0";
|
130847
130847
|
|
130848
130848
|
// src/common/logger.ts
|
130849
130849
|
var TurboWinstonLogger = class {
|
@@ -139243,7 +139243,7 @@ var TurboUnauthenticatedPaymentService = class {
|
|
139243
139243
|
uiMode = "hosted"
|
139244
139244
|
}, headers) {
|
139245
139245
|
const { amount: paymentAmount, type: currencyType } = amount;
|
139246
|
-
const endpoint = `/top-up/checkout-session/${owner}/${currencyType}/${paymentAmount}?uiMode=${uiMode}${promoCodes.length > 0 ? `&${this.appendPromoCodesToQuery(promoCodes)}` : ""}`;
|
139246
|
+
const endpoint = `/top-up/checkout-session/${owner}/${currencyType}/${paymentAmount}?uiMode=${uiMode}${promoCodes.length > 0 ? `&${this.appendPromoCodesToQuery(promoCodes)}` : ""}&token=${this.token}`;
|
139247
139247
|
const { adjustments, paymentSession, topUpQuote } = await this.httpService.get({
|
139248
139248
|
endpoint,
|
139249
139249
|
headers
|
@@ -139355,6 +139355,9 @@ var TurboAuthenticatedPaymentService = class extends TurboUnauthenticatedPayment
|
|
139355
139355
|
feeMultiplier = 1,
|
139356
139356
|
tokenAmount: tokenAmountV
|
139357
139357
|
}) {
|
139358
|
+
if (!this.tokenMap[this.token]) {
|
139359
|
+
throw new Error(`Token type not supported for crypto fund ${this.token}`);
|
139360
|
+
}
|
139358
139361
|
const tokenAmount = new BigNumber2(tokenAmountV);
|
139359
139362
|
const target = await this.getTargetWalletForFund();
|
139360
139363
|
this.logger.debug("Funding account...", {
|
@@ -139809,6 +139812,7 @@ var TurboFactory = class extends TurboBaseFactory {
|
|
139809
139812
|
init_dirname();
|
139810
139813
|
init_buffer2();
|
139811
139814
|
init_process2();
|
139815
|
+
var allowedFiatTokens = ["arweave", "solana", "ethereum"];
|
139812
139816
|
var tokenTypes = [
|
139813
139817
|
"arweave"
|
139814
139818
|
/*'solana', 'ethereum'*/
|
@@ -139839,6 +139843,7 @@ export {
|
|
139839
139843
|
USD,
|
139840
139844
|
WinstonToTokenAmount,
|
139841
139845
|
ZeroDecimalCurrency,
|
139846
|
+
allowedFiatTokens,
|
139842
139847
|
defaultPaymentServiceURL,
|
139843
139848
|
defaultTurboConfiguration,
|
139844
139849
|
defaultUploadServiceURL,
|
@@ -74,7 +74,7 @@ class TurboUnauthenticatedPaymentService {
|
|
74
74
|
const { amount: paymentAmount, type: currencyType } = amount;
|
75
75
|
const endpoint = `/top-up/checkout-session/${owner}/${currencyType}/${paymentAmount}?uiMode=${uiMode}${promoCodes.length > 0
|
76
76
|
? `&${this.appendPromoCodesToQuery(promoCodes)}`
|
77
|
-
: ''}`;
|
77
|
+
: ''}&token=${this.token}`;
|
78
78
|
const { adjustments, paymentSession, topUpQuote } = await this.httpService.get({
|
79
79
|
endpoint,
|
80
80
|
headers,
|
@@ -173,6 +173,9 @@ class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymentServic
|
|
173
173
|
return walletAddress;
|
174
174
|
}
|
175
175
|
async topUpWithTokens({ feeMultiplier = 1, tokenAmount: tokenAmountV, }) {
|
176
|
+
if (!this.tokenMap[this.token]) {
|
177
|
+
throw new Error(`Token type not supported for crypto fund ${this.token}`);
|
178
|
+
}
|
176
179
|
const tokenAmount = new bignumber_js_1.BigNumber(tokenAmountV);
|
177
180
|
const target = await this.getTargetWalletForFund();
|
178
181
|
this.logger.debug('Funding account...', {
|
package/lib/cjs/types.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.tokenTypes = void 0;
|
3
|
+
exports.tokenTypes = exports.allowedFiatTokens = void 0;
|
4
|
+
// TODO: Remove this var and Allow all tokens when crypto fund implemented for each PE-5993, PE-5992
|
5
|
+
exports.allowedFiatTokens = ['arweave', 'solana', 'ethereum'];
|
4
6
|
exports.tokenTypes = ['arweave' /*'solana', 'ethereum'*/];
|
package/lib/cjs/version.js
CHANGED
@@ -71,7 +71,7 @@ export class TurboUnauthenticatedPaymentService {
|
|
71
71
|
const { amount: paymentAmount, type: currencyType } = amount;
|
72
72
|
const endpoint = `/top-up/checkout-session/${owner}/${currencyType}/${paymentAmount}?uiMode=${uiMode}${promoCodes.length > 0
|
73
73
|
? `&${this.appendPromoCodesToQuery(promoCodes)}`
|
74
|
-
: ''}`;
|
74
|
+
: ''}&token=${this.token}`;
|
75
75
|
const { adjustments, paymentSession, topUpQuote } = await this.httpService.get({
|
76
76
|
endpoint,
|
77
77
|
headers,
|
@@ -169,6 +169,9 @@ export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymen
|
|
169
169
|
return walletAddress;
|
170
170
|
}
|
171
171
|
async topUpWithTokens({ feeMultiplier = 1, tokenAmount: tokenAmountV, }) {
|
172
|
+
if (!this.tokenMap[this.token]) {
|
173
|
+
throw new Error(`Token type not supported for crypto fund ${this.token}`);
|
174
|
+
}
|
172
175
|
const tokenAmount = new BigNumber(tokenAmountV);
|
173
176
|
const target = await this.getTargetWalletForFund();
|
174
177
|
this.logger.debug('Funding account...', {
|
package/lib/esm/types.js
CHANGED
package/lib/esm/version.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
import { Currency, TokenMap,
|
1
|
+
import { CreditableTokenType, Currency, TokenMap, TurboAuthenticatedPaymentServiceConfiguration, TurboAuthenticatedPaymentServiceInterface, TurboBalanceResponse, TurboCheckoutSessionParams, TurboCheckoutSessionResponse, TurboCountriesResponse, TurboCryptoFundResponse, TurboCurrenciesResponse, TurboDataItemSigner, TurboFiatToArResponse, TurboFundWithTokensParams, TurboLogger, TurboPriceResponse, TurboRatesResponse, TurboSignedRequestHeaders, TurboSubmitFundTxResponse, TurboUnauthenticatedPaymentServiceConfiguration, TurboUnauthenticatedPaymentServiceInterface, TurboWincForFiatParams, TurboWincForFiatResponse } from '../types.js';
|
2
2
|
import { TurboHTTPService } from './http.js';
|
3
3
|
export declare const developmentPaymentServiceURL = "https://payment.ardrive.dev";
|
4
4
|
export declare const defaultPaymentServiceURL = "https://payment.ardrive.io";
|
5
5
|
export declare class TurboUnauthenticatedPaymentService implements TurboUnauthenticatedPaymentServiceInterface {
|
6
6
|
protected readonly httpService: TurboHTTPService;
|
7
7
|
protected logger: TurboLogger;
|
8
|
-
protected readonly token:
|
8
|
+
protected readonly token: CreditableTokenType;
|
9
9
|
constructor({ url, retryConfig, logger, token, }: TurboUnauthenticatedPaymentServiceConfiguration);
|
10
10
|
getFiatRates(): Promise<TurboRatesResponse>;
|
11
11
|
getFiatToAR({ currency, }: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/common/payment.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/common/payment.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EAER,6CAA6C,EAC7C,yCAAyC,EACzC,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EAEzB,WAAW,EAEX,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,+CAA+C,EAC/C,2CAA2C,EAC3C,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAI7C,eAAO,MAAM,4BAA4B,gCAAgC,CAAC;AAC1E,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AAErE,qBAAa,kCACX,YAAW,2CAA2C;IAEtD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACjD,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;gBAElC,EACV,GAA8B,EAC9B,WAAW,EACX,MAAiC,EACjC,KAAiB,GAClB,EAAE,+CAA+C;IAU3C,YAAY,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAM3C,WAAW,CAAC,EACjB,QAAQ,GACT,EAAE;QACD,QAAQ,E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O,CAAC,4BAA4B,CAAC;YAO1B,sBAAsB;IAYvB,eAAe,CAAC,EAC3B,aAAiB,EACjB,WAAW,EAAE,YAAY,GAC1B,EAAE,yBAAyB,GAAG,OAAO,CAAC,uBAAuB,CAAC;CA2ChE"}
|
package/lib/types/types.d.ts
CHANGED
@@ -30,6 +30,8 @@ export type TransactionId = Base64String;
|
|
30
30
|
export type UserAddress = string | PublicArweaveAddress;
|
31
31
|
export type Currency = 'usd' | 'eur' | 'gbp' | 'cad' | 'aud' | 'jpy' | 'inr' | 'sgd' | 'hkd' | 'brl';
|
32
32
|
export type Country = 'United States' | 'United Kingdom' | 'Canada';
|
33
|
+
export declare const allowedFiatTokens: readonly ["arweave", "solana", "ethereum"];
|
34
|
+
export type CreditableTokenType = (typeof allowedFiatTokens)[number];
|
33
35
|
export declare const tokenTypes: readonly ["arweave"];
|
34
36
|
export type TokenType = (typeof tokenTypes)[number];
|
35
37
|
export type TokenMap = {
|
@@ -162,7 +164,7 @@ type TurboServiceConfiguration = {
|
|
162
164
|
url?: string;
|
163
165
|
retryConfig?: IAxiosRetryConfig;
|
164
166
|
logger?: TurboLogger;
|
165
|
-
token?:
|
167
|
+
token?: CreditableTokenType;
|
166
168
|
};
|
167
169
|
export type TurboUnauthenticatedUploadServiceConfiguration = TurboServiceConfiguration;
|
168
170
|
export type TurboAuthenticatedUploadServiceConfiguration = TurboUnauthenticatedUploadServiceConfiguration & TurboAuthConfiguration;
|
@@ -188,7 +190,7 @@ export type TurboAuthenticatedConfiguration = TurboUnauthenticatedConfiguration
|
|
188
190
|
privateKey?: TurboWallet;
|
189
191
|
signer?: TurboSigner;
|
190
192
|
tokenMap?: TokenMap;
|
191
|
-
token?:
|
193
|
+
token?: CreditableTokenType;
|
192
194
|
};
|
193
195
|
export type TurboUnauthenticatedClientConfiguration = {
|
194
196
|
paymentService: TurboUnauthenticatedPaymentServiceInterface;
|
package/lib/types/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,eAAe,EACf,aAAa,EACb,qBAAqB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAChD,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AACzC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,oBAAoB,CAAC;AACxD,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AACV,MAAM,MAAM,OAAO,GAAG,eAAe,GAAG,gBAAgB,GAAG,QAAQ,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,eAAe,EACf,aAAa,EACb,qBAAqB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,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AAC;IACf,WAAW,EAAE,SAAS,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACnD,cAAc,EAAE,CAAC,CAAC,EAAE,mBAAmB,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACvD,QAAQ,EAAE,CAAC,CAAC,EAAE;QAAE,EAAE,EAAE,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,uBAAuB,EAAE,CAAC,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE"}
|
package/lib/types/version.d.ts
CHANGED
@@ -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.5.0
|
17
|
+
export declare const version = "1.5.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,
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,UAAU,CAAC"}
|