@ardrive/turbo-sdk 1.42.0-alpha.7 → 1.42.0-alpha.9
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/commands/arns.js +37 -9
- package/lib/cjs/cli/options.js +7 -6
- package/lib/cjs/common/arnsActions.js +102 -0
- package/lib/cjs/common/payment.js +215 -80
- package/lib/cjs/common/turbo.js +60 -15
- package/lib/cjs/types.js +20 -1
- package/lib/esm/cli/commands/arns.js +37 -9
- package/lib/esm/cli/options.js +7 -6
- package/lib/esm/common/arnsActions.js +93 -0
- package/lib/esm/common/payment.js +215 -80
- package/lib/esm/common/turbo.js +60 -15
- package/lib/esm/types.js +19 -0
- package/lib/types/cli/commands/arns.d.ts +16 -27
- package/lib/types/cli/commands/arns.d.ts.map +1 -1
- package/lib/types/cli/options.d.ts +14 -11
- package/lib/types/cli/options.d.ts.map +1 -1
- package/lib/types/cli/types.d.ts +8 -4
- package/lib/types/cli/types.d.ts.map +1 -1
- package/lib/types/common/arnsActions.d.ts +43 -0
- package/lib/types/common/arnsActions.d.ts.map +1 -0
- package/lib/types/common/payment.d.ts +153 -33
- package/lib/types/common/payment.d.ts.map +1 -1
- package/lib/types/common/turbo.d.ts +91 -36
- package/lib/types/common/turbo.d.ts.map +1 -1
- package/lib/types/types.d.ts +202 -28
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -202,9 +202,9 @@ export declare const optionMap: {
|
|
|
202
202
|
readonly alias: "--increase-qty <qty>";
|
|
203
203
|
readonly description: "Number of additional undernames (Increase-Undername-Limit)";
|
|
204
204
|
};
|
|
205
|
-
readonly
|
|
206
|
-
readonly alias: "--
|
|
207
|
-
readonly description: "
|
|
205
|
+
readonly arnsOwnerKey: {
|
|
206
|
+
readonly alias: "--owner-key <base58SolanaSecretKey>";
|
|
207
|
+
readonly description: "Base58 Solana secret key that OWNS the ANT and signs for it. Separate from the wallet paying in Turbo Credits — the owner needs a key to sign with, not SOL: Turbo pays every fee and rent";
|
|
208
208
|
};
|
|
209
209
|
readonly arnsNonce: {
|
|
210
210
|
readonly alias: "--nonce <nonce>";
|
|
@@ -533,9 +533,6 @@ export declare const arnsPriceOptions: ({
|
|
|
533
533
|
} | {
|
|
534
534
|
readonly alias: "--increase-qty <qty>";
|
|
535
535
|
readonly description: "Number of additional undernames (Increase-Undername-Limit)";
|
|
536
|
-
} | {
|
|
537
|
-
readonly alias: "--process-id <processId>";
|
|
538
|
-
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";
|
|
539
536
|
})[];
|
|
540
537
|
export declare const arnsFiatQuoteOptions: ({
|
|
541
538
|
readonly alias: "-c, --currency <currency>";
|
|
@@ -556,9 +553,6 @@ export declare const arnsFiatQuoteOptions: ({
|
|
|
556
553
|
} | {
|
|
557
554
|
readonly alias: "--increase-qty <qty>";
|
|
558
555
|
readonly description: "Number of additional undernames (Increase-Undername-Limit)";
|
|
559
|
-
} | {
|
|
560
|
-
readonly alias: "--process-id <processId>";
|
|
561
|
-
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";
|
|
562
556
|
} | {
|
|
563
557
|
alias: string;
|
|
564
558
|
description: string;
|
|
@@ -586,8 +580,8 @@ export declare const buyArNSNameOptions: ({
|
|
|
586
580
|
readonly alias: "--years <years>";
|
|
587
581
|
readonly description: "Lease duration in years (Buy-Name lease / Extend-Lease)";
|
|
588
582
|
} | {
|
|
589
|
-
readonly alias: "--
|
|
590
|
-
readonly description: "
|
|
583
|
+
readonly alias: "--owner-key <base58SolanaSecretKey>";
|
|
584
|
+
readonly description: "Base58 Solana secret key that OWNS the ANT and signs for it. Separate from the wallet paying in Turbo Credits — the owner needs a key to sign with, not SOL: Turbo pays every fee and rent";
|
|
591
585
|
})[];
|
|
592
586
|
export declare const extendArNSLeaseOptions: ({
|
|
593
587
|
readonly alias: "-w, --wallet-file <filePath>";
|
|
@@ -659,6 +653,9 @@ export declare const transferArNSAntOptions: ({
|
|
|
659
653
|
} | {
|
|
660
654
|
readonly alias: "-p, --private-key <key>";
|
|
661
655
|
readonly description: "Private key to use with the action";
|
|
656
|
+
} | {
|
|
657
|
+
readonly alias: "--owner-key <base58SolanaSecretKey>";
|
|
658
|
+
readonly description: "Base58 Solana secret key that OWNS the ANT and signs for it. Separate from the wallet paying in Turbo Credits — the owner needs a key to sign with, not SOL: Turbo pays every fee and rent";
|
|
662
659
|
} | {
|
|
663
660
|
readonly alias: "--ant-id <antId>";
|
|
664
661
|
readonly description: "ANT (Metaplex Core asset) ID to transfer or manage";
|
|
@@ -675,6 +672,9 @@ export declare const setArNSRecordOptions: ({
|
|
|
675
672
|
} | {
|
|
676
673
|
readonly alias: "-p, --private-key <key>";
|
|
677
674
|
readonly description: "Private key to use with the action";
|
|
675
|
+
} | {
|
|
676
|
+
readonly alias: "--owner-key <base58SolanaSecretKey>";
|
|
677
|
+
readonly description: "Base58 Solana secret key that OWNS the ANT and signs for it. Separate from the wallet paying in Turbo Credits — the owner needs a key to sign with, not SOL: Turbo pays every fee and rent";
|
|
678
678
|
} | {
|
|
679
679
|
readonly alias: "--ant-id <antId>";
|
|
680
680
|
readonly description: "ANT (Metaplex Core asset) ID to transfer or manage";
|
|
@@ -697,6 +697,9 @@ export declare const removeArNSRecordOptions: ({
|
|
|
697
697
|
} | {
|
|
698
698
|
readonly alias: "-p, --private-key <key>";
|
|
699
699
|
readonly description: "Private key to use with the action";
|
|
700
|
+
} | {
|
|
701
|
+
readonly alias: "--owner-key <base58SolanaSecretKey>";
|
|
702
|
+
readonly description: "Base58 Solana secret key that OWNS the ANT and signs for it. Separate from the wallet paying in Turbo Credits — the owner needs a key to sign with, not SOL: Turbo pays every fee and rent";
|
|
700
703
|
} | {
|
|
701
704
|
readonly alias: "--ant-id <antId>";
|
|
702
705
|
readonly description: "ANT (Metaplex Core asset) ID to transfer or manage";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmPZ,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;IAIzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUzB,CAAC;AASF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYzB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAyC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;IAK/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;IAAwC,CAAC;AAE1E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;IAAuB,CAAC;AAItD,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,M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AC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;IAIlC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;GAAwB,CAAC;AAE/D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;IAKlC,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;IAOhC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;IAKnC,CAAC"}
|
package/lib/types/cli/types.d.ts
CHANGED
|
@@ -106,23 +106,27 @@ export type ArNSFiatQuoteOptions = ArNSPriceOptions & {
|
|
|
106
106
|
method: string | undefined;
|
|
107
107
|
promoCode: string[] | undefined;
|
|
108
108
|
};
|
|
109
|
-
|
|
109
|
+
/** Base58 Solana secret key that will OWN the ANT — separate from the payer. */
|
|
110
|
+
export type ArNSOwnerKeyOption = {
|
|
111
|
+
ownerKey?: string;
|
|
112
|
+
};
|
|
113
|
+
export type ArNSPurchaseOptions = ArNSOwnerKeyOption & WalletOptions & ArNSPriceOptions & {
|
|
110
114
|
paidBy: string[] | undefined;
|
|
111
115
|
};
|
|
112
116
|
export type ArNSPurchaseStatusOptions = GlobalOptions & {
|
|
113
117
|
nonce: string | undefined;
|
|
114
118
|
};
|
|
115
|
-
export type TransferArNSAntOptions = WalletOptions & {
|
|
119
|
+
export type TransferArNSAntOptions = ArNSOwnerKeyOption & WalletOptions & {
|
|
116
120
|
antId: string | undefined;
|
|
117
121
|
target: string | undefined;
|
|
118
122
|
};
|
|
119
|
-
export type SetArNSRecordOptions = WalletOptions & {
|
|
123
|
+
export type SetArNSRecordOptions = ArNSOwnerKeyOption & WalletOptions & {
|
|
120
124
|
antId: string | undefined;
|
|
121
125
|
undername: string | undefined;
|
|
122
126
|
transactionId: string | undefined;
|
|
123
127
|
ttlSeconds: string | undefined;
|
|
124
128
|
};
|
|
125
|
-
export type RemoveArNSRecordOptions = WalletOptions & {
|
|
129
|
+
export type RemoveArNSRecordOptions = ArNSOwnerKeyOption & WalletOptions & {
|
|
126
130
|
antId: string | undefined;
|
|
127
131
|
undername: string | undefined;
|
|
128
132
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG;IAC1C,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG;IAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG;I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AAC;CAC9B,CAAC;AAEJ,MAAM,MAAM,yBAAyB,GAAG,aAAa,GAAG;IACtD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GACrD,aAAa,GAAG;IACd,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,GACnD,aAAa,GAAG;IACd,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;AAEJ,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GACtD,aAAa,GAAG;IACd,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ArNSOwnerSigner } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Canonical ACTION-BOUND message for the owner proof.
|
|
4
|
+
*
|
|
5
|
+
* MUST match the bundler's `buildArNSCustodyMessage` byte for byte
|
|
6
|
+
* (newline-delimited) or every signature is rejected. The bundler rebuilds this
|
|
7
|
+
* from the request and verifies the signature over `message + nonce`, so a
|
|
8
|
+
* signature captured for one operation cannot authorize a different one, and
|
|
9
|
+
* the nonce is consumed on use so the same one cannot be replayed (e.g. to
|
|
10
|
+
* revert a record to an older value).
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildArNSCustodyMessage(action: 'set-record' | 'remove-record', fields: string[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* The ANT owner's half of the envelope, in its own `x-owner-*` headers.
|
|
15
|
+
*
|
|
16
|
+
* Two signatures travel on a record action — the PAYER's signed request over
|
|
17
|
+
* `"" + nonce`, and the OWNER's action-bound proof over `message + nonce` —
|
|
18
|
+
* from two different keys, usually on two different chains. They cannot share
|
|
19
|
+
* one header set: whichever verifier ran second would reject a signature that
|
|
20
|
+
* was never meant for it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function arNSOwnerProofHeaders(owner: ArNSOwnerSigner, message: string, nonce: string): Promise<Record<string, string>>;
|
|
23
|
+
/**
|
|
24
|
+
* Build an {@link ArNSOwnerSigner} from a raw Solana secret key.
|
|
25
|
+
*
|
|
26
|
+
* For servers and tests. A browser wallet (Phantom, Solflare, or a console's
|
|
27
|
+
* embedded wallet) should implement the interface directly against its own
|
|
28
|
+
* `signTransaction` / `signMessage` rather than exposing a secret key.
|
|
29
|
+
*
|
|
30
|
+
* Note the owner needs a key to SIGN with, not a funded account: Turbo is the
|
|
31
|
+
* fee payer on every sponsored action, so this wallet's SOL balance can stay
|
|
32
|
+
* at zero for the entire life of the name.
|
|
33
|
+
*/
|
|
34
|
+
export declare function solanaOwnerSigner(secretKey: Uint8Array | string): ArNSOwnerSigner;
|
|
35
|
+
/**
|
|
36
|
+
* Count the signature slots a prepared transaction still has empty.
|
|
37
|
+
*
|
|
38
|
+
* Turbo pre-signs as fee payer and leaves exactly one slot for the owner, so a
|
|
39
|
+
* client can assert that before prompting a wallet — a cheap way to catch a
|
|
40
|
+
* malformed or already-signed transaction before bothering the user.
|
|
41
|
+
*/
|
|
42
|
+
export declare function emptySignatureSlots(transactionBase64: string): number;
|
|
43
|
+
//# sourceMappingURL=arnsActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arnsActions.d.ts","sourceRoot":"","sources":["../../../src/common/arnsActions.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,YAAY,GAAG,eAAe,EACtC,MAAM,EAAE,MAAM,EAAE,GACf,MAAM,CAER;AAKD;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAcjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,UAAU,GAAG,MAAM,GAC7B,eAAe,CAmBjB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAKrE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArNSAction, ArNSActionCompleted, ArNSActionResult, ArNSFiatPurchaseQuoteParams, ArNSFiatPurchaseQuoteResponse, ArNSNameType, ArNSOwnerSigner, ArNSPriceParams, ArNSPriceResponse, ArNSPurchaseParams, ArNSPurchaseStatusResponse, AuthenticatedArNSFiatPurchaseQuoteParams, Currency, GetCreditShareApprovalsResponse, TokenTools, TokenType, TurboArNSNamesResponse, TurboAuthenticatedPaymentServiceConfiguration, TurboAuthenticatedPaymentServiceInterface, TurboBalanceResponse, TurboCheckoutSessionParams, TurboCheckoutSessionResponse, TurboCountriesResponse, TurboCryptoFundResponse, TurboCurrenciesResponse, TurboDataItemSigner, TurboFiatEstimateForBytesResponse, TurboFiatToArResponse, TurboFreeStatusResponse, TurboFundWithTokensParams, TurboLogger, TurboPaymentHistoryParams, TurboPaymentHistoryResponse, TurboPaymentIntentParams, TurboPaymentIntentResponse, TurboPriceResponse, TurboRatesResponse, TurboSignedRequestHeaders, TurboSubmitFundTxResponse, TurboTokenPriceForBytesResponse, TurboUnauthenticatedPaymentServiceConfiguration, TurboUnauthenticatedPaymentServiceInterface, TurboWincForFiatParams, TurboWincForFiatResponse, TurboWincForTokenParams, TurboWincForTokenResponse, UserAddress } 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";
|
|
@@ -10,6 +10,18 @@ export declare class TurboUnauthenticatedPaymentService implements TurboUnauthen
|
|
|
10
10
|
constructor({ url, logger, retryConfig, token, }: TurboUnauthenticatedPaymentServiceConfiguration);
|
|
11
11
|
getBalance(address: string): Promise<TurboBalanceResponse>;
|
|
12
12
|
getFreeStatus(address: string): Promise<TurboFreeStatusResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the ArNS names a wallet owns or controls -- both custodial names
|
|
15
|
+
* bought via Turbo's ArNS-with-credits feature (Turbo may spawn and hold
|
|
16
|
+
* the ANT on the caller's behalf, depending on the buy) and self-custody
|
|
17
|
+
* names, in one list. See `TurboArNSName` for field semantics, including
|
|
18
|
+
* the `custodial` flag distinguishing the two.
|
|
19
|
+
*
|
|
20
|
+
* To read a name's current records or lease/expiration state, use
|
|
21
|
+
* `@ar.io/sdk` directly against the returned `antId` -- it talks to the
|
|
22
|
+
* chain directly and needs no round-trip through this SDK/backend.
|
|
23
|
+
*/
|
|
24
|
+
getArNSNames(address: string): Promise<TurboArNSNamesResponse>;
|
|
13
25
|
getFiatRates(): Promise<TurboRatesResponse>;
|
|
14
26
|
getFiatToAR({ currency, }: {
|
|
15
27
|
currency: Currency;
|
|
@@ -111,47 +123,155 @@ export declare class TurboAuthenticatedPaymentService extends TurboUnauthenticat
|
|
|
111
123
|
* balance. The bundler performs the on-chain ARIO purchase and debits credits;
|
|
112
124
|
* a `402` (FailedRequestError.status === 402) indicates insufficient credits.
|
|
113
125
|
*/
|
|
114
|
-
purchaseArNSName(params: ArNSPurchaseParams): Promise<ArNSPurchaseResponse>;
|
|
115
|
-
buyArNSName(params: ArNSBuyNameArgs): Promise<ArNSPurchaseResponse>;
|
|
116
|
-
extendArNSLease(params: Omit<ArNSExtendLeaseParams, 'intent'> & ArNSPaidByParams): Promise<ArNSPurchaseResponse>;
|
|
117
|
-
increaseArNSUndernameLimit(params: Omit<ArNSIncreaseUndernameLimitParams, 'intent'> & ArNSPaidByParams): Promise<ArNSPurchaseResponse>;
|
|
118
|
-
upgradeArNSName(params: Omit<ArNSUpgradeNameParams, 'intent'> & ArNSPaidByParams): Promise<ArNSPurchaseResponse>;
|
|
119
|
-
private buildArNSCustodyMessage;
|
|
120
126
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
127
|
+
* Create an action. Returns `completed` or `awaiting-signature`.
|
|
128
|
+
*
|
|
129
|
+
* Credits are debited HERE, not at `/sign`. Capture the returned `nonce`
|
|
130
|
+
* before prompting for a signature: it is the idempotency key, and polling
|
|
131
|
+
* it is how you resume. Never re-create an action to "retry" — that debits
|
|
132
|
+
* a second time. An abandoned action is refunded automatically.
|
|
123
133
|
*/
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}): Promise<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
createArNSAction(action: ArNSAction, params?: Record<string, unknown>, ownerProof?: {
|
|
135
|
+
owner: ArNSOwnerSigner;
|
|
136
|
+
message: string;
|
|
137
|
+
}): Promise<ArNSActionResult>;
|
|
138
|
+
/**
|
|
139
|
+
* Submit the owner-signed transaction for an `awaiting-signature` action.
|
|
140
|
+
*
|
|
141
|
+
* `signedTransaction` is the FULL serialized transaction, base64 — not just
|
|
142
|
+
* the signature. Replaying a completed action returns `alreadyCompleted:
|
|
143
|
+
* true` rather than buying twice, so this is safe to call again if a
|
|
144
|
+
* response is lost.
|
|
145
|
+
*/
|
|
146
|
+
signArNSAction(nonce: string, signedTransaction: string): Promise<ArNSActionCompleted>;
|
|
147
|
+
/**
|
|
148
|
+
* Status of an action by nonce. Open — no signature required — so it works
|
|
149
|
+
* from a status page or callback handler that never holds the payer's key.
|
|
150
|
+
*
|
|
151
|
+
* Terminal success carries `messageId`; terminal failure carries
|
|
152
|
+
* `failedDate`.
|
|
153
|
+
*/
|
|
154
|
+
getArNSActionStatus(nonce: string): Promise<ArNSActionResult & {
|
|
155
|
+
failedDate?: string;
|
|
132
156
|
}>;
|
|
133
|
-
/**
|
|
134
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Run an action to a terminal state, signing if the server asks for it.
|
|
159
|
+
*
|
|
160
|
+
* This is the two-shape branch, once, in one place — so callers cannot
|
|
161
|
+
* hardcode which actions need a signature and break when a customer
|
|
162
|
+
* exercises ownership.
|
|
163
|
+
*/
|
|
164
|
+
private completeArNSAction;
|
|
165
|
+
/**
|
|
166
|
+
* Buy a name. The ANT is minted straight to `owner` — Turbo never holds it.
|
|
167
|
+
*
|
|
168
|
+
* This is the ONLY action that always needs the owner's signature:
|
|
169
|
+
* `ario_ant::initialize` is the one instruction in the whole lifecycle that
|
|
170
|
+
* requires the ANT owner's key. The customer signs once, here, and never
|
|
171
|
+
* again unless they change controllers or transfer the name.
|
|
172
|
+
*
|
|
173
|
+
* The owner needs a Solana key to sign with, NOT a funded one — Turbo pays
|
|
174
|
+
* every lamport of fee and rent.
|
|
175
|
+
*/
|
|
176
|
+
buyArNSName({ name, owner, type, years, paidBy, onNonce, }: {
|
|
177
|
+
name: string;
|
|
178
|
+
owner: ArNSOwnerSigner;
|
|
179
|
+
type?: ArNSNameType;
|
|
180
|
+
years?: number;
|
|
181
|
+
paidBy?: UserAddress | UserAddress[];
|
|
182
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
183
|
+
}): Promise<ArNSActionCompleted>;
|
|
184
|
+
/** Extend a lease. Permissionless on chain — no owner signature needed. */
|
|
185
|
+
extendArNSLease({ name, years, paidBy, onNonce, }: {
|
|
186
|
+
name: string;
|
|
187
|
+
years: number;
|
|
188
|
+
paidBy?: UserAddress | UserAddress[];
|
|
189
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
190
|
+
}): Promise<ArNSActionCompleted>;
|
|
191
|
+
/** Upgrade a lease to a permanent name. No owner signature needed. */
|
|
192
|
+
upgradeArNSName({ name, paidBy, onNonce, }: {
|
|
193
|
+
name: string;
|
|
194
|
+
paidBy?: UserAddress | UserAddress[];
|
|
195
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
196
|
+
}): Promise<ArNSActionCompleted>;
|
|
197
|
+
/** Raise the undername limit. No owner signature needed. */
|
|
198
|
+
increaseArNSUndernameLimit({ name, increaseQty, paidBy, onNonce, }: {
|
|
199
|
+
name: string;
|
|
200
|
+
increaseQty: number;
|
|
201
|
+
paidBy?: UserAddress | UserAddress[];
|
|
202
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
203
|
+
}): Promise<ArNSActionCompleted>;
|
|
204
|
+
/**
|
|
205
|
+
* Point a name (or undername) at an Arweave transaction.
|
|
206
|
+
*
|
|
207
|
+
* Free — Turbo sponsors the Solana fee. Completes in one call while Turbo is
|
|
208
|
+
* a controller of the ANT, and returns `awaiting-signature` once the customer
|
|
209
|
+
* has revoked Turbo, at which point `owner` signs it themselves. Both paths
|
|
210
|
+
* are handled here.
|
|
211
|
+
*
|
|
212
|
+
* The owner proof is required EITHER WAY: Turbo is directing its own
|
|
213
|
+
* controller authority over an asset someone else owns, so nothing on chain
|
|
214
|
+
* records the owner's consent and we demand it. It is a MESSAGE signature,
|
|
215
|
+
* not a transaction — cheap and offline, but still a wallet prompt.
|
|
216
|
+
*/
|
|
217
|
+
setArNSRecord({ antId, owner, transactionId, undername, ttlSeconds, onNonce, }: {
|
|
135
218
|
antId: string;
|
|
136
|
-
|
|
219
|
+
owner: ArNSOwnerSigner;
|
|
137
220
|
transactionId: string;
|
|
138
|
-
|
|
139
|
-
|
|
221
|
+
undername?: string;
|
|
222
|
+
ttlSeconds?: number;
|
|
223
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
224
|
+
}): Promise<ArNSActionCompleted>;
|
|
225
|
+
/** Remove a record (an undername). Free; same two-shape rules as setArNSRecord. */
|
|
226
|
+
removeArNSRecord({ antId, owner, undername, onNonce, }: {
|
|
140
227
|
antId: string;
|
|
228
|
+
owner: ArNSOwnerSigner;
|
|
141
229
|
undername: string;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
230
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
231
|
+
}): Promise<ArNSActionCompleted>;
|
|
232
|
+
/**
|
|
233
|
+
* Grant controller rights on the ANT. Omit `target` for Turbo itself, which
|
|
234
|
+
* is what makes `setArNSRecord` a single call.
|
|
235
|
+
*
|
|
236
|
+
* Owner-signed: changing an ANT's access control is an owner-only
|
|
237
|
+
* instruction. Free to the customer — Turbo funds the ACL page growth.
|
|
238
|
+
*/
|
|
239
|
+
addArNSController({ antId, owner, target, onNonce, }: {
|
|
148
240
|
antId: string;
|
|
149
|
-
|
|
150
|
-
|
|
241
|
+
owner: ArNSOwnerSigner;
|
|
242
|
+
target?: string;
|
|
243
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
244
|
+
}): Promise<ArNSActionCompleted>;
|
|
245
|
+
/**
|
|
246
|
+
* Revoke controller rights — the escape hatch that keeps "Turbo is not a
|
|
247
|
+
* custodian" honest.
|
|
248
|
+
*
|
|
249
|
+
* Always available, always free, and needs nothing from Turbo but the fee.
|
|
250
|
+
* After revoking, `setArNSRecord` keeps working: it simply starts returning
|
|
251
|
+
* `awaiting-signature` so the owner signs their own record writes.
|
|
252
|
+
*/
|
|
253
|
+
removeArNSController({ antId, owner, target, onNonce, }: {
|
|
151
254
|
antId: string;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
255
|
+
owner: ArNSOwnerSigner;
|
|
256
|
+
target?: string;
|
|
257
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
258
|
+
}): Promise<ArNSActionCompleted>;
|
|
259
|
+
/**
|
|
260
|
+
* Hand the ANT to a new owner. Irreversible: after this lands, `owner` no
|
|
261
|
+
* longer controls the name. Owner-signed, and sponsored like the rest.
|
|
262
|
+
*/
|
|
263
|
+
transferArNSAnt({ antId, owner, target, onNonce, }: {
|
|
264
|
+
antId: string;
|
|
265
|
+
owner: ArNSOwnerSigner;
|
|
266
|
+
target: string;
|
|
267
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
268
|
+
}): Promise<ArNSActionCompleted>;
|
|
269
|
+
/**
|
|
270
|
+
* Defaults to the signer's own address when `userAddress` is omitted
|
|
271
|
+
* (`null`/`undefined`). Passing `''` does NOT trigger this default --
|
|
272
|
+
* mirrors `getBalance`'s existing behavior above.
|
|
273
|
+
*/
|
|
274
|
+
getArNSNames(userAddress?: string): Promise<TurboArNSNamesResponse>;
|
|
155
275
|
getCreditShareApprovals({ userAddress, }: {
|
|
156
276
|
userAddress?: string;
|
|
157
277
|
}): Promise<GetCreditShareApprovalsResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/common/payment.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../../src/common/payment.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,2BAA2B,EAC3B,6BAA6B,EAC7B,YAAY,EACZ,eAAe,EAEf,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,wCAAwC,EACxC,QAAQ,EACR,+BAA+B,EAE/B,UAAU,EACV,SAAS,EAET,sBAAsB,EACtB,6CAA6C,EAC7C,yCAAyC,EACzC,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,iCAAiC,EACjC,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EAEzB,WAAW,EACX,yBAAyB,EACzB,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAE1B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C,WAAW,GACZ,EAAE;QACD,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,GAAG,OAAO,CAAC,+BAA+B,CAAC;IAK/B,cAAc,CAAC,EAC1B,MAAM,EACN,UAAe,GAChB,EAAE,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAQhD,qBAAqB,CAChC,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,4BAA4B,CAAC;YAI1B,sBAAsB;IAYvB,eAAe,CAAC,EAC3B,aAAiB,EACjB,WAAW,EAAE,YAAY,EACzB,6BAA6B,GAC9B,EAAE,yBAAyB,GAAG,OAAO,CAAC,uBAAuB,CAAC;CA0DhE"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { BigNumber } from 'bignumber.js';
|
|
17
|
-
import {
|
|
17
|
+
import { ArNSAction, ArNSActionCompleted, ArNSActionResult, ArNSFiatPurchaseQuoteParams, ArNSFiatPurchaseQuoteResponse, ArNSNameType, ArNSOwnerSigner, ArNSPriceParams, ArNSPriceResponse, ArNSPurchaseStatusResponse, AuthenticatedArNSFiatPurchaseQuoteParams, CreditShareApproval, Currency, FundingOptions, GetCreditShareApprovalsResponse, NativeAddress, TokenType, TurboAbortSignal, TurboArNSNamesResponse, TurboAuthenticatedClientConfiguration, TurboAuthenticatedClientInterface, TurboAuthenticatedPaymentServiceInterface, TurboAuthenticatedUploadServiceInterface, TurboBalanceResponse, TurboCheckoutSessionParams, TurboCheckoutSessionResponse, TurboChunkingParams, TurboCountriesResponse, TurboCreateCreditShareApprovalParams, TurboCryptoFundResponse, TurboCurrenciesResponse, TurboDataItemSigner, TurboFiatEstimateForBytesResponse, TurboFiatToArResponse, TurboFreeStatusResponse, TurboFundWithTokensParams, TurboPaymentHistoryParams, TurboPaymentHistoryResponse, TurboPaymentIntentParams, TurboPaymentIntentResponse, TurboPriceResponse, TurboRatesResponse, TurboRevokeCreditsParams, TurboSignedDataItemFactory, TurboSubmitFundTxResponse, TurboTokenPriceForBytesResponse, TurboUnauthenticatedClientConfiguration, TurboUnauthenticatedClientInterface, TurboUnauthenticatedPaymentServiceInterface, TurboUnauthenticatedUploadServiceInterface, TurboUploadAndSigningEmitterEvents, TurboUploadDataItemResponse, TurboUploadEmitterEvents, TurboUploadFileWithFileOrPathParams, TurboUploadFileWithStreamFactoryParams, TurboUploadFolderParams, TurboUploadFolderResponse, TurboWincForFiatParams, TurboWincForFiatResponse, TurboWincForTokenParams, TurboWincForTokenResponse, UploadDataInput, UploadDataType, UserAddress } from '../types.js';
|
|
18
18
|
/**
|
|
19
19
|
* Testing configuration.
|
|
20
20
|
*/
|
|
@@ -70,6 +70,17 @@ export declare class TurboUnauthenticatedClient implements TurboUnauthenticatedC
|
|
|
70
70
|
getArNSPurchaseStatus(p: {
|
|
71
71
|
nonce: string;
|
|
72
72
|
}): Promise<ArNSPurchaseStatusResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Returns the ArNS names a wallet owns or controls via Turbo's custodial
|
|
75
|
+
* ArNS-with-credits feature. `custodial: true` on a returned name means
|
|
76
|
+
* Turbo still holds/manages its ANT (transfer/manage routes apply);
|
|
77
|
+
* `custodial: false` means self-custody (or an already-completed exit) and
|
|
78
|
+
* is informational only.
|
|
79
|
+
*
|
|
80
|
+
* To read a name's current records or lease/expiration state, use
|
|
81
|
+
* `@ar.io/sdk` directly against the returned `antId`.
|
|
82
|
+
*/
|
|
83
|
+
getArNSNames(address: NativeAddress): Promise<TurboArNSNamesResponse>;
|
|
73
84
|
/**
|
|
74
85
|
* Quote a fiat (Stripe) ArNS purchase — buy a name with a credit card in one
|
|
75
86
|
* step, no Turbo Credits top-up in between. Complete the returned
|
|
@@ -171,13 +182,17 @@ export declare class TurboAuthenticatedClient extends TurboUnauthenticatedClient
|
|
|
171
182
|
* `cursor` field (with `hasMore === true`) to fetch the next page.
|
|
172
183
|
*/
|
|
173
184
|
getPaymentHistory(params?: TurboPaymentHistoryParams): Promise<TurboPaymentHistoryResponse>;
|
|
174
|
-
/**
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
|
|
185
|
+
/** Create an action. Debits credits HERE — capture the nonce before signing. */
|
|
186
|
+
createArNSAction(action: ArNSAction, params?: Record<string, unknown>, ownerProof?: {
|
|
187
|
+
owner: ArNSOwnerSigner;
|
|
188
|
+
message: string;
|
|
189
|
+
}): Promise<ArNSActionResult>;
|
|
190
|
+
/** Submit the owner-signed transaction (FULL serialized tx, base64). */
|
|
191
|
+
signArNSAction(nonce: string, signedTransaction: string): Promise<ArNSActionCompleted>;
|
|
192
|
+
/** Status by nonce — open, needs no signature. Use it to resume. */
|
|
193
|
+
getArNSActionStatus(nonce: string): Promise<ArNSActionResult & {
|
|
194
|
+
failedDate?: string;
|
|
195
|
+
}>;
|
|
181
196
|
/**
|
|
182
197
|
* Quote a fiat (Stripe) ArNS purchase for this signer's wallet — a credit-card
|
|
183
198
|
* buy in one step, with no Turbo Credits top-up in between. `address` defaults
|
|
@@ -188,41 +203,81 @@ export declare class TurboAuthenticatedClient extends TurboUnauthenticatedClient
|
|
|
188
203
|
* `FiatPaymentsDisabledError` when the service has Stripe switched off.
|
|
189
204
|
*/
|
|
190
205
|
getArNSFiatPurchaseQuote(params: AuthenticatedArNSFiatPurchaseQuoteParams): Promise<ArNSFiatPurchaseQuoteResponse>;
|
|
191
|
-
/**
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
+
/**
|
|
207
|
+
* Buy a name. The ANT is minted straight to `owner`; Turbo never holds it.
|
|
208
|
+
* The only action that always needs the owner's signature — once, ever.
|
|
209
|
+
*/
|
|
210
|
+
buyArNSName(params: {
|
|
211
|
+
name: string;
|
|
212
|
+
owner: ArNSOwnerSigner;
|
|
213
|
+
type?: ArNSNameType;
|
|
214
|
+
years?: number;
|
|
215
|
+
paidBy?: UserAddress | UserAddress[];
|
|
216
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
217
|
+
}): Promise<ArNSActionCompleted>;
|
|
218
|
+
/** Extend a lease. No owner signature needed. */
|
|
219
|
+
extendArNSLease(params: {
|
|
220
|
+
name: string;
|
|
221
|
+
years: number;
|
|
222
|
+
paidBy?: UserAddress | UserAddress[];
|
|
223
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
224
|
+
}): Promise<ArNSActionCompleted>;
|
|
225
|
+
/** Raise the undername limit. No owner signature needed. */
|
|
226
|
+
increaseArNSUndernameLimit(params: {
|
|
227
|
+
name: string;
|
|
228
|
+
increaseQty: number;
|
|
229
|
+
paidBy?: UserAddress | UserAddress[];
|
|
230
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
231
|
+
}): Promise<ArNSActionCompleted>;
|
|
232
|
+
/** Upgrade a lease to a permanent name. No owner signature needed. */
|
|
233
|
+
upgradeArNSName(params: {
|
|
234
|
+
name: string;
|
|
235
|
+
paidBy?: UserAddress | UserAddress[];
|
|
236
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
237
|
+
}): Promise<ArNSActionCompleted>;
|
|
238
|
+
/** Point a name (or undername) at data. Free; handles both shapes. */
|
|
206
239
|
setArNSRecord(params: {
|
|
207
240
|
antId: string;
|
|
208
|
-
|
|
209
|
-
transactionId: string;
|
|
210
|
-
ttlSeconds: number;
|
|
211
|
-
}): Promise<{
|
|
212
|
-
antId: string;
|
|
213
|
-
undername: string;
|
|
241
|
+
owner: ArNSOwnerSigner;
|
|
214
242
|
transactionId: string;
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
243
|
+
undername?: string;
|
|
244
|
+
ttlSeconds?: number;
|
|
245
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
246
|
+
}): Promise<ArNSActionCompleted>;
|
|
247
|
+
/** Remove a record. Free; handles both shapes. */
|
|
218
248
|
removeArNSRecord(params: {
|
|
219
249
|
antId: string;
|
|
250
|
+
owner: ArNSOwnerSigner;
|
|
220
251
|
undername: string;
|
|
221
|
-
|
|
252
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
253
|
+
}): Promise<ArNSActionCompleted>;
|
|
254
|
+
/** Grant controller rights — omit `target` for Turbo itself. Free. */
|
|
255
|
+
addArNSController(params: {
|
|
222
256
|
antId: string;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
257
|
+
owner: ArNSOwnerSigner;
|
|
258
|
+
target?: string;
|
|
259
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
260
|
+
}): Promise<ArNSActionCompleted>;
|
|
261
|
+
/** Revoke controller rights. Always available, always free. */
|
|
262
|
+
removeArNSController(params: {
|
|
263
|
+
antId: string;
|
|
264
|
+
owner: ArNSOwnerSigner;
|
|
265
|
+
target?: string;
|
|
266
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
267
|
+
}): Promise<ArNSActionCompleted>;
|
|
268
|
+
/** Hand the ANT to a new owner. Irreversible. Free. */
|
|
269
|
+
transferArNSAnt(params: {
|
|
270
|
+
antId: string;
|
|
271
|
+
owner: ArNSOwnerSigner;
|
|
272
|
+
target: string;
|
|
273
|
+
onNonce?: (nonce: string) => void | Promise<void>;
|
|
274
|
+
}): Promise<ArNSActionCompleted>;
|
|
275
|
+
/**
|
|
276
|
+
* Returns the ArNS names owned or controlled by the connected signer's
|
|
277
|
+
* wallet (or the given `userAddress`) via Turbo's custodial
|
|
278
|
+
* ArNS-with-credits feature.
|
|
279
|
+
*/
|
|
280
|
+
getArNSNames(userAddress?: NativeAddress): Promise<TurboArNSNamesResponse>;
|
|
226
281
|
/**
|
|
227
282
|
* Returns a list of all credit share approvals for the user.
|
|
228
283
|
*/
|