@ar.io/sdk 3.23.0-alpha.6 → 3.23.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 +12 -12
- package/lib/cjs/common/contracts/ao-process.js +4 -6
- package/lib/cjs/common/marketplace.js +1 -21
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/contracts/ao-process.js +4 -6
- package/lib/esm/common/marketplace.js +1 -21
- package/lib/esm/version.js +1 -1
- package/lib/types/common/contracts/ao-process.d.ts +2 -16
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://codecov.io/gh/ar-io/ar-io-sdk)
|
|
4
4
|
|
|
5
|
-
This is the home of
|
|
5
|
+
This is the home of the ar.io SDK. This SDK provides functionality for interacting with the ar.io ecosystem of services (e.g. gateways and observers) and protocols (e.g. ArNS and AO). It is available for both NodeJS and Web environments.
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
@@ -60,8 +60,8 @@ const gateways = await ario.getGateways();
|
|
|
60
60
|
"operatorStake": 250000000000,
|
|
61
61
|
"settings": {
|
|
62
62
|
"fqdn": "ar-io.dev",
|
|
63
|
-
"label": "
|
|
64
|
-
"note": "Test Gateway operated by PDS for the
|
|
63
|
+
"label": "ar.io Test",
|
|
64
|
+
"note": "Test Gateway operated by PDS for the ar.io ecosystem.",
|
|
65
65
|
"port": 443,
|
|
66
66
|
"properties": "raJgvbFU-YAnku-WsupIdbTsqqGLQiYpGzoqk9SCVgY",
|
|
67
67
|
"protocol": "https"
|
|
@@ -355,7 +355,7 @@ const testnet = ARIO.testnet(); // or ARIO.init({ processId: ARIO_TESTNET_PROCES
|
|
|
355
355
|
|
|
356
356
|
##### Faucet
|
|
357
357
|
|
|
358
|
-
The SDK provides APIs for claiming tokens via a faucet on the
|
|
358
|
+
The SDK provides APIs for claiming tokens via a faucet on the ar.io Testnet process (`tARIO`) via the [ar-io-testnet-faucet] service. All token requests require a captcha to be solved, and the faucet is rate limited to prevent abuse.
|
|
359
359
|
|
|
360
360
|
To claim testnet tokens from the testnet token faucet, you can use one of the following methods:
|
|
361
361
|
|
|
@@ -593,8 +593,8 @@ const gateway = await ario.getGateway({
|
|
|
593
593
|
"operatorStake": 250000000000,
|
|
594
594
|
"settings": {
|
|
595
595
|
"fqdn": "ar-io.dev",
|
|
596
|
-
"label": "
|
|
597
|
-
"note": "Test Gateway operated by PDS for the
|
|
596
|
+
"label": "ar.io Test",
|
|
597
|
+
"note": "Test Gateway operated by PDS for the ar.io ecosystem.",
|
|
598
598
|
"port": 443,
|
|
599
599
|
"properties": "raJgvbFU-YAnku-WsupIdbTsqqGLQiYpGzoqk9SCVgY",
|
|
600
600
|
"protocol": "https"
|
|
@@ -649,8 +649,8 @@ Available `sortBy` options are any of the keys on the gateway object, e.g. `oper
|
|
|
649
649
|
"operatorStake": 250000000000,
|
|
650
650
|
"settings": {
|
|
651
651
|
"fqdn": "ar-io.dev",
|
|
652
|
-
"label": "
|
|
653
|
-
"note": "Test Gateway operated by PDS for the
|
|
652
|
+
"label": "ar.io Test",
|
|
653
|
+
"note": "Test Gateway operated by PDS for the ar.io ecosystem.",
|
|
654
654
|
"port": 443,
|
|
655
655
|
"properties": "raJgvbFU-YAnku-WsupIdbTsqqGLQiYpGzoqk9SCVgY",
|
|
656
656
|
"protocol": "https"
|
|
@@ -2350,7 +2350,7 @@ const state = await ant.getState();
|
|
|
2350
2350
|
"Keywords": ["keyword1", "keyword2", "keyword3"],
|
|
2351
2351
|
"Logo": "Sie_26dvgyok0PZD_-iQAFOhOd5YxDTkczOLoqTTL_A",
|
|
2352
2352
|
"Denomination": 0,
|
|
2353
|
-
"Name": "
|
|
2353
|
+
"Name": "ar.io Foundation",
|
|
2354
2354
|
"Owner": "98O1_xqDLrBKRfQPWjF5p7xZ4Jx6GM8P5PeJn26xwUY"
|
|
2355
2355
|
}
|
|
2356
2356
|
```
|
|
@@ -3061,7 +3061,7 @@ console.log(
|
|
|
3061
3061
|
|
|
3062
3062
|
## Token Conversion
|
|
3063
3063
|
|
|
3064
|
-
The ARIO process stores all values as mARIO (
|
|
3064
|
+
The ARIO process stores all values as mARIO (micro-ARIO) to avoid floating-point arithmetic issues. The SDK provides an `ARIOToken` and `mARIOToken` classes to handle the conversion between ARIO and mARIO, along with rounding logic for precision.
|
|
3065
3065
|
|
|
3066
3066
|
**All process interactions expect values in mARIO. If numbers are provided as inputs, they are assumed to be in raw mARIO values.**
|
|
3067
3067
|
|
|
@@ -3176,7 +3176,7 @@ In the example above, the query will return ArNS records where:
|
|
|
3176
3176
|
|
|
3177
3177
|
For [ANS-104] bundling compatible with ar.io gateways, we recommend using [turbo-sdk](https://github.com/ardriveapp/turbo-sdk). Turbo SDK provides efficient and reliable methods for creating and uploading data bundles to the Arweave network, which are fully compatible with ar.io gateways. Turbo supports fiat and crypto bundling and uploading with a focus on ease of use and reliability.
|
|
3178
3178
|
|
|
3179
|
-
###
|
|
3179
|
+
### ar.io Gateways
|
|
3180
3180
|
|
|
3181
3181
|
### Running a Gateway
|
|
3182
3182
|
|
|
@@ -3254,4 +3254,4 @@ For more information on how to contribute, please see [CONTRIBUTING.md].
|
|
|
3254
3254
|
|
|
3255
3255
|
```
|
|
3256
3256
|
|
|
3257
|
-
```
|
|
3257
|
+
```
|
|
@@ -40,7 +40,7 @@ class AOProcess {
|
|
|
40
40
|
messageData === '' ||
|
|
41
41
|
messageData === null);
|
|
42
42
|
}
|
|
43
|
-
async read({ tags, retries = 3, fromAddress,
|
|
43
|
+
async read({ tags, retries = 3, fromAddress, }) {
|
|
44
44
|
this.logger.debug(`Evaluating read interaction on process`, {
|
|
45
45
|
tags,
|
|
46
46
|
processId: this.processId,
|
|
@@ -105,9 +105,7 @@ class AOProcess {
|
|
|
105
105
|
throw new Error(result.message ||
|
|
106
106
|
`Process ${this.processId} did not return a valid response. Response: ${JSON.stringify(result)}`);
|
|
107
107
|
}
|
|
108
|
-
const messageData =
|
|
109
|
-
? result.Messages.find(select)?.Data
|
|
110
|
-
: result.Messages?.[0]?.Data;
|
|
108
|
+
const messageData = result.Messages?.[0]?.Data;
|
|
111
109
|
// return undefined if no data is returned
|
|
112
110
|
if (this.isMessageDataEmpty(messageData)) {
|
|
113
111
|
return undefined;
|
|
@@ -115,7 +113,7 @@ class AOProcess {
|
|
|
115
113
|
const response = (0, json_js_1.safeDecode)(messageData);
|
|
116
114
|
return response;
|
|
117
115
|
}
|
|
118
|
-
async send({ tags, data, signer, retries = 3,
|
|
116
|
+
async send({ tags, data, signer, retries = 3, }) {
|
|
119
117
|
let messageId;
|
|
120
118
|
const anchor = (0, base64_js_1.getRandomText)(32); // anchor is a random text produce non-deterministic messages IDs when deterministic signers are provided (ETH)
|
|
121
119
|
try {
|
|
@@ -212,7 +210,7 @@ class AOProcess {
|
|
|
212
210
|
if (this.isMessageDataEmpty(result.Messages[0].Data)) {
|
|
213
211
|
return { id: messageId };
|
|
214
212
|
}
|
|
215
|
-
const resultData = (0, json_js_1.safeDecode)(
|
|
213
|
+
const resultData = (0, json_js_1.safeDecode)(result.Messages[0].Data);
|
|
216
214
|
this.logger.debug('Message result data', {
|
|
217
215
|
resultData,
|
|
218
216
|
messageId,
|
|
@@ -35,7 +35,6 @@ class ArNSMarketplaceRead {
|
|
|
35
35
|
async getInfo() {
|
|
36
36
|
return this.process.read({
|
|
37
37
|
tags: [{ name: 'Action', value: 'Info' }],
|
|
38
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Info-Notice'),
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
40
|
async getPaginatedIntents({ cursor, limit, sortBy, sortOrder, filters, } = {}) {
|
|
@@ -50,8 +49,6 @@ class ArNSMarketplaceRead {
|
|
|
50
49
|
const filteredTags = tags.filter((tag) => tag.value !== undefined);
|
|
51
50
|
return this.process.read({
|
|
52
51
|
tags: filteredTags,
|
|
53
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' &&
|
|
54
|
-
tag.value === 'Get-Paginated-Intents-Notice'),
|
|
55
52
|
});
|
|
56
53
|
}
|
|
57
54
|
async getIntent(intentId) {
|
|
@@ -60,7 +57,6 @@ class ArNSMarketplaceRead {
|
|
|
60
57
|
{ name: 'Action', value: 'Get-Intent-By-Id' },
|
|
61
58
|
{ name: 'Intent-Id', value: intentId },
|
|
62
59
|
],
|
|
63
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Get-Intent-By-Id-Notice'),
|
|
64
60
|
});
|
|
65
61
|
}
|
|
66
62
|
async getIntentByANTId(antId) {
|
|
@@ -96,10 +92,7 @@ class ArNSMarketplaceRead {
|
|
|
96
92
|
},
|
|
97
93
|
];
|
|
98
94
|
const filteredTags = tags.filter((tag) => tag.value !== undefined);
|
|
99
|
-
return this.process.read({
|
|
100
|
-
tags: filteredTags,
|
|
101
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Get-Orders-Notice'),
|
|
102
|
-
});
|
|
95
|
+
return this.process.read({ tags: filteredTags });
|
|
103
96
|
}
|
|
104
97
|
/**
|
|
105
98
|
* Get a single order by ID
|
|
@@ -112,7 +105,6 @@ class ArNSMarketplaceRead {
|
|
|
112
105
|
{ name: 'Action', value: 'Get-Order' },
|
|
113
106
|
{ name: 'Order-Id', value: orderId },
|
|
114
107
|
],
|
|
115
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Get-Order-Notice'),
|
|
116
108
|
});
|
|
117
109
|
}
|
|
118
110
|
async getOrderByANTId(antId) {
|
|
@@ -135,8 +127,6 @@ class ArNSMarketplaceRead {
|
|
|
135
127
|
{ name: 'Action', value: 'Get-Paginated-Balances' },
|
|
136
128
|
...(0, index_js_1.paginationParamsToTags)(params),
|
|
137
129
|
],
|
|
138
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' &&
|
|
139
|
-
tag.value === 'Get-Paginated-Balances-Notice'),
|
|
140
130
|
});
|
|
141
131
|
}
|
|
142
132
|
/**
|
|
@@ -148,7 +138,6 @@ class ArNSMarketplaceRead {
|
|
|
148
138
|
{ name: 'Action', value: 'Get-Balance' },
|
|
149
139
|
{ name: 'Address', value: address },
|
|
150
140
|
],
|
|
151
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Get-Balance-Notice'),
|
|
152
141
|
});
|
|
153
142
|
}
|
|
154
143
|
async getUserAssets({ address, arioProcessId, }) {
|
|
@@ -249,7 +238,6 @@ class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
249
238
|
{ name: 'Quantity', value: params.amount },
|
|
250
239
|
],
|
|
251
240
|
signer: this.signer,
|
|
252
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Withdraw-Ario-Notice'),
|
|
253
241
|
});
|
|
254
242
|
}
|
|
255
243
|
async createIntent({ antId, orderType, quantity, price, expirationTime, minimumPrice, decreaseInterval, }) {
|
|
@@ -267,7 +255,6 @@ class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
267
255
|
return this.process.send({
|
|
268
256
|
tags: filteredTags,
|
|
269
257
|
signer: this.signer,
|
|
270
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Create-Intent-Notice'),
|
|
271
258
|
});
|
|
272
259
|
}
|
|
273
260
|
async pushANTIntentResolution(intentId) {
|
|
@@ -277,8 +264,6 @@ class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
277
264
|
{ name: 'X-Intent-Id', value: intentId },
|
|
278
265
|
],
|
|
279
266
|
signer: this.signer,
|
|
280
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' &&
|
|
281
|
-
tag.value === 'Push-ANT-Intent-Resolution-Notice'),
|
|
282
267
|
});
|
|
283
268
|
}
|
|
284
269
|
async settleAuction(params) {
|
|
@@ -292,7 +277,6 @@ class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
292
277
|
return this.process.send({
|
|
293
278
|
tags: filteredTags,
|
|
294
279
|
signer: this.signer,
|
|
295
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Settle-Auction-Notice'),
|
|
296
280
|
});
|
|
297
281
|
}
|
|
298
282
|
async listNameForSale({ name, expirationTime, price, type, walletAddress, minimumPrice, decreaseInterval, onProgress = (event) => {
|
|
@@ -515,7 +499,6 @@ class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
515
499
|
return this.process.send({
|
|
516
500
|
tags,
|
|
517
501
|
signer: this.signer,
|
|
518
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Cancel-Order-Notice'),
|
|
519
502
|
});
|
|
520
503
|
}
|
|
521
504
|
async createOrder({ swapToken, quantity, orderType, price, expirationTime, minimumPrice, decreaseInterval, transferDenomination, }) {
|
|
@@ -535,7 +518,6 @@ class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
535
518
|
return this.process.send({
|
|
536
519
|
tags: filteredTags,
|
|
537
520
|
signer: this.signer,
|
|
538
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Create-Order-Notice'),
|
|
539
521
|
});
|
|
540
522
|
}
|
|
541
523
|
async buyFixedPriceANT(params) {
|
|
@@ -608,8 +590,6 @@ class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
608
590
|
{ name: 'Bid-Amount', value: params.bidAmount },
|
|
609
591
|
],
|
|
610
592
|
signer: this.signer,
|
|
611
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' &&
|
|
612
|
-
tag.value === 'Bid-On-English-Auction-Notice'),
|
|
613
593
|
});
|
|
614
594
|
}
|
|
615
595
|
/**
|
package/lib/cjs/version.js
CHANGED
|
@@ -37,7 +37,7 @@ export class AOProcess {
|
|
|
37
37
|
messageData === '' ||
|
|
38
38
|
messageData === null);
|
|
39
39
|
}
|
|
40
|
-
async read({ tags, retries = 3, fromAddress,
|
|
40
|
+
async read({ tags, retries = 3, fromAddress, }) {
|
|
41
41
|
this.logger.debug(`Evaluating read interaction on process`, {
|
|
42
42
|
tags,
|
|
43
43
|
processId: this.processId,
|
|
@@ -102,9 +102,7 @@ export class AOProcess {
|
|
|
102
102
|
throw new Error(result.message ||
|
|
103
103
|
`Process ${this.processId} did not return a valid response. Response: ${JSON.stringify(result)}`);
|
|
104
104
|
}
|
|
105
|
-
const messageData =
|
|
106
|
-
? result.Messages.find(select)?.Data
|
|
107
|
-
: result.Messages?.[0]?.Data;
|
|
105
|
+
const messageData = result.Messages?.[0]?.Data;
|
|
108
106
|
// return undefined if no data is returned
|
|
109
107
|
if (this.isMessageDataEmpty(messageData)) {
|
|
110
108
|
return undefined;
|
|
@@ -112,7 +110,7 @@ export class AOProcess {
|
|
|
112
110
|
const response = safeDecode(messageData);
|
|
113
111
|
return response;
|
|
114
112
|
}
|
|
115
|
-
async send({ tags, data, signer, retries = 3,
|
|
113
|
+
async send({ tags, data, signer, retries = 3, }) {
|
|
116
114
|
let messageId;
|
|
117
115
|
const anchor = getRandomText(32); // anchor is a random text produce non-deterministic messages IDs when deterministic signers are provided (ETH)
|
|
118
116
|
try {
|
|
@@ -209,7 +207,7 @@ export class AOProcess {
|
|
|
209
207
|
if (this.isMessageDataEmpty(result.Messages[0].Data)) {
|
|
210
208
|
return { id: messageId };
|
|
211
209
|
}
|
|
212
|
-
const resultData = safeDecode(
|
|
210
|
+
const resultData = safeDecode(result.Messages[0].Data);
|
|
213
211
|
this.logger.debug('Message result data', {
|
|
214
212
|
resultData,
|
|
215
213
|
messageId,
|
|
@@ -30,7 +30,6 @@ export class ArNSMarketplaceRead {
|
|
|
30
30
|
async getInfo() {
|
|
31
31
|
return this.process.read({
|
|
32
32
|
tags: [{ name: 'Action', value: 'Info' }],
|
|
33
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Info-Notice'),
|
|
34
33
|
});
|
|
35
34
|
}
|
|
36
35
|
async getPaginatedIntents({ cursor, limit, sortBy, sortOrder, filters, } = {}) {
|
|
@@ -45,8 +44,6 @@ export class ArNSMarketplaceRead {
|
|
|
45
44
|
const filteredTags = tags.filter((tag) => tag.value !== undefined);
|
|
46
45
|
return this.process.read({
|
|
47
46
|
tags: filteredTags,
|
|
48
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' &&
|
|
49
|
-
tag.value === 'Get-Paginated-Intents-Notice'),
|
|
50
47
|
});
|
|
51
48
|
}
|
|
52
49
|
async getIntent(intentId) {
|
|
@@ -55,7 +52,6 @@ export class ArNSMarketplaceRead {
|
|
|
55
52
|
{ name: 'Action', value: 'Get-Intent-By-Id' },
|
|
56
53
|
{ name: 'Intent-Id', value: intentId },
|
|
57
54
|
],
|
|
58
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Get-Intent-By-Id-Notice'),
|
|
59
55
|
});
|
|
60
56
|
}
|
|
61
57
|
async getIntentByANTId(antId) {
|
|
@@ -91,10 +87,7 @@ export class ArNSMarketplaceRead {
|
|
|
91
87
|
},
|
|
92
88
|
];
|
|
93
89
|
const filteredTags = tags.filter((tag) => tag.value !== undefined);
|
|
94
|
-
return this.process.read({
|
|
95
|
-
tags: filteredTags,
|
|
96
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Get-Orders-Notice'),
|
|
97
|
-
});
|
|
90
|
+
return this.process.read({ tags: filteredTags });
|
|
98
91
|
}
|
|
99
92
|
/**
|
|
100
93
|
* Get a single order by ID
|
|
@@ -107,7 +100,6 @@ export class ArNSMarketplaceRead {
|
|
|
107
100
|
{ name: 'Action', value: 'Get-Order' },
|
|
108
101
|
{ name: 'Order-Id', value: orderId },
|
|
109
102
|
],
|
|
110
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Get-Order-Notice'),
|
|
111
103
|
});
|
|
112
104
|
}
|
|
113
105
|
async getOrderByANTId(antId) {
|
|
@@ -130,8 +122,6 @@ export class ArNSMarketplaceRead {
|
|
|
130
122
|
{ name: 'Action', value: 'Get-Paginated-Balances' },
|
|
131
123
|
...paginationParamsToTags(params),
|
|
132
124
|
],
|
|
133
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' &&
|
|
134
|
-
tag.value === 'Get-Paginated-Balances-Notice'),
|
|
135
125
|
});
|
|
136
126
|
}
|
|
137
127
|
/**
|
|
@@ -143,7 +133,6 @@ export class ArNSMarketplaceRead {
|
|
|
143
133
|
{ name: 'Action', value: 'Get-Balance' },
|
|
144
134
|
{ name: 'Address', value: address },
|
|
145
135
|
],
|
|
146
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Get-Balance-Notice'),
|
|
147
136
|
});
|
|
148
137
|
}
|
|
149
138
|
async getUserAssets({ address, arioProcessId, }) {
|
|
@@ -243,7 +232,6 @@ export class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
243
232
|
{ name: 'Quantity', value: params.amount },
|
|
244
233
|
],
|
|
245
234
|
signer: this.signer,
|
|
246
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Withdraw-Ario-Notice'),
|
|
247
235
|
});
|
|
248
236
|
}
|
|
249
237
|
async createIntent({ antId, orderType, quantity, price, expirationTime, minimumPrice, decreaseInterval, }) {
|
|
@@ -261,7 +249,6 @@ export class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
261
249
|
return this.process.send({
|
|
262
250
|
tags: filteredTags,
|
|
263
251
|
signer: this.signer,
|
|
264
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Create-Intent-Notice'),
|
|
265
252
|
});
|
|
266
253
|
}
|
|
267
254
|
async pushANTIntentResolution(intentId) {
|
|
@@ -271,8 +258,6 @@ export class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
271
258
|
{ name: 'X-Intent-Id', value: intentId },
|
|
272
259
|
],
|
|
273
260
|
signer: this.signer,
|
|
274
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' &&
|
|
275
|
-
tag.value === 'Push-ANT-Intent-Resolution-Notice'),
|
|
276
261
|
});
|
|
277
262
|
}
|
|
278
263
|
async settleAuction(params) {
|
|
@@ -286,7 +271,6 @@ export class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
286
271
|
return this.process.send({
|
|
287
272
|
tags: filteredTags,
|
|
288
273
|
signer: this.signer,
|
|
289
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Settle-Auction-Notice'),
|
|
290
274
|
});
|
|
291
275
|
}
|
|
292
276
|
async listNameForSale({ name, expirationTime, price, type, walletAddress, minimumPrice, decreaseInterval, onProgress = (event) => {
|
|
@@ -509,7 +493,6 @@ export class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
509
493
|
return this.process.send({
|
|
510
494
|
tags,
|
|
511
495
|
signer: this.signer,
|
|
512
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Cancel-Order-Notice'),
|
|
513
496
|
});
|
|
514
497
|
}
|
|
515
498
|
async createOrder({ swapToken, quantity, orderType, price, expirationTime, minimumPrice, decreaseInterval, transferDenomination, }) {
|
|
@@ -529,7 +512,6 @@ export class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
529
512
|
return this.process.send({
|
|
530
513
|
tags: filteredTags,
|
|
531
514
|
signer: this.signer,
|
|
532
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' && tag.value === 'Create-Order-Notice'),
|
|
533
515
|
});
|
|
534
516
|
}
|
|
535
517
|
async buyFixedPriceANT(params) {
|
|
@@ -602,8 +584,6 @@ export class ArNSMarketplaceWrite extends ArNSMarketplaceRead {
|
|
|
602
584
|
{ name: 'Bid-Amount', value: params.bidAmount },
|
|
603
585
|
],
|
|
604
586
|
signer: this.signer,
|
|
605
|
-
select: (message) => message.Tags.some((tag) => tag.name === 'Action' &&
|
|
606
|
-
tag.value === 'Bid-On-English-Auction-Notice'),
|
|
607
587
|
});
|
|
608
588
|
}
|
|
609
589
|
/**
|
package/lib/esm/version.js
CHANGED
|
@@ -10,22 +10,15 @@ export declare class AOProcess implements AOContract {
|
|
|
10
10
|
logger?: ILogger;
|
|
11
11
|
});
|
|
12
12
|
private isMessageDataEmpty;
|
|
13
|
-
read<K>({ tags, retries, fromAddress,
|
|
13
|
+
read<K>({ tags, retries, fromAddress, }: {
|
|
14
14
|
tags?: Array<{
|
|
15
15
|
name: string;
|
|
16
16
|
value: string;
|
|
17
17
|
}>;
|
|
18
18
|
retries?: number;
|
|
19
19
|
fromAddress?: string;
|
|
20
|
-
select?: (message: {
|
|
21
|
-
Data: string;
|
|
22
|
-
Tags: Array<{
|
|
23
|
-
name: string;
|
|
24
|
-
value: string;
|
|
25
|
-
}>;
|
|
26
|
-
}) => boolean;
|
|
27
20
|
}): Promise<K>;
|
|
28
|
-
send<K>({ tags, data, signer, retries,
|
|
21
|
+
send<K>({ tags, data, signer, retries, }: {
|
|
29
22
|
tags: Array<{
|
|
30
23
|
name: string;
|
|
31
24
|
value: string;
|
|
@@ -33,13 +26,6 @@ export declare class AOProcess implements AOContract {
|
|
|
33
26
|
data?: string | undefined;
|
|
34
27
|
signer: AoSigner;
|
|
35
28
|
retries?: number;
|
|
36
|
-
select?: (message: {
|
|
37
|
-
Data: string;
|
|
38
|
-
Tags: Array<{
|
|
39
|
-
name: string;
|
|
40
|
-
value: string;
|
|
41
|
-
}>;
|
|
42
|
-
}) => boolean;
|
|
43
29
|
}): Promise<{
|
|
44
30
|
id: string;
|
|
45
31
|
result?: K;
|
package/lib/types/version.d.ts
CHANGED