@ar.io/sdk 3.12.1 → 3.13.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/bundles/web.bundle.min.js +192 -256
- package/lib/cjs/cli/commands/arnsPurchaseCommands.js +10 -0
- package/lib/cjs/cli/options.js +5 -0
- package/lib/cjs/cli/utils.js +4 -0
- package/lib/cjs/common/io.js +4 -0
- package/lib/cjs/common/turbo.js +2 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/commands/arnsPurchaseCommands.js +11 -1
- package/lib/esm/cli/options.js +5 -0
- package/lib/esm/cli/utils.js +3 -0
- package/lib/esm/common/io.js +4 -0
- package/lib/esm/common/turbo.js +2 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/options.d.ts +4 -0
- package/lib/types/cli/utils.d.ts +3 -0
- package/lib/types/common/turbo.d.ts +2 -1
- package/lib/types/types/io.d.ts +4 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -12,6 +12,7 @@ async function buyRecordCLICommand(o) {
|
|
|
12
12
|
const type = (0, utils_js_1.recordTypeFromOptions)(o);
|
|
13
13
|
const years = (0, utils_js_1.positiveIntegerFromOptions)(o, 'years');
|
|
14
14
|
const fundFrom = (0, utils_js_1.fundFromFromOptions)(o);
|
|
15
|
+
const referrer = (0, utils_js_1.referrerFromOptions)(o);
|
|
15
16
|
const processId = o.processId;
|
|
16
17
|
if (processId === undefined) {
|
|
17
18
|
// TODO: Spawn ANT process, register it to ANT registry, get process ID
|
|
@@ -45,12 +46,14 @@ async function buyRecordCLICommand(o) {
|
|
|
45
46
|
years,
|
|
46
47
|
fundFrom: (0, utils_js_1.fundFromFromOptions)(o),
|
|
47
48
|
paidBy: (0, utils_js_1.stringArrayFromOptions)(o, 'paidBy'),
|
|
49
|
+
referrer,
|
|
48
50
|
}, (0, utils_js_1.customTagsFromOptions)(o));
|
|
49
51
|
}
|
|
50
52
|
async function upgradeRecordCLICommand(o) {
|
|
51
53
|
const name = (0, utils_js_1.requiredStringFromOptions)(o, 'name');
|
|
52
54
|
const { ario, signerAddress } = (0, utils_js_1.writeARIOFromOptions)(o);
|
|
53
55
|
const fundFrom = (0, utils_js_1.fundFromFromOptions)(o);
|
|
56
|
+
const referrer = (0, utils_js_1.referrerFromOptions)(o);
|
|
54
57
|
if (!o.skipConfirmation) {
|
|
55
58
|
const existingRecord = await ario.getArNSRecord({
|
|
56
59
|
name,
|
|
@@ -77,12 +80,14 @@ async function upgradeRecordCLICommand(o) {
|
|
|
77
80
|
name,
|
|
78
81
|
fundFrom,
|
|
79
82
|
paidBy: (0, utils_js_1.stringArrayFromOptions)(o, 'paidBy'),
|
|
83
|
+
referrer,
|
|
80
84
|
});
|
|
81
85
|
}
|
|
82
86
|
async function extendLeaseCLICommand(o) {
|
|
83
87
|
const name = (0, utils_js_1.requiredStringFromOptions)(o, 'name');
|
|
84
88
|
const years = (0, utils_js_1.requiredPositiveIntegerFromOptions)(o, 'years');
|
|
85
89
|
const fundFrom = (0, utils_js_1.fundFromFromOptions)(o);
|
|
90
|
+
const referrer = (0, utils_js_1.referrerFromOptions)(o);
|
|
86
91
|
const { ario, signerAddress } = (0, utils_js_1.writeARIOFromOptions)(o);
|
|
87
92
|
if (!o.skipConfirmation) {
|
|
88
93
|
const existingRecord = await ario.getArNSRecord({
|
|
@@ -111,12 +116,14 @@ async function extendLeaseCLICommand(o) {
|
|
|
111
116
|
name,
|
|
112
117
|
years,
|
|
113
118
|
paidBy: (0, utils_js_1.stringArrayFromOptions)(o, 'paidBy'),
|
|
119
|
+
referrer,
|
|
114
120
|
}, (0, utils_js_1.customTagsFromOptions)(o));
|
|
115
121
|
}
|
|
116
122
|
async function increaseUndernameLimitCLICommand(o) {
|
|
117
123
|
const name = (0, utils_js_1.requiredStringFromOptions)(o, 'name');
|
|
118
124
|
const increaseCount = (0, utils_js_1.requiredPositiveIntegerFromOptions)(o, 'increaseCount');
|
|
119
125
|
const fundFrom = (0, utils_js_1.fundFromFromOptions)(o);
|
|
126
|
+
const referrer = (0, utils_js_1.referrerFromOptions)(o);
|
|
120
127
|
const { ario, signerAddress } = (0, utils_js_1.writeARIOFromOptions)(o);
|
|
121
128
|
if (!o.skipConfirmation) {
|
|
122
129
|
const existingRecord = await ario.getArNSRecord({
|
|
@@ -142,11 +149,13 @@ async function increaseUndernameLimitCLICommand(o) {
|
|
|
142
149
|
name,
|
|
143
150
|
increaseCount,
|
|
144
151
|
paidBy: (0, utils_js_1.stringArrayFromOptions)(o, 'paidBy'),
|
|
152
|
+
referrer,
|
|
145
153
|
}, (0, utils_js_1.customTagsFromOptions)(o));
|
|
146
154
|
}
|
|
147
155
|
async function requestPrimaryNameCLICommand(o) {
|
|
148
156
|
const { ario, signerAddress } = (0, utils_js_1.writeARIOFromOptions)(o);
|
|
149
157
|
const fundFrom = (0, utils_js_1.fundFromFromOptions)(o);
|
|
158
|
+
const referrer = (0, utils_js_1.referrerFromOptions)(o);
|
|
150
159
|
const name = (0, utils_js_1.requiredStringFromOptions)(o, 'name');
|
|
151
160
|
if (!o.skipConfirmation) {
|
|
152
161
|
// TODO: Assert name requested is not already owned?
|
|
@@ -167,5 +176,6 @@ async function requestPrimaryNameCLICommand(o) {
|
|
|
167
176
|
name,
|
|
168
177
|
fundFrom,
|
|
169
178
|
paidBy: (0, utils_js_1.stringArrayFromOptions)(o, 'paidBy'),
|
|
179
|
+
referrer,
|
|
170
180
|
}, (0, utils_js_1.customTagsFromOptions)(o));
|
|
171
181
|
}
|
package/lib/cjs/cli/options.js
CHANGED
|
@@ -286,6 +286,10 @@ exports.optionMap = {
|
|
|
286
286
|
description: 'Addresses to pay for the interaction',
|
|
287
287
|
type: 'array',
|
|
288
288
|
},
|
|
289
|
+
referrer: {
|
|
290
|
+
alias: '--referrer <referrer>',
|
|
291
|
+
description: 'The referrer for ArNS purchase tracking',
|
|
292
|
+
},
|
|
289
293
|
};
|
|
290
294
|
exports.walletOptions = [
|
|
291
295
|
exports.optionMap.walletFile,
|
|
@@ -309,6 +313,7 @@ exports.arnsPurchaseOptions = [
|
|
|
309
313
|
exports.optionMap.fundFrom,
|
|
310
314
|
exports.optionMap.paidBy,
|
|
311
315
|
exports.optionMap.paymentUrl,
|
|
316
|
+
exports.optionMap.referrer,
|
|
312
317
|
];
|
|
313
318
|
exports.epochOptions = [exports.optionMap.epochIndex, exports.optionMap.timestamp];
|
|
314
319
|
exports.addressAndVaultIdOptions = [exports.optionMap.address, exports.optionMap.vaultId];
|
package/lib/cjs/cli/utils.js
CHANGED
|
@@ -46,6 +46,7 @@ exports.requiredPositiveIntegerFromOptions = requiredPositiveIntegerFromOptions;
|
|
|
46
46
|
exports.getANTStateFromOptions = getANTStateFromOptions;
|
|
47
47
|
exports.getTokenCostParamsFromOptions = getTokenCostParamsFromOptions;
|
|
48
48
|
exports.fundFromFromOptions = fundFromFromOptions;
|
|
49
|
+
exports.referrerFromOptions = referrerFromOptions;
|
|
49
50
|
exports.assertLockLengthInRange = assertLockLengthInRange;
|
|
50
51
|
/**
|
|
51
52
|
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
|
@@ -507,6 +508,9 @@ function fundFromFromOptions(o) {
|
|
|
507
508
|
}
|
|
508
509
|
return o.fundFrom ?? 'balance';
|
|
509
510
|
}
|
|
511
|
+
function referrerFromOptions(o) {
|
|
512
|
+
return o.referrer;
|
|
513
|
+
}
|
|
510
514
|
function assertLockLengthInRange(lockLengthMs, assertMin = true) {
|
|
511
515
|
const minLockLengthMs = 1209600000; // 14 days
|
|
512
516
|
const maxLockLengthMs = 378432000000; // ~12 years
|
package/lib/cjs/common/io.js
CHANGED
|
@@ -986,6 +986,7 @@ class ARIOWriteable extends ARIOReadable {
|
|
|
986
986
|
{ name: 'Process-Id', value: params.processId },
|
|
987
987
|
{ name: 'Purchase-Type', value: params.type || 'lease' },
|
|
988
988
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
989
|
+
{ name: 'Referrer', value: params.referrer },
|
|
989
990
|
];
|
|
990
991
|
return this.process.send({
|
|
991
992
|
signer: this.signer,
|
|
@@ -1016,6 +1017,7 @@ class ARIOWriteable extends ARIOReadable {
|
|
|
1016
1017
|
{ name: 'Action', value: 'Upgrade-Name' },
|
|
1017
1018
|
{ name: 'Name', value: params.name },
|
|
1018
1019
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
1020
|
+
{ name: 'Referrer', value: params.referrer },
|
|
1019
1021
|
];
|
|
1020
1022
|
return this.process.send({
|
|
1021
1023
|
signer: this.signer,
|
|
@@ -1049,6 +1051,7 @@ class ARIOWriteable extends ARIOReadable {
|
|
|
1049
1051
|
{ name: 'Name', value: params.name },
|
|
1050
1052
|
{ name: 'Years', value: params.years.toString() },
|
|
1051
1053
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
1054
|
+
{ name: 'Referrer', value: params.referrer },
|
|
1052
1055
|
];
|
|
1053
1056
|
return this.process.send({
|
|
1054
1057
|
signer: this.signer,
|
|
@@ -1073,6 +1076,7 @@ class ARIOWriteable extends ARIOReadable {
|
|
|
1073
1076
|
{ name: 'Name', value: params.name },
|
|
1074
1077
|
{ name: 'Quantity', value: params.increaseCount.toString() },
|
|
1075
1078
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
1079
|
+
{ name: 'Referrer', value: params.referrer },
|
|
1076
1080
|
];
|
|
1077
1081
|
return this.process.send({
|
|
1078
1082
|
signer: this.signer,
|
package/lib/cjs/common/turbo.js
CHANGED
|
@@ -155,7 +155,7 @@ class TurboArNSPaymentProviderAuthenticated extends TurboArNSPaymentProviderUnau
|
|
|
155
155
|
}
|
|
156
156
|
this.signer = signer;
|
|
157
157
|
}
|
|
158
|
-
async initiateArNSPurchase({ intent, name, quantity, type, processId, years, paidBy = [], }) {
|
|
158
|
+
async initiateArNSPurchase({ intent, name, quantity, type, processId, years, paidBy = [], referrer, }) {
|
|
159
159
|
// Signer check is implicitly handled by requiring it in the constructor
|
|
160
160
|
const url = (0, url_js_1.urlWithSearchParams)({
|
|
161
161
|
baseUrl: `${this.paymentUrl}/v1/arns/purchase/${intent}/${name}`,
|
|
@@ -165,6 +165,7 @@ class TurboArNSPaymentProviderAuthenticated extends TurboArNSPaymentProviderUnau
|
|
|
165
165
|
type,
|
|
166
166
|
years,
|
|
167
167
|
paidBy,
|
|
168
|
+
referrer,
|
|
168
169
|
},
|
|
169
170
|
});
|
|
170
171
|
const headers = await signedRequestHeadersFromSigner({
|
package/lib/cjs/version.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { assertConfirmationPrompt, assertEnoughBalanceForArNSPurchase, customTagsFromOptions, fundFromFromOptions, positiveIntegerFromOptions, recordTypeFromOptions, requiredPositiveIntegerFromOptions, requiredStringFromOptions, stringArrayFromOptions, writeARIOFromOptions, } from '../utils.js';
|
|
1
|
+
import { assertConfirmationPrompt, assertEnoughBalanceForArNSPurchase, customTagsFromOptions, fundFromFromOptions, positiveIntegerFromOptions, recordTypeFromOptions, referrerFromOptions, requiredPositiveIntegerFromOptions, requiredStringFromOptions, stringArrayFromOptions, writeARIOFromOptions, } from '../utils.js';
|
|
2
2
|
export async function buyRecordCLICommand(o) {
|
|
3
3
|
const { ario, signerAddress } = writeARIOFromOptions(o);
|
|
4
4
|
const name = requiredStringFromOptions(o, 'name');
|
|
5
5
|
const type = recordTypeFromOptions(o);
|
|
6
6
|
const years = positiveIntegerFromOptions(o, 'years');
|
|
7
7
|
const fundFrom = fundFromFromOptions(o);
|
|
8
|
+
const referrer = referrerFromOptions(o);
|
|
8
9
|
const processId = o.processId;
|
|
9
10
|
if (processId === undefined) {
|
|
10
11
|
// TODO: Spawn ANT process, register it to ANT registry, get process ID
|
|
@@ -38,12 +39,14 @@ export async function buyRecordCLICommand(o) {
|
|
|
38
39
|
years,
|
|
39
40
|
fundFrom: fundFromFromOptions(o),
|
|
40
41
|
paidBy: stringArrayFromOptions(o, 'paidBy'),
|
|
42
|
+
referrer,
|
|
41
43
|
}, customTagsFromOptions(o));
|
|
42
44
|
}
|
|
43
45
|
export async function upgradeRecordCLICommand(o) {
|
|
44
46
|
const name = requiredStringFromOptions(o, 'name');
|
|
45
47
|
const { ario, signerAddress } = writeARIOFromOptions(o);
|
|
46
48
|
const fundFrom = fundFromFromOptions(o);
|
|
49
|
+
const referrer = referrerFromOptions(o);
|
|
47
50
|
if (!o.skipConfirmation) {
|
|
48
51
|
const existingRecord = await ario.getArNSRecord({
|
|
49
52
|
name,
|
|
@@ -70,12 +73,14 @@ export async function upgradeRecordCLICommand(o) {
|
|
|
70
73
|
name,
|
|
71
74
|
fundFrom,
|
|
72
75
|
paidBy: stringArrayFromOptions(o, 'paidBy'),
|
|
76
|
+
referrer,
|
|
73
77
|
});
|
|
74
78
|
}
|
|
75
79
|
export async function extendLeaseCLICommand(o) {
|
|
76
80
|
const name = requiredStringFromOptions(o, 'name');
|
|
77
81
|
const years = requiredPositiveIntegerFromOptions(o, 'years');
|
|
78
82
|
const fundFrom = fundFromFromOptions(o);
|
|
83
|
+
const referrer = referrerFromOptions(o);
|
|
79
84
|
const { ario, signerAddress } = writeARIOFromOptions(o);
|
|
80
85
|
if (!o.skipConfirmation) {
|
|
81
86
|
const existingRecord = await ario.getArNSRecord({
|
|
@@ -104,12 +109,14 @@ export async function extendLeaseCLICommand(o) {
|
|
|
104
109
|
name,
|
|
105
110
|
years,
|
|
106
111
|
paidBy: stringArrayFromOptions(o, 'paidBy'),
|
|
112
|
+
referrer,
|
|
107
113
|
}, customTagsFromOptions(o));
|
|
108
114
|
}
|
|
109
115
|
export async function increaseUndernameLimitCLICommand(o) {
|
|
110
116
|
const name = requiredStringFromOptions(o, 'name');
|
|
111
117
|
const increaseCount = requiredPositiveIntegerFromOptions(o, 'increaseCount');
|
|
112
118
|
const fundFrom = fundFromFromOptions(o);
|
|
119
|
+
const referrer = referrerFromOptions(o);
|
|
113
120
|
const { ario, signerAddress } = writeARIOFromOptions(o);
|
|
114
121
|
if (!o.skipConfirmation) {
|
|
115
122
|
const existingRecord = await ario.getArNSRecord({
|
|
@@ -135,11 +142,13 @@ export async function increaseUndernameLimitCLICommand(o) {
|
|
|
135
142
|
name,
|
|
136
143
|
increaseCount,
|
|
137
144
|
paidBy: stringArrayFromOptions(o, 'paidBy'),
|
|
145
|
+
referrer,
|
|
138
146
|
}, customTagsFromOptions(o));
|
|
139
147
|
}
|
|
140
148
|
export async function requestPrimaryNameCLICommand(o) {
|
|
141
149
|
const { ario, signerAddress } = writeARIOFromOptions(o);
|
|
142
150
|
const fundFrom = fundFromFromOptions(o);
|
|
151
|
+
const referrer = referrerFromOptions(o);
|
|
143
152
|
const name = requiredStringFromOptions(o, 'name');
|
|
144
153
|
if (!o.skipConfirmation) {
|
|
145
154
|
// TODO: Assert name requested is not already owned?
|
|
@@ -160,5 +169,6 @@ export async function requestPrimaryNameCLICommand(o) {
|
|
|
160
169
|
name,
|
|
161
170
|
fundFrom,
|
|
162
171
|
paidBy: stringArrayFromOptions(o, 'paidBy'),
|
|
172
|
+
referrer,
|
|
163
173
|
}, customTagsFromOptions(o));
|
|
164
174
|
}
|
package/lib/esm/cli/options.js
CHANGED
|
@@ -283,6 +283,10 @@ export const optionMap = {
|
|
|
283
283
|
description: 'Addresses to pay for the interaction',
|
|
284
284
|
type: 'array',
|
|
285
285
|
},
|
|
286
|
+
referrer: {
|
|
287
|
+
alias: '--referrer <referrer>',
|
|
288
|
+
description: 'The referrer for ArNS purchase tracking',
|
|
289
|
+
},
|
|
286
290
|
};
|
|
287
291
|
export const walletOptions = [
|
|
288
292
|
optionMap.walletFile,
|
|
@@ -306,6 +310,7 @@ export const arnsPurchaseOptions = [
|
|
|
306
310
|
optionMap.fundFrom,
|
|
307
311
|
optionMap.paidBy,
|
|
308
312
|
optionMap.paymentUrl,
|
|
313
|
+
optionMap.referrer,
|
|
309
314
|
];
|
|
310
315
|
export const epochOptions = [optionMap.epochIndex, optionMap.timestamp];
|
|
311
316
|
export const addressAndVaultIdOptions = [optionMap.address, optionMap.vaultId];
|
package/lib/esm/cli/utils.js
CHANGED
|
@@ -458,6 +458,9 @@ export function fundFromFromOptions(o) {
|
|
|
458
458
|
}
|
|
459
459
|
return o.fundFrom ?? 'balance';
|
|
460
460
|
}
|
|
461
|
+
export function referrerFromOptions(o) {
|
|
462
|
+
return o.referrer;
|
|
463
|
+
}
|
|
461
464
|
export function assertLockLengthInRange(lockLengthMs, assertMin = true) {
|
|
462
465
|
const minLockLengthMs = 1209600000; // 14 days
|
|
463
466
|
const maxLockLengthMs = 378432000000; // ~12 years
|
package/lib/esm/common/io.js
CHANGED
|
@@ -981,6 +981,7 @@ export class ARIOWriteable extends ARIOReadable {
|
|
|
981
981
|
{ name: 'Process-Id', value: params.processId },
|
|
982
982
|
{ name: 'Purchase-Type', value: params.type || 'lease' },
|
|
983
983
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
984
|
+
{ name: 'Referrer', value: params.referrer },
|
|
984
985
|
];
|
|
985
986
|
return this.process.send({
|
|
986
987
|
signer: this.signer,
|
|
@@ -1011,6 +1012,7 @@ export class ARIOWriteable extends ARIOReadable {
|
|
|
1011
1012
|
{ name: 'Action', value: 'Upgrade-Name' },
|
|
1012
1013
|
{ name: 'Name', value: params.name },
|
|
1013
1014
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
1015
|
+
{ name: 'Referrer', value: params.referrer },
|
|
1014
1016
|
];
|
|
1015
1017
|
return this.process.send({
|
|
1016
1018
|
signer: this.signer,
|
|
@@ -1044,6 +1046,7 @@ export class ARIOWriteable extends ARIOReadable {
|
|
|
1044
1046
|
{ name: 'Name', value: params.name },
|
|
1045
1047
|
{ name: 'Years', value: params.years.toString() },
|
|
1046
1048
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
1049
|
+
{ name: 'Referrer', value: params.referrer },
|
|
1047
1050
|
];
|
|
1048
1051
|
return this.process.send({
|
|
1049
1052
|
signer: this.signer,
|
|
@@ -1068,6 +1071,7 @@ export class ARIOWriteable extends ARIOReadable {
|
|
|
1068
1071
|
{ name: 'Name', value: params.name },
|
|
1069
1072
|
{ name: 'Quantity', value: params.increaseCount.toString() },
|
|
1070
1073
|
{ name: 'Fund-From', value: params.fundFrom },
|
|
1074
|
+
{ name: 'Referrer', value: params.referrer },
|
|
1071
1075
|
];
|
|
1072
1076
|
return this.process.send({
|
|
1073
1077
|
signer: this.signer,
|
package/lib/esm/common/turbo.js
CHANGED
|
@@ -148,7 +148,7 @@ export class TurboArNSPaymentProviderAuthenticated extends TurboArNSPaymentProvi
|
|
|
148
148
|
}
|
|
149
149
|
this.signer = signer;
|
|
150
150
|
}
|
|
151
|
-
async initiateArNSPurchase({ intent, name, quantity, type, processId, years, paidBy = [], }) {
|
|
151
|
+
async initiateArNSPurchase({ intent, name, quantity, type, processId, years, paidBy = [], referrer, }) {
|
|
152
152
|
// Signer check is implicitly handled by requiring it in the constructor
|
|
153
153
|
const url = urlWithSearchParams({
|
|
154
154
|
baseUrl: `${this.paymentUrl}/v1/arns/purchase/${intent}/${name}`,
|
|
@@ -158,6 +158,7 @@ export class TurboArNSPaymentProviderAuthenticated extends TurboArNSPaymentProvi
|
|
|
158
158
|
type,
|
|
159
159
|
years,
|
|
160
160
|
paidBy,
|
|
161
|
+
referrer,
|
|
161
162
|
},
|
|
162
163
|
});
|
|
163
164
|
const headers = await signedRequestHeadersFromSigner({
|
package/lib/esm/version.js
CHANGED
package/lib/types/cli/utils.d.ts
CHANGED
|
@@ -91,4 +91,7 @@ export declare function getTokenCostParamsFromOptions(o: GetTokenCostCLIOptions)
|
|
|
91
91
|
export declare function fundFromFromOptions<O extends {
|
|
92
92
|
fundFrom?: string;
|
|
93
93
|
}>(o: O): FundFrom;
|
|
94
|
+
export declare function referrerFromOptions<O extends {
|
|
95
|
+
referrer?: string;
|
|
96
|
+
}>(o: O): string | undefined;
|
|
94
97
|
export declare function assertLockLengthInRange(lockLengthMs: number, assertMin?: boolean): void;
|
|
@@ -32,6 +32,7 @@ export interface ArNSPaymentProvider {
|
|
|
32
32
|
export interface TurboInitiateArNSPurchaseParams extends AoTokenCostParams {
|
|
33
33
|
processId?: TransactionId;
|
|
34
34
|
paidBy?: string | string[];
|
|
35
|
+
referrer?: string;
|
|
35
36
|
}
|
|
36
37
|
export interface ArNSAuthenticatedPaymentProvider extends ArNSPaymentProvider {
|
|
37
38
|
initiateArNSPurchase(params: TurboInitiateArNSPurchaseParams): Promise<AoMessageResult<ArNSPurchaseReceipt>>;
|
|
@@ -57,6 +58,6 @@ export declare class TurboArNSPaymentProviderUnauthenticated implements ArNSPaym
|
|
|
57
58
|
export declare class TurboArNSPaymentProviderAuthenticated extends TurboArNSPaymentProviderUnauthenticated implements ArNSAuthenticatedPaymentProvider {
|
|
58
59
|
private readonly signer;
|
|
59
60
|
constructor({ signer, ...restConfig }: TurboAuthenticatedConfig);
|
|
60
|
-
initiateArNSPurchase({ intent, name, quantity, type, processId, years, paidBy, }: TurboInitiateArNSPurchaseParams): Promise<AoMessageResult<ArNSPurchaseReceipt>>;
|
|
61
|
+
initiateArNSPurchase({ intent, name, quantity, type, processId, years, paidBy, referrer, }: TurboInitiateArNSPurchaseParams): Promise<AoMessageResult<ArNSPurchaseReceipt>>;
|
|
61
62
|
}
|
|
62
63
|
export declare function isTurboArNSSigner(signer: unknown): signer is TurboArNSSigner;
|
package/lib/types/types/io.d.ts
CHANGED
|
@@ -347,17 +347,21 @@ export type AoGetVaultParams = {
|
|
|
347
347
|
export type AoArNSPurchaseParams = AoArNSNameParams & {
|
|
348
348
|
fundFrom?: FundFrom;
|
|
349
349
|
paidBy?: WalletAddress | WalletAddress[];
|
|
350
|
+
referrer?: string;
|
|
350
351
|
};
|
|
351
352
|
export type AoBuyRecordParams = AoArNSPurchaseParams & {
|
|
352
353
|
years?: number;
|
|
353
354
|
type: 'lease' | 'permabuy';
|
|
354
355
|
processId: string;
|
|
356
|
+
referrer?: string;
|
|
355
357
|
};
|
|
356
358
|
export type AoExtendLeaseParams = AoArNSPurchaseParams & {
|
|
357
359
|
years: number;
|
|
360
|
+
referrer?: string;
|
|
358
361
|
};
|
|
359
362
|
export type AoIncreaseUndernameLimitParams = AoArNSPurchaseParams & {
|
|
360
363
|
increaseCount: number;
|
|
364
|
+
referrer?: string;
|
|
361
365
|
};
|
|
362
366
|
export type AoVaultedTransferParams = {
|
|
363
367
|
recipient: WalletAddress;
|
package/lib/types/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ar.io/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.13.0-alpha.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/ar-io/ar-io-sdk.git"
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
},
|
|
129
129
|
"dependencies": {
|
|
130
130
|
"@dha-team/arbundles": "^1.0.1",
|
|
131
|
-
"@permaweb/aoconnect": "
|
|
131
|
+
"@permaweb/aoconnect": "0.0.68",
|
|
132
132
|
"arweave": "1.15.5",
|
|
133
133
|
"axios": "1.8.4",
|
|
134
134
|
"axios-retry": "^4.3.0",
|