@toon-protocol/client 5.1.0 → 5.1.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/dist/{chunk-BHGJXLS7.js → chunk-GNPJRJ6U.js} +60 -16
- package/dist/chunk-GNPJRJ6U.js.map +1 -0
- package/dist/cli/main.js +13 -4
- package/dist/cli/main.js.map +1 -1
- package/dist/{client-DF3LZVLC.js → client-RO3VITXU.js} +4 -2
- package/dist/index.d.ts +38 -10
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-BHGJXLS7.js.map +0 -1
- /package/dist/{client-DF3LZVLC.js.map → client-RO3VITXU.js.map} +0 -0
package/dist/cli/main.js
CHANGED
|
@@ -139,6 +139,11 @@ var COMMAND_OPTIONS = {
|
|
|
139
139
|
arg: "BASE_UNITS",
|
|
140
140
|
help: "Amount in base units. On send, overrides the route price."
|
|
141
141
|
},
|
|
142
|
+
"seal-to": {
|
|
143
|
+
type: "string",
|
|
144
|
+
arg: "URL|KEY",
|
|
145
|
+
help: "On send, the connector that terminates the route: its GET /ilp URL or a 0x uncompressed key. A forwarded route usually also needs --amount."
|
|
146
|
+
},
|
|
142
147
|
to: { type: "string", arg: "ADDRESS", help: "Destination address." },
|
|
143
148
|
asset: { type: "string", arg: "native|token", help: "Which asset to move. Default 'token'." }
|
|
144
149
|
};
|
|
@@ -198,8 +203,8 @@ var COMMANDS = {
|
|
|
198
203
|
},
|
|
199
204
|
send: {
|
|
200
205
|
summary: "Pay for one HTTP request and print the answer.",
|
|
201
|
-
usage: "send [destination] [--method VERB] [--target PATH] [-H NAME:VALUE]... [--body TEXT | --body-file PATH | --body -] [--json-body] [--amount BASE_UNITS]",
|
|
202
|
-
options: ["method", "target", "header", "body", "body-file", "json-body", "amount"],
|
|
206
|
+
usage: "send [destination] [--method VERB] [--target PATH] [-H NAME:VALUE]... [--body TEXT | --body-file PATH | --body -] [--json-body] [--amount BASE_UNITS] [--seal-to URL|KEY]",
|
|
207
|
+
options: ["method", "target", "header", "body", "body-file", "json-body", "amount", "seal-to"],
|
|
203
208
|
minPositionals: 0,
|
|
204
209
|
maxPositionals: 1,
|
|
205
210
|
details: [
|
|
@@ -588,7 +593,7 @@ function buildClientConfig(settings, keys) {
|
|
|
588
593
|
};
|
|
589
594
|
}
|
|
590
595
|
async function defaultCreateClient(config) {
|
|
591
|
-
const module = await import("../client-
|
|
596
|
+
const module = await import("../client-RO3VITXU.js");
|
|
592
597
|
const factory = module.ToonClient;
|
|
593
598
|
if (factory === void 0) {
|
|
594
599
|
throw new Error(
|
|
@@ -1384,6 +1389,7 @@ function payloadFor(result) {
|
|
|
1384
1389
|
async function run10(ctx) {
|
|
1385
1390
|
const request = await buildRequest(ctx);
|
|
1386
1391
|
const amountFlag = stringOption(ctx.values, "amount");
|
|
1392
|
+
const sealToFlag = stringOption(ctx.values, "seal-to");
|
|
1387
1393
|
const client = await ctx.client();
|
|
1388
1394
|
const destination = ctx.positionals[0] ?? client.defaultDestination;
|
|
1389
1395
|
if (destination === void 0) {
|
|
@@ -1395,7 +1401,10 @@ async function run10(ctx) {
|
|
|
1395
1401
|
const result = await client.send(
|
|
1396
1402
|
destination,
|
|
1397
1403
|
request,
|
|
1398
|
-
amountFlag === void 0 ? void 0 : {
|
|
1404
|
+
amountFlag === void 0 && sealToFlag === void 0 ? void 0 : {
|
|
1405
|
+
...amountFlag === void 0 ? {} : { amount: BigInt(amountFlag) },
|
|
1406
|
+
...sealToFlag === void 0 ? {} : { sealTo: sealToFlag }
|
|
1407
|
+
}
|
|
1399
1408
|
);
|
|
1400
1409
|
const description = await client.describe();
|
|
1401
1410
|
const asset = assetFromSettlement(description.batchSettlements[0]);
|