@ardrive/turbo-sdk 1.42.0-alpha.2 → 1.42.0-alpha.4
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 +51 -0
- package/lib/cjs/cli/commands/arns.js +249 -0
- package/lib/cjs/cli/commands/freeStatus.js +47 -0
- package/lib/cjs/cli/commands/index.js +2 -0
- package/lib/cjs/cli/options.js +97 -1
- package/lib/cjs/common/http.js +4 -3
- package/lib/cjs/common/index.js +3 -0
- package/lib/cjs/common/payment.js +212 -0
- package/lib/cjs/common/signer.js +11 -3
- package/lib/cjs/common/turbo.js +54 -0
- package/lib/cjs/types.js +8 -1
- package/lib/cjs/utils/errors.js +19 -1
- package/lib/cjs/utils/uuid.js +31 -0
- package/lib/cjs/web/signer.js +4 -2
- package/lib/esm/cli/cli.js +53 -2
- package/lib/esm/cli/commands/arns.js +233 -0
- package/lib/esm/cli/commands/freeStatus.js +44 -0
- package/lib/esm/cli/commands/index.js +2 -0
- package/lib/esm/cli/options.js +96 -0
- package/lib/esm/common/http.js +4 -3
- package/lib/esm/common/index.js +3 -0
- package/lib/esm/common/payment.js +212 -0
- package/lib/esm/common/signer.js +11 -3
- package/lib/esm/common/turbo.js +54 -0
- package/lib/esm/types.js +7 -0
- package/lib/esm/utils/errors.js +17 -0
- package/lib/esm/utils/uuid.js +28 -0
- package/lib/esm/web/signer.js +4 -2
- package/lib/types/cli/commands/arns.d.ts +88 -0
- package/lib/types/cli/commands/arns.d.ts.map +1 -0
- package/lib/types/cli/commands/freeStatus.d.ts +3 -0
- package/lib/types/cli/commands/freeStatus.d.ts.map +1 -0
- package/lib/types/cli/commands/index.d.ts +2 -0
- package/lib/types/cli/commands/index.d.ts.map +1 -1
- package/lib/types/cli/options.d.ts +201 -0
- package/lib/types/cli/options.d.ts.map +1 -1
- package/lib/types/cli/types.d.ts +27 -0
- package/lib/types/cli/types.d.ts.map +1 -1
- package/lib/types/common/http.d.ts +2 -1
- package/lib/types/common/http.d.ts.map +1 -1
- package/lib/types/common/index.d.ts +1 -0
- package/lib/types/common/index.d.ts.map +1 -1
- package/lib/types/common/payment.d.ts +66 -1
- package/lib/types/common/payment.d.ts.map +1 -1
- package/lib/types/common/signer.d.ts +1 -1
- package/lib/types/common/signer.d.ts.map +1 -1
- package/lib/types/common/turbo.d.ts +59 -1
- package/lib/types/common/turbo.d.ts.map +1 -1
- package/lib/types/types.d.ts +148 -2
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/utils/errors.d.ts +14 -0
- package/lib/types/utils/errors.d.ts.map +1 -1
- package/lib/types/utils/uuid.d.ts +7 -0
- package/lib/types/utils/uuid.d.ts.map +1 -0
- package/lib/types/web/signer.d.ts +1 -1
- package/lib/types/web/signer.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/esm/common/signer.js
CHANGED
|
@@ -66,9 +66,17 @@ export class TurboDataItemAbstractSigner {
|
|
|
66
66
|
return ownerToB64Address(owner);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
async generateSignedRequestHeaders(
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
async generateSignedRequestHeaders(
|
|
70
|
+
// Callers may supply the nonce (e.g. a UUID required by some routes); the
|
|
71
|
+
// nonce round-trips to the service in `x-nonce` unchanged.
|
|
72
|
+
nonce = randomBytes(16).toString('hex'),
|
|
73
|
+
// Optional ACTION-BINDING data prepended to the nonce for SIGNING only (not
|
|
74
|
+
// sent): the service reconstructs the same string from the request and
|
|
75
|
+
// verifies the signature over `additionalData + nonce`. This binds the
|
|
76
|
+
// signature to a specific operation + params so it can't be replayed against
|
|
77
|
+
// a different request. Omitted → signs the bare nonce (unchanged behavior).
|
|
78
|
+
additionalData) {
|
|
79
|
+
const buffer = Buffer.from((additionalData ?? '') + nonce);
|
|
72
80
|
const signature = await this.signer.sign(Uint8Array.from(buffer));
|
|
73
81
|
const publicKey = toB64Url(this.signer.publicKey);
|
|
74
82
|
return {
|
package/lib/esm/common/turbo.js
CHANGED
|
@@ -51,6 +51,21 @@ export class TurboUnauthenticatedClient {
|
|
|
51
51
|
getBalance(address) {
|
|
52
52
|
return this.paymentService.getBalance(address);
|
|
53
53
|
}
|
|
54
|
+
getFreeStatus(address) {
|
|
55
|
+
return this.paymentService.getFreeStatus(address);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Returns the price in 'winc' (and mARIO) to buy/extend/upgrade an ArNS name.
|
|
59
|
+
*/
|
|
60
|
+
getArNSPriceForName(params) {
|
|
61
|
+
return this.paymentService.getArNSPriceForName(params);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Returns the status of an ArNS purchase by its nonce.
|
|
65
|
+
*/
|
|
66
|
+
getArNSPurchaseStatus(p) {
|
|
67
|
+
return this.paymentService.getArNSPurchaseStatus(p);
|
|
68
|
+
}
|
|
54
69
|
/**
|
|
55
70
|
* Returns a list of all supported fiat currencies.
|
|
56
71
|
*/
|
|
@@ -155,6 +170,45 @@ export class TurboAuthenticatedClient extends TurboUnauthenticatedClient {
|
|
|
155
170
|
getBalance(userAddress) {
|
|
156
171
|
return this.paymentService.getBalance(userAddress);
|
|
157
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Returns how many free-tier bytes the wallet can still upload for free
|
|
175
|
+
* (`bytesRemaining`), or `null` for an unlimited (exempt/partner) wallet.
|
|
176
|
+
*/
|
|
177
|
+
getFreeStatus(userAddress) {
|
|
178
|
+
return this.paymentService.getFreeStatus(userAddress);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Buys, extends, or upgrades an ArNS name, paying with the signer's Turbo
|
|
182
|
+
* credit balance. Poll {@link getArNSPurchaseStatus} with the returned nonce.
|
|
183
|
+
*/
|
|
184
|
+
purchaseArNSName(params) {
|
|
185
|
+
return this.paymentService.purchaseArNSName(params);
|
|
186
|
+
}
|
|
187
|
+
/** Buys a new ArNS name (lease or permabuy). */
|
|
188
|
+
buyArNSName(params) {
|
|
189
|
+
return this.paymentService.buyArNSName(params);
|
|
190
|
+
}
|
|
191
|
+
/** Extends the lease on an existing ArNS name. */
|
|
192
|
+
extendArNSLease(params) {
|
|
193
|
+
return this.paymentService.extendArNSLease(params);
|
|
194
|
+
}
|
|
195
|
+
/** Increases the undername limit on an existing ArNS name. */
|
|
196
|
+
increaseArNSUndernameLimit(params) {
|
|
197
|
+
return this.paymentService.increaseArNSUndernameLimit(params);
|
|
198
|
+
}
|
|
199
|
+
/** Upgrades an ArNS lease to a permabuy. */
|
|
200
|
+
upgradeArNSName(params) {
|
|
201
|
+
return this.paymentService.upgradeArNSName(params);
|
|
202
|
+
}
|
|
203
|
+
transferArNSAnt(params) {
|
|
204
|
+
return this.paymentService.transferArNSAnt(params);
|
|
205
|
+
}
|
|
206
|
+
setArNSRecord(params) {
|
|
207
|
+
return this.paymentService.setArNSRecord(params);
|
|
208
|
+
}
|
|
209
|
+
removeArNSRecord(params) {
|
|
210
|
+
return this.paymentService.removeArNSRecord(params);
|
|
211
|
+
}
|
|
158
212
|
/**
|
|
159
213
|
* Returns a list of all credit share approvals for the user.
|
|
160
214
|
*/
|
package/lib/esm/types.js
CHANGED
|
@@ -94,3 +94,10 @@ export function isEthereumWalletAdapter(walletAdapter) {
|
|
|
94
94
|
return 'getSigner' in walletAdapter;
|
|
95
95
|
}
|
|
96
96
|
export const validChunkingModes = ['force', 'disabled', 'auto'];
|
|
97
|
+
// ===== ArNS purchases paid with Turbo credits (via the bundler REST API) =====
|
|
98
|
+
export const arNSPurchaseIntents = [
|
|
99
|
+
'Buy-Name',
|
|
100
|
+
'Extend-Lease',
|
|
101
|
+
'Increase-Undername-Limit',
|
|
102
|
+
'Upgrade-Name',
|
|
103
|
+
];
|
package/lib/esm/utils/errors.js
CHANGED
|
@@ -35,6 +35,23 @@ export class ProvidedInputError extends BaseError {
|
|
|
35
35
|
super(message ?? `User has provided an invalid input`);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Raised when a credit-paid operation (e.g. an ArNS purchase) is rejected by the
|
|
40
|
+
* service because the paying wallet does not hold enough Turbo credits. Maps the
|
|
41
|
+
* bundler's HTTP `402 Payment Required` response to a typed, catchable error so
|
|
42
|
+
* callers can prompt a top-up without string-matching on messages.
|
|
43
|
+
*
|
|
44
|
+
* Recovery: top up the balance, then retry the SAME operation reusing the
|
|
45
|
+
* captured `nonce` (the nonce is the idempotency key), or mint a fresh request.
|
|
46
|
+
*/
|
|
47
|
+
export class InsufficientCreditsError extends BaseError {
|
|
48
|
+
constructor(message) {
|
|
49
|
+
super(message ??
|
|
50
|
+
'Insufficient Turbo credits to complete this purchase. Top up your balance and retry.');
|
|
51
|
+
/** Always the HTTP status that produced this error. */
|
|
52
|
+
this.status = 402;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
38
55
|
export class AbortError extends BaseError {
|
|
39
56
|
constructor(message = 'Request was aborted') {
|
|
40
57
|
super(message);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { randomBytes } from 'crypto';
|
|
17
|
+
/**
|
|
18
|
+
* RFC 4122 version 4 UUID, derived from `randomBytes` (already used across the
|
|
19
|
+
* SDK in both the node and web builds). Avoids depending on
|
|
20
|
+
* `crypto.randomUUID`, whose availability varies by runtime/polyfill.
|
|
21
|
+
*/
|
|
22
|
+
export function uuidV4() {
|
|
23
|
+
const bytes = randomBytes(16);
|
|
24
|
+
bytes[6] = (bytes[6] & 0x0f) | 0x40; // version 4
|
|
25
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80; // RFC 4122 variant
|
|
26
|
+
const hex = bytes.toString('hex');
|
|
27
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
28
|
+
}
|
package/lib/esm/web/signer.js
CHANGED
|
@@ -59,9 +59,11 @@ export class TurboWebArweaveSigner extends TurboDataItemAbstractSigner {
|
|
|
59
59
|
dataItemSizeFactory: () => signedDataItemSize,
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
async generateSignedRequestHeaders() {
|
|
62
|
+
async generateSignedRequestHeaders(nonce, additionalData) {
|
|
63
63
|
await this.setPublicKey();
|
|
64
|
-
|
|
64
|
+
// Pass through the caller's nonce + action-binding data (previously dropped,
|
|
65
|
+
// which would override a route-required UUID nonce and the H-2 binding).
|
|
66
|
+
return super.generateSignedRequestHeaders(nonce, additionalData);
|
|
65
67
|
}
|
|
66
68
|
async signData(dataToSign) {
|
|
67
69
|
await this.setPublicKey();
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ArNSNameType, ArNSPriceParams, ArNSPriceResponse, ArNSPurchaseResponse, ArNSPurchaseStatusResponse } from '../../types.js';
|
|
2
|
+
import { ArNSPriceOptions, ArNSPurchaseOptions, ArNSPurchaseStatusOptions, RemoveArNSRecordOptions, SetArNSRecordOptions, TransferArNSAntOptions } from '../types.js';
|
|
3
|
+
export type ArNSPriceClient = {
|
|
4
|
+
getArNSPriceForName(params: ArNSPriceParams): Promise<ArNSPriceResponse>;
|
|
5
|
+
};
|
|
6
|
+
export type ArNSStatusClient = {
|
|
7
|
+
getArNSPurchaseStatus(p: {
|
|
8
|
+
nonce: string;
|
|
9
|
+
}): Promise<ArNSPurchaseStatusResponse>;
|
|
10
|
+
};
|
|
11
|
+
export type ArNSPurchaseClient = {
|
|
12
|
+
buyArNSName(params: {
|
|
13
|
+
name: string;
|
|
14
|
+
type: ArNSNameType;
|
|
15
|
+
years?: number;
|
|
16
|
+
processId?: string;
|
|
17
|
+
paidBy?: string[];
|
|
18
|
+
}): Promise<ArNSPurchaseResponse>;
|
|
19
|
+
extendArNSLease(params: {
|
|
20
|
+
name: string;
|
|
21
|
+
years: number;
|
|
22
|
+
paidBy?: string[];
|
|
23
|
+
}): Promise<ArNSPurchaseResponse>;
|
|
24
|
+
increaseArNSUndernameLimit(params: {
|
|
25
|
+
name: string;
|
|
26
|
+
increaseQty: number;
|
|
27
|
+
paidBy?: string[];
|
|
28
|
+
}): Promise<ArNSPurchaseResponse>;
|
|
29
|
+
upgradeArNSName(params: {
|
|
30
|
+
name: string;
|
|
31
|
+
paidBy?: string[];
|
|
32
|
+
}): Promise<ArNSPurchaseResponse>;
|
|
33
|
+
};
|
|
34
|
+
export type ArNSCustodyClient = {
|
|
35
|
+
transferArNSAnt(params: {
|
|
36
|
+
antId: string;
|
|
37
|
+
target: string;
|
|
38
|
+
}): Promise<{
|
|
39
|
+
antId: string;
|
|
40
|
+
target: string;
|
|
41
|
+
name?: string;
|
|
42
|
+
messageId: string;
|
|
43
|
+
}>;
|
|
44
|
+
setArNSRecord(params: {
|
|
45
|
+
antId: string;
|
|
46
|
+
undername?: string;
|
|
47
|
+
transactionId: string;
|
|
48
|
+
ttlSeconds: number;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
antId: string;
|
|
51
|
+
undername: string;
|
|
52
|
+
transactionId: string;
|
|
53
|
+
ttlSeconds: number;
|
|
54
|
+
messageId: string;
|
|
55
|
+
}>;
|
|
56
|
+
removeArNSRecord(params: {
|
|
57
|
+
antId: string;
|
|
58
|
+
undername: string;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
antId: string;
|
|
61
|
+
undername: string;
|
|
62
|
+
messageId: string;
|
|
63
|
+
}>;
|
|
64
|
+
};
|
|
65
|
+
export declare function requiredNameFromOptions(options: {
|
|
66
|
+
name?: string;
|
|
67
|
+
}): string;
|
|
68
|
+
export declare function positiveIntFromOption(value: string | undefined, flag: string): number;
|
|
69
|
+
export declare function typeFromOptions(value: string | undefined): ArNSNameType;
|
|
70
|
+
export declare function paidByFromArNSOptions(paidBy: string[] | undefined): string[] | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Infer the ArNS pricing intent from the provided flags:
|
|
73
|
+
* - `--type` present -> Buy-Name (lease needs --years; --process-id optional for pricing)
|
|
74
|
+
* - `--increase-qty` present -> Increase-Undername-Limit
|
|
75
|
+
* - `--years` present (no type) -> Extend-Lease
|
|
76
|
+
* - otherwise -> Upgrade-Name
|
|
77
|
+
*/
|
|
78
|
+
export declare function arnsPriceParamsFromOptions(options: ArNSPriceOptions): ArNSPriceParams;
|
|
79
|
+
export declare function arnsPrice(options: ArNSPriceOptions, turbo?: ArNSPriceClient): Promise<void>;
|
|
80
|
+
export declare function buyArNSName(options: ArNSPurchaseOptions, turbo?: ArNSPurchaseClient): Promise<void>;
|
|
81
|
+
export declare function extendArNSLease(options: ArNSPurchaseOptions, turbo?: ArNSPurchaseClient): Promise<void>;
|
|
82
|
+
export declare function increaseArNSUndernames(options: ArNSPurchaseOptions, turbo?: ArNSPurchaseClient): Promise<void>;
|
|
83
|
+
export declare function upgradeArNSName(options: ArNSPurchaseOptions, turbo?: ArNSPurchaseClient): Promise<void>;
|
|
84
|
+
export declare function arnsPurchaseStatus(options: ArNSPurchaseStatusOptions, turbo?: ArNSStatusClient): Promise<void>;
|
|
85
|
+
export declare function transferArNSAnt(options: TransferArNSAntOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
86
|
+
export declare function setArNSRecord(options: SetArNSRecordOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
87
|
+
export declare function removeArNSRecord(options: RemoveArNSRecordOptions, turbo?: ArNSCustodyClient): Promise<void>;
|
|
88
|
+
//# sourceMappingURL=arns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arns.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/arns.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAOrB,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;QACb,IAAI,EAAE,YAAY,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClC,eAAe,CAAC,MAAM,EAAE;QACtB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClC,0BAA0B,CAAC,MAAM,EAAE;QACjC,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,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,IAAI,CAAC,CAoBf;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,EAChC,KAAK,CAAC,EAAE,iBAAiB,GACxB,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freeStatus.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/freeStatus.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,wBAAsB,UAAU,CAAC,OAAO,EAAE,cAAc,iBA8BvD"}
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
export * from './arns.js';
|
|
16
17
|
export * from './balance.js';
|
|
17
18
|
export * from './cryptoFund.js';
|
|
19
|
+
export * from './freeStatus.js';
|
|
18
20
|
export * from './price.js';
|
|
19
21
|
export * from './topUp.js';
|
|
20
22
|
export * from './uploadFile.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
@@ -186,6 +186,50 @@ export declare const optionMap: {
|
|
|
186
186
|
readonly alias: "--max-crypto-top-up-value <maxCryptoTopUpValue>";
|
|
187
187
|
readonly description: "Maximum crypto top-up value to use for the upload. Defaults to no limit.";
|
|
188
188
|
};
|
|
189
|
+
readonly arnsName: {
|
|
190
|
+
readonly alias: "--name <name>";
|
|
191
|
+
readonly description: "ArNS name to price, buy, or manage";
|
|
192
|
+
};
|
|
193
|
+
readonly arnsType: {
|
|
194
|
+
readonly alias: "--type <type>";
|
|
195
|
+
readonly description: "ArNS purchase type for Buy-Name: 'lease' or 'permabuy'";
|
|
196
|
+
};
|
|
197
|
+
readonly arnsYears: {
|
|
198
|
+
readonly alias: "--years <years>";
|
|
199
|
+
readonly description: "Lease duration in years (Buy-Name lease / Extend-Lease)";
|
|
200
|
+
};
|
|
201
|
+
readonly arnsIncreaseQty: {
|
|
202
|
+
readonly alias: "--increase-qty <qty>";
|
|
203
|
+
readonly description: "Number of additional undernames (Increase-Undername-Limit)";
|
|
204
|
+
};
|
|
205
|
+
readonly arnsProcessId: {
|
|
206
|
+
readonly alias: "--process-id <processId>";
|
|
207
|
+
readonly description: "ANT process ID the ArNS name resolves to (Buy-Name). Optional: omit for Turbo custodial provisioning (Turbo owns the ANT); supply for a user-owned ANT";
|
|
208
|
+
};
|
|
209
|
+
readonly arnsNonce: {
|
|
210
|
+
readonly alias: "--nonce <nonce>";
|
|
211
|
+
readonly description: "ArNS purchase nonce to look up the status for";
|
|
212
|
+
};
|
|
213
|
+
readonly arnsAntId: {
|
|
214
|
+
readonly alias: "--ant-id <antId>";
|
|
215
|
+
readonly description: "ANT (Metaplex Core asset) ID to transfer or manage";
|
|
216
|
+
};
|
|
217
|
+
readonly arnsTarget: {
|
|
218
|
+
readonly alias: "--target <address>";
|
|
219
|
+
readonly description: "Target Solana pubkey to transfer the ANT to";
|
|
220
|
+
};
|
|
221
|
+
readonly arnsUndername: {
|
|
222
|
+
readonly alias: "--undername <undername>";
|
|
223
|
+
readonly description: "ArNS undername record to set or remove (defaults to '@')";
|
|
224
|
+
};
|
|
225
|
+
readonly arnsTransactionId: {
|
|
226
|
+
readonly alias: "--transaction-id <transactionId>";
|
|
227
|
+
readonly description: "Arweave transaction ID the ArNS record resolves to";
|
|
228
|
+
};
|
|
229
|
+
readonly arnsTtlSeconds: {
|
|
230
|
+
readonly alias: "--ttl-seconds <ttlSeconds>";
|
|
231
|
+
readonly description: "TTL in seconds for the ArNS record";
|
|
232
|
+
};
|
|
189
233
|
};
|
|
190
234
|
export declare const walletOptions: ({
|
|
191
235
|
readonly alias: "-w, --wallet-file <filePath>";
|
|
@@ -469,4 +513,161 @@ export declare const listSharesOptions: ({
|
|
|
469
513
|
readonly alias: "-p, --private-key <key>";
|
|
470
514
|
readonly description: "Private key to use with the action";
|
|
471
515
|
})[];
|
|
516
|
+
export declare const arnsPriceOptions: ({
|
|
517
|
+
readonly alias: "--name <name>";
|
|
518
|
+
readonly description: "ArNS name to price, buy, or manage";
|
|
519
|
+
} | {
|
|
520
|
+
readonly alias: "--type <type>";
|
|
521
|
+
readonly description: "ArNS purchase type for Buy-Name: 'lease' or 'permabuy'";
|
|
522
|
+
} | {
|
|
523
|
+
readonly alias: "--years <years>";
|
|
524
|
+
readonly description: "Lease duration in years (Buy-Name lease / Extend-Lease)";
|
|
525
|
+
} | {
|
|
526
|
+
readonly alias: "--increase-qty <qty>";
|
|
527
|
+
readonly description: "Number of additional undernames (Increase-Undername-Limit)";
|
|
528
|
+
} | {
|
|
529
|
+
readonly alias: "--process-id <processId>";
|
|
530
|
+
readonly description: "ANT process ID the ArNS name resolves to (Buy-Name). Optional: omit for Turbo custodial provisioning (Turbo owns the ANT); supply for a user-owned ANT";
|
|
531
|
+
})[];
|
|
532
|
+
export declare const buyArNSNameOptions: ({
|
|
533
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
|
534
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
|
535
|
+
} | {
|
|
536
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
|
537
|
+
readonly description: "Mnemonic to use with the action";
|
|
538
|
+
} | {
|
|
539
|
+
readonly alias: "-p, --private-key <key>";
|
|
540
|
+
readonly description: "Private key to use with the action";
|
|
541
|
+
} | {
|
|
542
|
+
readonly alias: "--paid-by <paidBy...>";
|
|
543
|
+
readonly description: "Address to pay for the upload";
|
|
544
|
+
readonly type: "array";
|
|
545
|
+
} | {
|
|
546
|
+
readonly alias: "--name <name>";
|
|
547
|
+
readonly description: "ArNS name to price, buy, or manage";
|
|
548
|
+
} | {
|
|
549
|
+
readonly alias: "--type <type>";
|
|
550
|
+
readonly description: "ArNS purchase type for Buy-Name: 'lease' or 'permabuy'";
|
|
551
|
+
} | {
|
|
552
|
+
readonly alias: "--years <years>";
|
|
553
|
+
readonly description: "Lease duration in years (Buy-Name lease / Extend-Lease)";
|
|
554
|
+
} | {
|
|
555
|
+
readonly alias: "--process-id <processId>";
|
|
556
|
+
readonly description: "ANT process ID the ArNS name resolves to (Buy-Name). Optional: omit for Turbo custodial provisioning (Turbo owns the ANT); supply for a user-owned ANT";
|
|
557
|
+
})[];
|
|
558
|
+
export declare const extendArNSLeaseOptions: ({
|
|
559
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
|
560
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
|
561
|
+
} | {
|
|
562
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
|
563
|
+
readonly description: "Mnemonic to use with the action";
|
|
564
|
+
} | {
|
|
565
|
+
readonly alias: "-p, --private-key <key>";
|
|
566
|
+
readonly description: "Private key to use with the action";
|
|
567
|
+
} | {
|
|
568
|
+
readonly alias: "--paid-by <paidBy...>";
|
|
569
|
+
readonly description: "Address to pay for the upload";
|
|
570
|
+
readonly type: "array";
|
|
571
|
+
} | {
|
|
572
|
+
readonly alias: "--name <name>";
|
|
573
|
+
readonly description: "ArNS name to price, buy, or manage";
|
|
574
|
+
} | {
|
|
575
|
+
readonly alias: "--years <years>";
|
|
576
|
+
readonly description: "Lease duration in years (Buy-Name lease / Extend-Lease)";
|
|
577
|
+
})[];
|
|
578
|
+
export declare const increaseArNSUndernamesOptions: ({
|
|
579
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
|
580
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
|
581
|
+
} | {
|
|
582
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
|
583
|
+
readonly description: "Mnemonic to use with the action";
|
|
584
|
+
} | {
|
|
585
|
+
readonly alias: "-p, --private-key <key>";
|
|
586
|
+
readonly description: "Private key to use with the action";
|
|
587
|
+
} | {
|
|
588
|
+
readonly alias: "--paid-by <paidBy...>";
|
|
589
|
+
readonly description: "Address to pay for the upload";
|
|
590
|
+
readonly type: "array";
|
|
591
|
+
} | {
|
|
592
|
+
readonly alias: "--name <name>";
|
|
593
|
+
readonly description: "ArNS name to price, buy, or manage";
|
|
594
|
+
} | {
|
|
595
|
+
readonly alias: "--increase-qty <qty>";
|
|
596
|
+
readonly description: "Number of additional undernames (Increase-Undername-Limit)";
|
|
597
|
+
})[];
|
|
598
|
+
export declare const upgradeArNSNameOptions: ({
|
|
599
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
|
600
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
|
601
|
+
} | {
|
|
602
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
|
603
|
+
readonly description: "Mnemonic to use with the action";
|
|
604
|
+
} | {
|
|
605
|
+
readonly alias: "-p, --private-key <key>";
|
|
606
|
+
readonly description: "Private key to use with the action";
|
|
607
|
+
} | {
|
|
608
|
+
readonly alias: "--paid-by <paidBy...>";
|
|
609
|
+
readonly description: "Address to pay for the upload";
|
|
610
|
+
readonly type: "array";
|
|
611
|
+
} | {
|
|
612
|
+
readonly alias: "--name <name>";
|
|
613
|
+
readonly description: "ArNS name to price, buy, or manage";
|
|
614
|
+
})[];
|
|
615
|
+
export declare const arnsPurchaseStatusOptions: {
|
|
616
|
+
readonly alias: "--nonce <nonce>";
|
|
617
|
+
readonly description: "ArNS purchase nonce to look up the status for";
|
|
618
|
+
}[];
|
|
619
|
+
export declare const transferArNSAntOptions: ({
|
|
620
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
|
621
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
|
622
|
+
} | {
|
|
623
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
|
624
|
+
readonly description: "Mnemonic to use with the action";
|
|
625
|
+
} | {
|
|
626
|
+
readonly alias: "-p, --private-key <key>";
|
|
627
|
+
readonly description: "Private key to use with the action";
|
|
628
|
+
} | {
|
|
629
|
+
readonly alias: "--ant-id <antId>";
|
|
630
|
+
readonly description: "ANT (Metaplex Core asset) ID to transfer or manage";
|
|
631
|
+
} | {
|
|
632
|
+
readonly alias: "--target <address>";
|
|
633
|
+
readonly description: "Target Solana pubkey to transfer the ANT to";
|
|
634
|
+
})[];
|
|
635
|
+
export declare const setArNSRecordOptions: ({
|
|
636
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
|
637
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
|
638
|
+
} | {
|
|
639
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
|
640
|
+
readonly description: "Mnemonic to use with the action";
|
|
641
|
+
} | {
|
|
642
|
+
readonly alias: "-p, --private-key <key>";
|
|
643
|
+
readonly description: "Private key to use with the action";
|
|
644
|
+
} | {
|
|
645
|
+
readonly alias: "--ant-id <antId>";
|
|
646
|
+
readonly description: "ANT (Metaplex Core asset) ID to transfer or manage";
|
|
647
|
+
} | {
|
|
648
|
+
readonly alias: "--undername <undername>";
|
|
649
|
+
readonly description: "ArNS undername record to set or remove (defaults to '@')";
|
|
650
|
+
} | {
|
|
651
|
+
readonly alias: "--transaction-id <transactionId>";
|
|
652
|
+
readonly description: "Arweave transaction ID the ArNS record resolves to";
|
|
653
|
+
} | {
|
|
654
|
+
readonly alias: "--ttl-seconds <ttlSeconds>";
|
|
655
|
+
readonly description: "TTL in seconds for the ArNS record";
|
|
656
|
+
})[];
|
|
657
|
+
export declare const removeArNSRecordOptions: ({
|
|
658
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
|
659
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
|
660
|
+
} | {
|
|
661
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
|
662
|
+
readonly description: "Mnemonic to use with the action";
|
|
663
|
+
} | {
|
|
664
|
+
readonly alias: "-p, --private-key <key>";
|
|
665
|
+
readonly description: "Private key to use with the action";
|
|
666
|
+
} | {
|
|
667
|
+
readonly alias: "--ant-id <antId>";
|
|
668
|
+
readonly description: "ANT (Metaplex Core asset) ID to transfer or manage";
|
|
669
|
+
} | {
|
|
670
|
+
readonly alias: "--undername <undername>";
|
|
671
|
+
readonly description: "ArNS undername record to set or remove (defaults to '@')";
|
|
672
|
+
})[];
|
|
472
673
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AsB;;;;;;;;;;;;;;;IAIlC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;IAMhC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;IAInC,CAAC"}
|
package/lib/types/cli/types.d.ts
CHANGED
|
@@ -89,4 +89,31 @@ export type RevokeCreditsOptions = WalletOptions & {
|
|
|
89
89
|
address: string | undefined;
|
|
90
90
|
};
|
|
91
91
|
export type ListSharesOptions = RevokeCreditsOptions;
|
|
92
|
+
export type ArNSPriceOptions = GlobalOptions & {
|
|
93
|
+
name: string | undefined;
|
|
94
|
+
type: string | undefined;
|
|
95
|
+
years: string | undefined;
|
|
96
|
+
increaseQty: string | undefined;
|
|
97
|
+
processId: string | undefined;
|
|
98
|
+
};
|
|
99
|
+
export type ArNSPurchaseOptions = WalletOptions & ArNSPriceOptions & {
|
|
100
|
+
paidBy: string[] | undefined;
|
|
101
|
+
};
|
|
102
|
+
export type ArNSPurchaseStatusOptions = GlobalOptions & {
|
|
103
|
+
nonce: string | undefined;
|
|
104
|
+
};
|
|
105
|
+
export type TransferArNSAntOptions = WalletOptions & {
|
|
106
|
+
antId: string | undefined;
|
|
107
|
+
target: string | undefined;
|
|
108
|
+
};
|
|
109
|
+
export type SetArNSRecordOptions = WalletOptions & {
|
|
110
|
+
antId: string | undefined;
|
|
111
|
+
undername: string | undefined;
|
|
112
|
+
transactionId: string | undefined;
|
|
113
|
+
ttlSeconds: string | undefined;
|
|
114
|
+
};
|
|
115
|
+
export type RemoveArNSRecordOptions = WalletOptions & {
|
|
116
|
+
antId: string | undefined;
|
|
117
|
+
undername: string | undefined;
|
|
118
|
+
};
|
|
92
119
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,iBAAiB,EAAE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AS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IACjD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,aAAa,GAAG;IACpD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC"}
|
|
@@ -36,13 +36,14 @@ export declare class TurboHTTPService implements TurboHTTPServiceInterface {
|
|
|
36
36
|
allowedStatuses?: number[];
|
|
37
37
|
headers?: Partial<TurboSignedRequestHeaders> & Record<string, string>;
|
|
38
38
|
}): Promise<T>;
|
|
39
|
-
post<T>({ endpoint, signal, allowedStatuses, headers, data, x402Options, }: {
|
|
39
|
+
post<T>({ endpoint, signal, allowedStatuses, headers, data, x402Options, retry, }: {
|
|
40
40
|
endpoint: `/${string}`;
|
|
41
41
|
signal?: AbortSignal;
|
|
42
42
|
allowedStatuses?: number[];
|
|
43
43
|
headers?: Partial<TurboSignedRequestHeaders> & Record<string, string>;
|
|
44
44
|
data: Readable | Buffer | ReadableStream | Uint8Array;
|
|
45
45
|
x402Options?: X402RequestCredentials;
|
|
46
|
+
retry?: boolean;
|
|
46
47
|
}): Promise<T>;
|
|
47
48
|
private tryRequest;
|
|
48
49
|
private withRetry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/common/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,OAAO,EACL,yBAAyB,EACzB,WAAW,EACX,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AM,CAAC,EAAE,WAAW,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3B,OAAO,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,cAAc,GAAG,UAAU,CAAC;QACtD,WAAW,CAAC,EAAE,sBAAsB,CAAC;QAIrC,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,GAAG,OAAO,CAAC,CAAC,CAAC;YAmCA,UAAU;YA6BV,SAAS;YAsCT,QAAQ;CA8CvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AAGjC,cAAc,oBAAoB,CAAC"}
|