@ardrive/turbo-sdk 1.42.0-alpha.11 → 1.42.0-alpha.13
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/lib/cjs/cli/cli.js +31 -0
- package/lib/cjs/cli/commands/arns.js +118 -0
- package/lib/cjs/cli/options.js +78 -1
- package/lib/cjs/common/chunked.js +51 -1
- package/lib/cjs/common/http.js +12 -1
- package/lib/cjs/common/payment.js +27 -6
- package/lib/cjs/common/turbo.js +13 -5
- package/lib/cjs/common/upload.js +23 -12
- package/lib/cjs/types.js +1 -1
- package/lib/esm/cli/cli.js +33 -2
- package/lib/esm/cli/commands/arns.js +111 -0
- package/lib/esm/cli/options.js +77 -0
- package/lib/esm/common/chunked.js +51 -1
- package/lib/esm/common/http.js +12 -1
- package/lib/esm/common/payment.js +27 -6
- package/lib/esm/common/turbo.js +13 -5
- package/lib/esm/common/upload.js +23 -12
- package/lib/esm/types.js +1 -1
- package/lib/types/cli/commands/arns.d.ts +49 -2
- package/lib/types/cli/commands/arns.d.ts.map +1 -1
- package/lib/types/cli/options.d.ts +172 -0
- package/lib/types/cli/options.d.ts.map +1 -1
- package/lib/types/cli/types.d.ts +30 -0
- package/lib/types/cli/types.d.ts.map +1 -1
- package/lib/types/common/chunked.d.ts +47 -2
- package/lib/types/common/chunked.d.ts.map +1 -1
- package/lib/types/common/http.d.ts +11 -1
- package/lib/types/common/http.d.ts.map +1 -1
- package/lib/types/common/payment.d.ts +24 -7
- package/lib/types/common/payment.d.ts.map +1 -1
- package/lib/types/common/turbo.d.ts +12 -6
- package/lib/types/common/turbo.d.ts.map +1 -1
- package/lib/types/common/upload.d.ts.map +1 -1
- package/lib/types/types.d.ts +22 -1
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { BigNumber } from 'bignumber.js';
|
|
17
17
|
import { solanaOwnerSigner } from '../../common/arnsActions.js';
|
|
18
18
|
import { TurboFactory } from '../../node/factory.js';
|
|
19
|
+
import { arNSActions, } from '../../types.js';
|
|
19
20
|
import { FiatPaymentsDisabledError, InsufficientCreditsError, } from '../../utils/errors.js';
|
|
20
21
|
import { wincPerCredit } from '../constants.js';
|
|
21
22
|
import { configFromOptions, turboFromOptions } from '../utils.js';
|
|
@@ -34,6 +35,13 @@ function ownerFromOptions(options) {
|
|
|
34
35
|
}
|
|
35
36
|
return solanaOwnerSigner(options.ownerKey);
|
|
36
37
|
}
|
|
38
|
+
/** The four ARIO-purchase actions are priced via `arnsPrice`, not this route. */
|
|
39
|
+
const ARNS_PURCHASE_ACTIONS = new Set([
|
|
40
|
+
'buy-name',
|
|
41
|
+
'extend-lease',
|
|
42
|
+
'upgrade-name',
|
|
43
|
+
'increase-undername-limit',
|
|
44
|
+
]);
|
|
37
45
|
export function requiredNameFromOptions(options) {
|
|
38
46
|
if (options.name === undefined || options.name.length === 0) {
|
|
39
47
|
throw new Error('Must provide an ArNS --name');
|
|
@@ -56,6 +64,25 @@ export function typeFromOptions(value) {
|
|
|
56
64
|
}
|
|
57
65
|
return value;
|
|
58
66
|
}
|
|
67
|
+
/** Parses `--action` for `arns-action-price`, rejecting the four purchase actions. */
|
|
68
|
+
export function actionFromOptions(options) {
|
|
69
|
+
const { action } = options;
|
|
70
|
+
if (action === undefined || action.length === 0) {
|
|
71
|
+
throw new Error(`Must provide --action. One of: ${arNSActions.join(', ')}`);
|
|
72
|
+
}
|
|
73
|
+
if (!arNSActions.includes(action)) {
|
|
74
|
+
throw new Error(`Invalid --action '${action}'. One of: ${arNSActions.join(', ')}`);
|
|
75
|
+
}
|
|
76
|
+
if (ARNS_PURCHASE_ACTIONS.has(action)) {
|
|
77
|
+
throw new Error(`'${action}' is priced via \`turbo arns-price\`, not \`arns-action-price\` — ` +
|
|
78
|
+
'it spends ARIO, not just the flat credits margin this route quotes.');
|
|
79
|
+
}
|
|
80
|
+
return action;
|
|
81
|
+
}
|
|
82
|
+
/** `null` clears the field (Set-Record-Metadata's tri-state), `undefined` leaves it unchanged. */
|
|
83
|
+
function metadataFieldFromOptions(value, clear) {
|
|
84
|
+
return clear ? null : value;
|
|
85
|
+
}
|
|
59
86
|
export function paidByFromArNSOptions(paidBy) {
|
|
60
87
|
return paidBy !== undefined && paidBy.length > 0 ? paidBy : undefined;
|
|
61
88
|
}
|
|
@@ -298,3 +325,87 @@ export async function removeArNSRecord(options, turbo) {
|
|
|
298
325
|
});
|
|
299
326
|
console.log(JSON.stringify({ message: 'ArNS record removed!', ...result }, null, 2));
|
|
300
327
|
}
|
|
328
|
+
export async function addArNSController(options, turbo) {
|
|
329
|
+
if (options.antId === undefined) {
|
|
330
|
+
throw new Error('Must provide an --ant-id to add a controller to');
|
|
331
|
+
}
|
|
332
|
+
const client = turbo ?? (await turboFromOptions(options));
|
|
333
|
+
const result = await client.addArNSController({
|
|
334
|
+
antId: options.antId,
|
|
335
|
+
owner: ownerFromOptions(options),
|
|
336
|
+
target: options.target,
|
|
337
|
+
});
|
|
338
|
+
console.log(JSON.stringify({ message: 'ArNS controller added!', ...result }, null, 2));
|
|
339
|
+
}
|
|
340
|
+
export async function removeArNSController(options, turbo) {
|
|
341
|
+
if (options.antId === undefined) {
|
|
342
|
+
throw new Error('Must provide an --ant-id to remove a controller from');
|
|
343
|
+
}
|
|
344
|
+
const client = turbo ?? (await turboFromOptions(options));
|
|
345
|
+
const result = await client.removeArNSController({
|
|
346
|
+
antId: options.antId,
|
|
347
|
+
owner: ownerFromOptions(options),
|
|
348
|
+
target: options.target,
|
|
349
|
+
});
|
|
350
|
+
console.log(JSON.stringify({ message: 'ArNS controller removed!', ...result }, null, 2));
|
|
351
|
+
}
|
|
352
|
+
export async function transferArNSRecord(options, turbo) {
|
|
353
|
+
if (options.antId === undefined) {
|
|
354
|
+
throw new Error('Must provide an --ant-id whose record to transfer');
|
|
355
|
+
}
|
|
356
|
+
if (options.undername === undefined || options.undername.length === 0) {
|
|
357
|
+
throw new Error('Must provide an --undername to transfer');
|
|
358
|
+
}
|
|
359
|
+
if (options.target === undefined) {
|
|
360
|
+
throw new Error('Must provide a --target address to transfer the record to');
|
|
361
|
+
}
|
|
362
|
+
const client = turbo ?? (await turboFromOptions(options));
|
|
363
|
+
const result = await client.transferArNSRecord({
|
|
364
|
+
antId: options.antId,
|
|
365
|
+
owner: ownerFromOptions(options),
|
|
366
|
+
undername: options.undername,
|
|
367
|
+
target: options.target,
|
|
368
|
+
});
|
|
369
|
+
console.log(JSON.stringify({ message: 'ArNS record transferred!', ...result }, null, 2));
|
|
370
|
+
}
|
|
371
|
+
export async function setArNSRecordMetadata(options, turbo) {
|
|
372
|
+
if (options.antId === undefined) {
|
|
373
|
+
throw new Error('Must provide an --ant-id to set record metadata on');
|
|
374
|
+
}
|
|
375
|
+
const client = turbo ?? (await turboFromOptions(options));
|
|
376
|
+
const result = await client.setArNSRecordMetadata({
|
|
377
|
+
antId: options.antId,
|
|
378
|
+
owner: ownerFromOptions(options),
|
|
379
|
+
undername: options.undername ?? '@',
|
|
380
|
+
displayName: metadataFieldFromOptions(options.displayName, options.clearDisplayName),
|
|
381
|
+
recordLogo: metadataFieldFromOptions(options.recordLogo, options.clearRecordLogo),
|
|
382
|
+
recordDescription: metadataFieldFromOptions(options.recordDescription, options.clearRecordDescription),
|
|
383
|
+
recordKeywords: metadataFieldFromOptions(options.recordKeywords, options.clearRecordKeywords),
|
|
384
|
+
});
|
|
385
|
+
console.log(JSON.stringify({ message: 'ArNS record metadata set!', ...result }, null, 2));
|
|
386
|
+
}
|
|
387
|
+
export async function removeArNSRecordMetadata(options, turbo) {
|
|
388
|
+
if (options.antId === undefined) {
|
|
389
|
+
throw new Error('Must provide an --ant-id to remove record metadata from');
|
|
390
|
+
}
|
|
391
|
+
if (options.undername === undefined || options.undername.length === 0) {
|
|
392
|
+
throw new Error('Must provide an --undername');
|
|
393
|
+
}
|
|
394
|
+
const client = turbo ?? (await turboFromOptions(options));
|
|
395
|
+
const result = await client.removeArNSRecordMetadata({
|
|
396
|
+
antId: options.antId,
|
|
397
|
+
owner: ownerFromOptions(options),
|
|
398
|
+
undername: options.undername,
|
|
399
|
+
});
|
|
400
|
+
console.log(JSON.stringify({ message: 'ArNS record metadata removed!', ...result }, null, 2));
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Preview what one of the eight non-purchase actions will debit, without
|
|
404
|
+
* creating it.
|
|
405
|
+
*/
|
|
406
|
+
export async function arnsActionPrice(options, turbo) {
|
|
407
|
+
const action = actionFromOptions(options);
|
|
408
|
+
const client = turbo ?? TurboFactory.unauthenticated(configFromOptions(options));
|
|
409
|
+
const { wincQty } = await client.getArNSActionPrice(action);
|
|
410
|
+
console.log(JSON.stringify({ action, wincQty, credits: creditsFromWinc(wincQty) }, null, 2));
|
|
411
|
+
}
|
package/lib/esm/cli/options.js
CHANGED
|
@@ -231,6 +231,48 @@ export const optionMap = {
|
|
|
231
231
|
alias: '--ttl-seconds <ttlSeconds>',
|
|
232
232
|
description: 'TTL in seconds for the ArNS record',
|
|
233
233
|
},
|
|
234
|
+
arnsDisplayName: {
|
|
235
|
+
alias: '--display-name <displayName>',
|
|
236
|
+
description: 'Display name for the record (Set-Record-Metadata)',
|
|
237
|
+
},
|
|
238
|
+
arnsClearDisplayName: {
|
|
239
|
+
alias: '--clear-display-name',
|
|
240
|
+
description: 'Clear the record display name (Set-Record-Metadata)',
|
|
241
|
+
default: false,
|
|
242
|
+
},
|
|
243
|
+
arnsRecordLogo: {
|
|
244
|
+
alias: '--record-logo <transactionId>',
|
|
245
|
+
description: 'Arweave transaction ID for the record logo (Set-Record-Metadata)',
|
|
246
|
+
},
|
|
247
|
+
arnsClearRecordLogo: {
|
|
248
|
+
alias: '--clear-record-logo',
|
|
249
|
+
description: 'Clear the record logo (Set-Record-Metadata)',
|
|
250
|
+
default: false,
|
|
251
|
+
},
|
|
252
|
+
arnsRecordDescription: {
|
|
253
|
+
alias: '--record-description <description>',
|
|
254
|
+
description: 'Description for the record (Set-Record-Metadata)',
|
|
255
|
+
},
|
|
256
|
+
arnsClearRecordDescription: {
|
|
257
|
+
alias: '--clear-record-description',
|
|
258
|
+
description: 'Clear the record description (Set-Record-Metadata)',
|
|
259
|
+
default: false,
|
|
260
|
+
},
|
|
261
|
+
arnsRecordKeywords: {
|
|
262
|
+
alias: '--record-keywords <keywords...>',
|
|
263
|
+
description: 'Keywords for the record (Set-Record-Metadata)',
|
|
264
|
+
type: 'array',
|
|
265
|
+
},
|
|
266
|
+
arnsClearRecordKeywords: {
|
|
267
|
+
alias: '--clear-record-keywords',
|
|
268
|
+
description: 'Clear the record keywords (Set-Record-Metadata)',
|
|
269
|
+
default: false,
|
|
270
|
+
},
|
|
271
|
+
arnsAction: {
|
|
272
|
+
alias: '--action <action>',
|
|
273
|
+
description: 'ArNS action to price: set-record, remove-record, set-record-metadata, ' +
|
|
274
|
+
'remove-record-metadata, transfer-record, add-controller, remove-controller, or transfer',
|
|
275
|
+
},
|
|
234
276
|
// ---- Payment history ----
|
|
235
277
|
limit: {
|
|
236
278
|
alias: '--limit <limit>',
|
|
@@ -362,3 +404,38 @@ export const removeArNSRecordOptions = [
|
|
|
362
404
|
optionMap.arnsAntId,
|
|
363
405
|
optionMap.arnsUndername,
|
|
364
406
|
];
|
|
407
|
+
export const addArNSControllerOptions = [
|
|
408
|
+
...walletOptions,
|
|
409
|
+
optionMap.arnsOwnerKey,
|
|
410
|
+
optionMap.arnsAntId,
|
|
411
|
+
optionMap.arnsTarget,
|
|
412
|
+
];
|
|
413
|
+
export const removeArNSControllerOptions = addArNSControllerOptions;
|
|
414
|
+
export const transferArNSRecordOptions = [
|
|
415
|
+
...walletOptions,
|
|
416
|
+
optionMap.arnsOwnerKey,
|
|
417
|
+
optionMap.arnsAntId,
|
|
418
|
+
optionMap.arnsUndername,
|
|
419
|
+
optionMap.arnsTarget,
|
|
420
|
+
];
|
|
421
|
+
export const setArNSRecordMetadataOptions = [
|
|
422
|
+
...walletOptions,
|
|
423
|
+
optionMap.arnsOwnerKey,
|
|
424
|
+
optionMap.arnsAntId,
|
|
425
|
+
optionMap.arnsUndername,
|
|
426
|
+
optionMap.arnsDisplayName,
|
|
427
|
+
optionMap.arnsClearDisplayName,
|
|
428
|
+
optionMap.arnsRecordLogo,
|
|
429
|
+
optionMap.arnsClearRecordLogo,
|
|
430
|
+
optionMap.arnsRecordDescription,
|
|
431
|
+
optionMap.arnsClearRecordDescription,
|
|
432
|
+
optionMap.arnsRecordKeywords,
|
|
433
|
+
optionMap.arnsClearRecordKeywords,
|
|
434
|
+
];
|
|
435
|
+
export const removeArNSRecordMetadataOptions = [
|
|
436
|
+
...walletOptions,
|
|
437
|
+
optionMap.arnsOwnerKey,
|
|
438
|
+
optionMap.arnsAntId,
|
|
439
|
+
optionMap.arnsUndername,
|
|
440
|
+
];
|
|
441
|
+
export const arnsActionPriceOptions = [optionMap.arnsAction];
|
|
@@ -35,7 +35,7 @@ const chunkingHeader = { 'x-chunking-version': '2' };
|
|
|
35
35
|
* uploading them in parallel, and emitting progress/error events.
|
|
36
36
|
*/
|
|
37
37
|
export class ChunkedUploader {
|
|
38
|
-
constructor({ http, token, maxChunkConcurrency = defaultMaxChunkConcurrency, maxFinalizeMs, chunkByteCount = defaultChunkByteCount, logger = Logger.default, chunkingMode = 'auto', dataItemByteCount, }) {
|
|
38
|
+
constructor({ http, token, maxChunkConcurrency = defaultMaxChunkConcurrency, maxFinalizeMs, chunkByteCount = defaultChunkByteCount, logger = Logger.default, chunkingMode = 'auto', dataItemByteCount, x402, x402RefundIdentity, }) {
|
|
39
39
|
this.assertChunkParams({
|
|
40
40
|
chunkByteCount,
|
|
41
41
|
chunkingMode,
|
|
@@ -54,6 +54,9 @@ export class ChunkedUploader {
|
|
|
54
54
|
dataItemByteCount,
|
|
55
55
|
});
|
|
56
56
|
this.maxBacklogQueue = this.maxChunkConcurrency * backlogQueueFactor;
|
|
57
|
+
this.x402 = x402;
|
|
58
|
+
this.x402RefundIdentity = x402RefundIdentity;
|
|
59
|
+
this.dataItemByteCount = dataItemByteCount;
|
|
57
60
|
}
|
|
58
61
|
shouldChunkUpload({ chunkByteCount, chunkingMode, dataItemByteCount, }) {
|
|
59
62
|
if (chunkingMode === 'disabled') {
|
|
@@ -92,7 +95,54 @@ export class ChunkedUploader {
|
|
|
92
95
|
/**
|
|
93
96
|
* Initialize or resume an upload session, returning the upload ID.
|
|
94
97
|
*/
|
|
98
|
+
/**
|
|
99
|
+
* Open a multipart upload paid for with x402.
|
|
100
|
+
*
|
|
101
|
+
* The bundler settles the payment at CREATE, before accepting a single chunk
|
|
102
|
+
* — so an unpaid upload never consumes storage. That is why the size is
|
|
103
|
+
* declared here and the money moves here, not at finalize.
|
|
104
|
+
*
|
|
105
|
+
* The 402 handshake is delegated to `wrapFetchWithPayment`, the same
|
|
106
|
+
* mechanism the single-shot x402 POST already uses, so the signer and the
|
|
107
|
+
* spend cap behave identically on both paths.
|
|
108
|
+
*/
|
|
109
|
+
async initPaidUpload(x402) {
|
|
110
|
+
if (this.paidUploadId !== undefined) {
|
|
111
|
+
this.logger.debug('Resuming the already-paid chunked upload', {
|
|
112
|
+
uploadId: this.paidUploadId,
|
|
113
|
+
});
|
|
114
|
+
return this.paidUploadId;
|
|
115
|
+
}
|
|
116
|
+
if (this.x402RefundIdentity === undefined) {
|
|
117
|
+
throw new Error('An x402-paid chunked upload needs a refund identity — it is the Turbo wallet credited if the upload delivers fewer bytes than were paid for.');
|
|
118
|
+
}
|
|
119
|
+
const { address, signatureType } = this.x402RefundIdentity;
|
|
120
|
+
const endpoint = `/chunks/${this.token}/-1/-1?chunkSize=${this.chunkByteCount}` +
|
|
121
|
+
`&totalBytes=${this.dataItemByteCount}` +
|
|
122
|
+
`&address=${encodeURIComponent(address)}` +
|
|
123
|
+
`&signatureType=${signatureType}`;
|
|
124
|
+
this.logger.debug('Opening an x402-paid chunked upload', {
|
|
125
|
+
totalBytes: this.dataItemByteCount,
|
|
126
|
+
});
|
|
127
|
+
const res = await this.http.get({
|
|
128
|
+
endpoint: endpoint,
|
|
129
|
+
headers: chunkingHeader,
|
|
130
|
+
x402Options: x402,
|
|
131
|
+
});
|
|
132
|
+
if (res.chunkSize !== undefined && res.chunkSize !== this.chunkByteCount) {
|
|
133
|
+
this.logger.warn('Chunk size mismatch! Overriding with server value.', {
|
|
134
|
+
clientExpected: this.chunkByteCount,
|
|
135
|
+
serverReturned: res.chunkSize,
|
|
136
|
+
});
|
|
137
|
+
this.chunkByteCount = res.chunkSize;
|
|
138
|
+
}
|
|
139
|
+
this.paidUploadId = res.id;
|
|
140
|
+
return res.id;
|
|
141
|
+
}
|
|
95
142
|
async initUpload() {
|
|
143
|
+
if (this.x402 !== undefined) {
|
|
144
|
+
return this.initPaidUpload(this.x402);
|
|
145
|
+
}
|
|
96
146
|
const res = await this.http.get({
|
|
97
147
|
endpoint: `/chunks/${this.token}/-1/-1?chunkSize=${this.chunkByteCount}`,
|
|
98
148
|
headers: chunkingHeader,
|
package/lib/esm/common/http.js
CHANGED
|
@@ -48,7 +48,18 @@ export class TurboHTTPService {
|
|
|
48
48
|
this.baseURL = url;
|
|
49
49
|
this.retryConfig = retryConfig;
|
|
50
50
|
}
|
|
51
|
-
async get({ endpoint, signal, allowedStatuses = [200, 202], headers, }) {
|
|
51
|
+
async get({ endpoint, signal, allowedStatuses = [200, 202], headers, x402Options, }) {
|
|
52
|
+
if (x402Options !== undefined) {
|
|
53
|
+
const maxMUSDCAmount = x402Options.maxMUSDCAmount !== undefined
|
|
54
|
+
? BigInt(x402Options.maxMUSDCAmount.toString())
|
|
55
|
+
: undefined;
|
|
56
|
+
const fetchWithPay = wrapFetchWithPayment(fetch, x402Options.signer, maxMUSDCAmount);
|
|
57
|
+
return this.tryRequest(async () => fetchWithPay(this.baseURL + endpoint, {
|
|
58
|
+
method: 'GET',
|
|
59
|
+
headers: { ...defaultHeaders, ...headers },
|
|
60
|
+
signal,
|
|
61
|
+
}), allowedStatuses);
|
|
62
|
+
}
|
|
52
63
|
return this.withRetry(() => fetch(this.baseURL + endpoint, {
|
|
53
64
|
method: 'GET',
|
|
54
65
|
headers: { ...defaultHeaders, ...headers },
|
|
@@ -137,6 +137,24 @@ export class TurboUnauthenticatedPaymentService {
|
|
|
137
137
|
wincTotal: price.wincTotalWithAntSpawn ?? price.winc,
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Preview the flat credits margin one of the eight non-purchase actions
|
|
142
|
+
* (everything except Buy-Name/Extend-Lease/Upgrade-Name/
|
|
143
|
+
* Increase-Undername-Limit) will debit, without creating it. Those four
|
|
144
|
+
* purchase actions are priced by `getArNSPriceForName` instead — their
|
|
145
|
+
* cost is dominated by the ARIO purchase, not this margin, so this route
|
|
146
|
+
* rejects them.
|
|
147
|
+
*
|
|
148
|
+
* No signature required: this mirrors `getArNSPriceForName`'s read-only,
|
|
149
|
+
* unauthenticated shape rather than `getArNSActionStatus`'s (which happens
|
|
150
|
+
* to live on the authenticated client today despite needing no signature
|
|
151
|
+
* either).
|
|
152
|
+
*/
|
|
153
|
+
async getArNSActionPrice(action) {
|
|
154
|
+
return this.httpService.get({
|
|
155
|
+
endpoint: `/arns/actions/${action}/price`,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
140
158
|
/**
|
|
141
159
|
* Fail fast (client-side) on malformed ArNS requests so JS callers that bypass
|
|
142
160
|
* the compile-time intent unions get a clear `ProvidedInputError` instead of an
|
|
@@ -659,7 +677,7 @@ export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymen
|
|
|
659
677
|
/**
|
|
660
678
|
* Point a name (or undername) at an Arweave transaction.
|
|
661
679
|
*
|
|
662
|
-
*
|
|
680
|
+
* Costs a small credit margin — never SOL, which Turbo sponsors. Completes in one call while Turbo is
|
|
663
681
|
* a controller of the ANT, and returns `awaiting-signature` once the customer
|
|
664
682
|
* has revoked Turbo, at which point `owner` signs it themselves. Both paths
|
|
665
683
|
* are handled here.
|
|
@@ -683,14 +701,15 @@ export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymen
|
|
|
683
701
|
String(ttlSeconds),
|
|
684
702
|
]));
|
|
685
703
|
}
|
|
686
|
-
/** Remove a record (an undername).
|
|
704
|
+
/** Remove a record (an undername). Costs credits, never SOL. */
|
|
687
705
|
async removeArNSRecord({ antId, owner, undername, onNonce, }) {
|
|
688
706
|
return this.completeArNSAction('remove-record', { antId, ownerAddress: await owner.getAddress(), undername }, owner, { onNonce }, buildArNSCustodyMessage('remove-record', [antId, undername]));
|
|
689
707
|
}
|
|
690
708
|
/**
|
|
691
709
|
* Edit a RECORD's metadata — its display name, logo, description, keywords.
|
|
692
710
|
*
|
|
693
|
-
*
|
|
711
|
+
* Costs a small credit margin (never SOL), and is owner-or-controller on
|
|
712
|
+
* chain, so it behaves exactly like
|
|
694
713
|
* {@link setArNSRecord}: Turbo-alone while it is a controller, owner-signed
|
|
695
714
|
* after a revoke.
|
|
696
715
|
*
|
|
@@ -722,7 +741,7 @@ export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymen
|
|
|
722
741
|
arNSKeywordsField(recordKeywords),
|
|
723
742
|
]));
|
|
724
743
|
}
|
|
725
|
-
/** Clear a record's metadata.
|
|
744
|
+
/** Clear a record's metadata. Costs credits, never SOL; same two-shape rules. */
|
|
726
745
|
async removeArNSRecordMetadata({ antId, owner, undername, onNonce, }) {
|
|
727
746
|
return this.completeArNSAction('remove-record-metadata', { antId, ownerAddress: await owner.getAddress(), undername }, owner, { onNonce }, buildArNSCustodyMessage('remove-record-metadata', [antId, undername]));
|
|
728
747
|
}
|
|
@@ -740,7 +759,8 @@ export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymen
|
|
|
740
759
|
* is what makes `setArNSRecord` a single call.
|
|
741
760
|
*
|
|
742
761
|
* Owner-signed: changing an ANT's access control is an owner-only
|
|
743
|
-
* instruction.
|
|
762
|
+
* instruction. Costs a small credit margin; Turbo funds the ACL page growth
|
|
763
|
+
* in SOL.
|
|
744
764
|
*/
|
|
745
765
|
async addArNSController({ antId, owner, target, onNonce, }) {
|
|
746
766
|
return this.completeArNSAction('add-controller', {
|
|
@@ -753,7 +773,8 @@ export class TurboAuthenticatedPaymentService extends TurboUnauthenticatedPaymen
|
|
|
753
773
|
* Revoke controller rights — the escape hatch that keeps "Turbo is not a
|
|
754
774
|
* custodian" honest.
|
|
755
775
|
*
|
|
756
|
-
* Always available,
|
|
776
|
+
* Always available, and needs nothing from Turbo but the fee. Costs a small
|
|
777
|
+
* credit margin rather than SOL.
|
|
757
778
|
* After revoking, `setArNSRecord` keeps working: it simply starts returning
|
|
758
779
|
* `awaiting-signature` so the owner signs their own record writes.
|
|
759
780
|
*/
|
package/lib/esm/common/turbo.js
CHANGED
|
@@ -60,6 +60,14 @@ export class TurboUnauthenticatedClient {
|
|
|
60
60
|
getArNSPriceForName(params) {
|
|
61
61
|
return this.paymentService.getArNSPriceForName(params);
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Previews what one of the eight non-purchase ArNS actions will debit,
|
|
65
|
+
* without creating it. Use {@link getArNSPriceForName} for the four
|
|
66
|
+
* ARIO-purchase actions instead.
|
|
67
|
+
*/
|
|
68
|
+
getArNSActionPrice(action) {
|
|
69
|
+
return this.paymentService.getArNSActionPrice(action);
|
|
70
|
+
}
|
|
63
71
|
/**
|
|
64
72
|
* Returns the status of an ArNS purchase by its nonce.
|
|
65
73
|
*/
|
|
@@ -266,11 +274,11 @@ export class TurboAuthenticatedClient extends TurboUnauthenticatedClient {
|
|
|
266
274
|
removeArNSRecord(params) {
|
|
267
275
|
return this.paymentService.removeArNSRecord(params);
|
|
268
276
|
}
|
|
269
|
-
/** Grant controller rights — omit `target` for Turbo itself.
|
|
277
|
+
/** Grant controller rights — omit `target` for Turbo itself. Costs credits. */
|
|
270
278
|
addArNSController(params) {
|
|
271
279
|
return this.paymentService.addArNSController(params);
|
|
272
280
|
}
|
|
273
|
-
/** Revoke controller rights. Always available,
|
|
281
|
+
/** Revoke controller rights. Always available; costs credits, never SOL. */
|
|
274
282
|
removeArNSController(params) {
|
|
275
283
|
return this.paymentService.removeArNSController(params);
|
|
276
284
|
}
|
|
@@ -282,15 +290,15 @@ export class TurboAuthenticatedClient extends TurboUnauthenticatedClient {
|
|
|
282
290
|
setArNSRecordMetadata(params) {
|
|
283
291
|
return this.paymentService.setArNSRecordMetadata(params);
|
|
284
292
|
}
|
|
285
|
-
/** Clear a record's metadata.
|
|
293
|
+
/** Clear a record's metadata. Costs credits, never SOL; handles both shapes. */
|
|
286
294
|
removeArNSRecordMetadata(params) {
|
|
287
295
|
return this.paymentService.removeArNSRecordMetadata(params);
|
|
288
296
|
}
|
|
289
|
-
/** Hand ONE record over — not the whole ANT.
|
|
297
|
+
/** Hand ONE record over — not the whole ANT. Costs credits, never SOL. */
|
|
290
298
|
transferArNSRecord(params) {
|
|
291
299
|
return this.paymentService.transferArNSRecord(params);
|
|
292
300
|
}
|
|
293
|
-
/** Hand the ANT to a new owner. Irreversible.
|
|
301
|
+
/** Hand the ANT to a new owner. Irreversible. Costs credits, never SOL. */
|
|
294
302
|
transferArNSAnt(params) {
|
|
295
303
|
return this.paymentService.transferArNSAnt(params);
|
|
296
304
|
}
|
package/lib/esm/common/upload.js
CHANGED
|
@@ -221,9 +221,6 @@ export class TurboAuthenticatedBaseUploadService extends TurboUnauthenticatedUpl
|
|
|
221
221
|
!this.x402EnabledTokens.includes(this.token)) {
|
|
222
222
|
throw new Error('x402 uploads are not supported for token: ' + this.token);
|
|
223
223
|
}
|
|
224
|
-
if (params.chunkingMode === 'force' && fundingMode instanceof X402Funding) {
|
|
225
|
-
throw new Error("Chunking mode 'force' is not supported when x402 is enabled");
|
|
226
|
-
}
|
|
227
224
|
this.logger.debug('Starting file upload', { params });
|
|
228
225
|
let retries = 0;
|
|
229
226
|
const maxRetries = this.retryConfig.retries ?? 3;
|
|
@@ -259,6 +256,19 @@ export class TurboAuthenticatedBaseUploadService extends TurboUnauthenticatedUpl
|
|
|
259
256
|
// this result due to the wrapped retry logic of this method.
|
|
260
257
|
try {
|
|
261
258
|
const { chunkByteCount, maxChunkConcurrency } = params;
|
|
259
|
+
// Built here rather than after the chunked branch so BOTH paths can
|
|
260
|
+
// pay with it. Chunked x402 uploads used to be impossible — the
|
|
261
|
+
// bundler had no way to charge for a multipart upload — so this branch
|
|
262
|
+
// deliberately fell back to a single request, which capped x402 at the
|
|
263
|
+
// single-item limit no matter how the client chunked. The bundler now
|
|
264
|
+
// settles at create, so the fallback is no longer needed.
|
|
265
|
+
const x402Options = fundingMode instanceof X402Funding
|
|
266
|
+
? {
|
|
267
|
+
signer: fundingMode.signer ??
|
|
268
|
+
(await makeX402Signer(this.signer.signer)),
|
|
269
|
+
maxMUSDCAmount: fundingMode.maxMUSDCAmount,
|
|
270
|
+
}
|
|
271
|
+
: undefined;
|
|
262
272
|
const chunkedUploader = new ChunkedUploader({
|
|
263
273
|
http: this.httpService,
|
|
264
274
|
token: this.token,
|
|
@@ -268,9 +278,17 @@ export class TurboAuthenticatedBaseUploadService extends TurboUnauthenticatedUpl
|
|
|
268
278
|
dataItemByteCount: dataItemSizeFactory(),
|
|
269
279
|
chunkingMode: params.chunkingMode,
|
|
270
280
|
maxFinalizeMs: params.maxFinalizeMs,
|
|
281
|
+
...(x402Options ? { x402: x402Options } : {}),
|
|
282
|
+
...(x402Options
|
|
283
|
+
? {
|
|
284
|
+
x402RefundIdentity: {
|
|
285
|
+
address: await this.signer.getNativeAddress(),
|
|
286
|
+
signatureType: this.signer.signer.signatureType,
|
|
287
|
+
},
|
|
288
|
+
}
|
|
289
|
+
: {}),
|
|
271
290
|
});
|
|
272
|
-
if (chunkedUploader.shouldUseChunkUploader
|
|
273
|
-
!(fundingMode instanceof X402Funding)) {
|
|
291
|
+
if (chunkedUploader.shouldUseChunkUploader) {
|
|
274
292
|
const response = await chunkedUploader.upload({
|
|
275
293
|
dataItemStreamFactory,
|
|
276
294
|
dataItemSizeFactory,
|
|
@@ -280,13 +298,6 @@ export class TurboAuthenticatedBaseUploadService extends TurboUnauthenticatedUpl
|
|
|
280
298
|
});
|
|
281
299
|
return { ...response, cryptoFundResult };
|
|
282
300
|
}
|
|
283
|
-
const x402Options = fundingMode instanceof X402Funding
|
|
284
|
-
? {
|
|
285
|
-
signer: fundingMode.signer ??
|
|
286
|
-
(await makeX402Signer(this.signer.signer)),
|
|
287
|
-
maxMUSDCAmount: fundingMode.maxMUSDCAmount,
|
|
288
|
-
}
|
|
289
|
-
: undefined;
|
|
290
301
|
const response = await this.uploadSignedDataItem({
|
|
291
302
|
dataItemStreamFactory,
|
|
292
303
|
dataItemSizeFactory,
|
package/lib/esm/types.js
CHANGED
|
@@ -101,7 +101,7 @@ export const arNSPurchaseIntents = [
|
|
|
101
101
|
];
|
|
102
102
|
// ===== ArNS actions (sponsored — the current bundler surface) =====
|
|
103
103
|
/**
|
|
104
|
-
* The
|
|
104
|
+
* The twelve sponsored ArNS actions.
|
|
105
105
|
*
|
|
106
106
|
* Sponsorship covers these twelve and NOTHING else. Everything else in the
|
|
107
107
|
* ArNS, ANT and core programs stays on the direct-signer path and costs the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ArNSFiatPurchaseQuoteParams, ArNSFiatPurchaseQuoteResponse, ArNSNameType, ArNSPriceParams, ArNSPriceResponse, ArNSPurchaseStatusResponse } from '../../types.js';
|
|
1
|
+
import { ArNSAction, ArNSActionPriceResponse, ArNSFiatPurchaseQuoteParams, ArNSFiatPurchaseQuoteResponse, ArNSNameType, ArNSPriceParams, ArNSPriceResponse, ArNSPurchaseStatusResponse } from '../../types.js';
|
|
2
2
|
import { ArNSActionCompleted, ArNSOwnerSigner } from '../../types.js';
|
|
3
|
-
import { ArNSFiatQuoteOptions, ArNSPriceOptions, ArNSPurchaseOptions, ArNSPurchaseStatusOptions, RemoveArNSRecordOptions, SetArNSRecordOptions, TransferArNSAntOptions } from '../types.js';
|
|
3
|
+
import { AddArNSControllerOptions, ArNSActionPriceOptions, ArNSFiatQuoteOptions, ArNSPriceOptions, ArNSPurchaseOptions, ArNSPurchaseStatusOptions, RemoveArNSControllerOptions, RemoveArNSRecordMetadataOptions, RemoveArNSRecordOptions, SetArNSRecordMetadataOptions, SetArNSRecordOptions, TransferArNSAntOptions, TransferArNSRecordOptions } from '../types.js';
|
|
4
4
|
export type ArNSPriceClient = {
|
|
5
5
|
getArNSPriceForName(params: ArNSPriceParams): Promise<ArNSPriceResponse>;
|
|
6
6
|
};
|
|
@@ -50,12 +50,49 @@ export type ArNSCustodyClient = {
|
|
|
50
50
|
owner: ArNSOwnerSigner;
|
|
51
51
|
undername: string;
|
|
52
52
|
}): Promise<ArNSActionCompleted>;
|
|
53
|
+
addArNSController(params: {
|
|
54
|
+
antId: string;
|
|
55
|
+
owner: ArNSOwnerSigner;
|
|
56
|
+
target?: string;
|
|
57
|
+
}): Promise<ArNSActionCompleted>;
|
|
58
|
+
removeArNSController(params: {
|
|
59
|
+
antId: string;
|
|
60
|
+
owner: ArNSOwnerSigner;
|
|
61
|
+
target?: string;
|
|
62
|
+
}): Promise<ArNSActionCompleted>;
|
|
63
|
+
setArNSRecordMetadata(params: {
|
|
64
|
+
antId: string;
|
|
65
|
+
owner: ArNSOwnerSigner;
|
|
66
|
+
undername?: string;
|
|
67
|
+
displayName?: string | null;
|
|
68
|
+
recordLogo?: string | null;
|
|
69
|
+
recordDescription?: string | null;
|
|
70
|
+
recordKeywords?: string[] | null;
|
|
71
|
+
}): Promise<ArNSActionCompleted>;
|
|
72
|
+
removeArNSRecordMetadata(params: {
|
|
73
|
+
antId: string;
|
|
74
|
+
owner: ArNSOwnerSigner;
|
|
75
|
+
undername: string;
|
|
76
|
+
}): Promise<ArNSActionCompleted>;
|
|
77
|
+
transferArNSRecord(params: {
|
|
78
|
+
antId: string;
|
|
79
|
+
owner: ArNSOwnerSigner;
|
|
80
|
+
undername: string;
|
|
81
|
+
target: string;
|
|
82
|
+
}): Promise<ArNSActionCompleted>;
|
|
83
|
+
};
|
|
84
|
+
export type ArNSActionPriceClient = {
|
|
85
|
+
getArNSActionPrice(action: ArNSAction): Promise<ArNSActionPriceResponse>;
|
|
53
86
|
};
|
|
54
87
|
export declare function requiredNameFromOptions(options: {
|
|
55
88
|
name?: string;
|
|
56
89
|
}): string;
|
|
57
90
|
export declare function positiveIntFromOption(value: string | undefined, flag: string): number;
|
|
58
91
|
export declare function typeFromOptions(value: string | undefined): ArNSNameType;
|
|
92
|
+
/** Parses `--action` for `arns-action-price`, rejecting the four purchase actions. */
|
|
93
|
+
export declare function actionFromOptions(options: {
|
|
94
|
+
action?: string;
|
|
95
|
+
}): ArNSAction;
|
|
59
96
|
export declare function paidByFromArNSOptions(paidBy: string[] | undefined): string[] | undefined;
|
|
60
97
|
/**
|
|
61
98
|
* Infer the ArNS pricing intent from the provided flags:
|
|
@@ -83,4 +120,14 @@ export declare function arnsPurchaseStatus(options: ArNSPurchaseStatusOptions, t
|
|
|
83
120
|
export declare function transferArNSAnt(options: TransferArNSAntOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
84
121
|
export declare function setArNSRecord(options: SetArNSRecordOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
85
122
|
export declare function removeArNSRecord(options: RemoveArNSRecordOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
123
|
+
export declare function addArNSController(options: AddArNSControllerOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
124
|
+
export declare function removeArNSController(options: RemoveArNSControllerOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
125
|
+
export declare function transferArNSRecord(options: TransferArNSRecordOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
126
|
+
export declare function setArNSRecordMetadata(options: SetArNSRecordMetadataOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
127
|
+
export declare function removeArNSRecordMetadata(options: RemoveArNSRecordMetadataOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
128
|
+
/**
|
|
129
|
+
* Preview what one of the eight non-purchase actions will debit, without
|
|
130
|
+
* creating it.
|
|
131
|
+
*/
|
|
132
|
+
export declare function arnsActionPrice(options: ArNSActionPriceOptions, turbo?: ArNSActionPriceClient): Promise<void>;
|
|
86
133
|
//# sourceMappingURL=arns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arns.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/arns.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"arns.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/arns.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,6BAA6B,EAC7B,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAG3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,uBAAuB,EACvB,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AAyBrB,MAAM,MAAM,eAAe,GAAG;IAC5B,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC1E,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,qBAAqB,CAAC,CAAC,EAAE;QACvB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACzC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,CAAC,MAAM,EAAE;QAClB,IAAI,EAAE,MAAM,CAAC;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