@sats-connect/core 0.15.0 → 0.16.0-1c86499
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/index.d.mts +204 -135
- package/dist/index.d.ts +204 -135
- package/dist/index.js +880 -800
- package/dist/index.mjs +876 -800
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/request/index.ts
|
|
2
|
-
import * as
|
|
2
|
+
import * as v62 from "valibot";
|
|
3
3
|
|
|
4
4
|
// src/provider/types.ts
|
|
5
5
|
import * as v4 from "valibot";
|
|
@@ -242,973 +242,1045 @@ var sanitizeAddressPurposeRequest = (method, params) => {
|
|
|
242
242
|
return { method, params };
|
|
243
243
|
};
|
|
244
244
|
|
|
245
|
-
// src/request/types/btcMethods.ts
|
|
246
|
-
|
|
245
|
+
// src/request/types/btcMethods/common.ts
|
|
246
|
+
var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
247
|
+
MessageSigningProtocols2["ECDSA"] = "ECDSA";
|
|
248
|
+
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
249
|
+
return MessageSigningProtocols2;
|
|
250
|
+
})(MessageSigningProtocols || {});
|
|
247
251
|
|
|
248
|
-
// src/request/types/
|
|
252
|
+
// src/request/types/btcMethods/getAccounts.ts
|
|
249
253
|
import * as v5 from "valibot";
|
|
250
|
-
var
|
|
251
|
-
var
|
|
254
|
+
var getAccountsMethodName = "getAccounts";
|
|
255
|
+
var getAccountsParamsSchema = v5.object({
|
|
256
|
+
/**
|
|
257
|
+
* The purposes for which to generate addresses. See
|
|
258
|
+
* {@linkcode AddressPurpose} for available purposes.
|
|
259
|
+
*/
|
|
260
|
+
purposes: v5.array(v5.enum(AddressPurpose)),
|
|
261
|
+
/**
|
|
262
|
+
* A message to be displayed to the user in the request prompt.
|
|
263
|
+
*/
|
|
264
|
+
message: v5.optional(v5.string())
|
|
265
|
+
});
|
|
266
|
+
var getAccountsResultSchema = v5.array(
|
|
252
267
|
v5.object({
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
268
|
+
...addressSchema.entries,
|
|
269
|
+
...v5.object({
|
|
270
|
+
walletType: walletTypeSchema
|
|
271
|
+
}).entries
|
|
272
|
+
})
|
|
273
|
+
);
|
|
274
|
+
var getAccountsRequestMessageSchema = v5.object({
|
|
275
|
+
...rpcRequestMessageSchema.entries,
|
|
276
|
+
...v5.object({
|
|
277
|
+
method: v5.literal(getAccountsMethodName),
|
|
278
|
+
params: getAccountsParamsSchema,
|
|
279
|
+
id: v5.string()
|
|
280
|
+
}).entries
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// src/request/types/btcMethods/getAddresses.ts
|
|
284
|
+
import * as v21 from "valibot";
|
|
285
|
+
|
|
286
|
+
// src/request/types/walletMethods/addNetwork.ts
|
|
287
|
+
import * as v6 from "valibot";
|
|
288
|
+
var addNetworkMethodName = "wallet_addNetwork";
|
|
289
|
+
var addNetworkParamsSchema = v6.variant("chain", [
|
|
290
|
+
v6.object({
|
|
291
|
+
chain: v6.literal("bitcoin"),
|
|
292
|
+
type: v6.enum(BitcoinNetworkType),
|
|
293
|
+
name: v6.string(),
|
|
294
|
+
rpcUrl: v6.string(),
|
|
295
|
+
rpcFallbackUrl: v6.optional(v6.string()),
|
|
296
|
+
indexerUrl: v6.optional(v6.string()),
|
|
297
|
+
blockExplorerUrl: v6.optional(v6.string()),
|
|
298
|
+
switch: v6.optional(v6.boolean())
|
|
261
299
|
}),
|
|
262
|
-
|
|
263
|
-
chain:
|
|
264
|
-
name:
|
|
265
|
-
type:
|
|
266
|
-
rpcUrl:
|
|
267
|
-
blockExplorerUrl:
|
|
268
|
-
switch:
|
|
300
|
+
v6.object({
|
|
301
|
+
chain: v6.literal("stacks"),
|
|
302
|
+
name: v6.string(),
|
|
303
|
+
type: v6.enum(StacksNetworkType),
|
|
304
|
+
rpcUrl: v6.string(),
|
|
305
|
+
blockExplorerUrl: v6.optional(v6.string()),
|
|
306
|
+
switch: v6.optional(v6.boolean())
|
|
269
307
|
}),
|
|
270
|
-
|
|
271
|
-
chain:
|
|
272
|
-
name:
|
|
273
|
-
type:
|
|
274
|
-
rpcUrl:
|
|
275
|
-
blockExplorerUrl:
|
|
276
|
-
switch:
|
|
308
|
+
v6.object({
|
|
309
|
+
chain: v6.literal("starknet"),
|
|
310
|
+
name: v6.string(),
|
|
311
|
+
type: v6.enum(StarknetNetworkType),
|
|
312
|
+
rpcUrl: v6.string(),
|
|
313
|
+
blockExplorerUrl: v6.optional(v6.string()),
|
|
314
|
+
switch: v6.optional(v6.boolean())
|
|
277
315
|
})
|
|
278
316
|
]);
|
|
279
|
-
var addNetworkRequestMessageSchema =
|
|
317
|
+
var addNetworkRequestMessageSchema = v6.object({
|
|
280
318
|
...rpcRequestMessageSchema.entries,
|
|
281
|
-
...
|
|
282
|
-
method:
|
|
319
|
+
...v6.object({
|
|
320
|
+
method: v6.literal(addNetworkMethodName),
|
|
283
321
|
params: addNetworkParamsSchema,
|
|
284
|
-
id:
|
|
322
|
+
id: v6.string()
|
|
285
323
|
}).entries
|
|
286
324
|
});
|
|
287
|
-
var addNetworkResultSchema =
|
|
288
|
-
id:
|
|
325
|
+
var addNetworkResultSchema = v6.object({
|
|
326
|
+
id: v6.string()
|
|
289
327
|
});
|
|
290
328
|
|
|
291
329
|
// src/request/types/walletMethods/changeNetwork.ts
|
|
292
|
-
import * as
|
|
330
|
+
import * as v7 from "valibot";
|
|
293
331
|
var changeNetworkMethodName = "wallet_changeNetwork";
|
|
294
|
-
var changeNetworkParamsSchema =
|
|
295
|
-
name:
|
|
332
|
+
var changeNetworkParamsSchema = v7.object({
|
|
333
|
+
name: v7.enum(BitcoinNetworkType)
|
|
296
334
|
});
|
|
297
|
-
var changeNetworkResultSchema =
|
|
298
|
-
var changeNetworkRequestMessageSchema =
|
|
335
|
+
var changeNetworkResultSchema = v7.nullish(v7.null());
|
|
336
|
+
var changeNetworkRequestMessageSchema = v7.object({
|
|
299
337
|
...rpcRequestMessageSchema.entries,
|
|
300
|
-
...
|
|
301
|
-
method:
|
|
338
|
+
...v7.object({
|
|
339
|
+
method: v7.literal(changeNetworkMethodName),
|
|
302
340
|
params: changeNetworkParamsSchema,
|
|
303
|
-
id:
|
|
341
|
+
id: v7.string()
|
|
304
342
|
}).entries
|
|
305
343
|
});
|
|
306
344
|
|
|
307
345
|
// src/request/types/walletMethods/changeNetworkById.ts
|
|
308
|
-
import * as
|
|
346
|
+
import * as v8 from "valibot";
|
|
309
347
|
var changeNetworkByIdMethodName = "wallet_changeNetworkById";
|
|
310
|
-
var changeNetworkByIdParamsSchema =
|
|
311
|
-
id:
|
|
348
|
+
var changeNetworkByIdParamsSchema = v8.object({
|
|
349
|
+
id: v8.string()
|
|
312
350
|
});
|
|
313
|
-
var changeNetworkByIdResultSchema =
|
|
314
|
-
var changeNetworkByIdRequestMessageSchema =
|
|
351
|
+
var changeNetworkByIdResultSchema = v8.nullish(v8.null());
|
|
352
|
+
var changeNetworkByIdRequestMessageSchema = v8.object({
|
|
315
353
|
...rpcRequestMessageSchema.entries,
|
|
316
|
-
...
|
|
317
|
-
method:
|
|
354
|
+
...v8.object({
|
|
355
|
+
method: v8.literal(changeNetworkByIdMethodName),
|
|
318
356
|
params: changeNetworkByIdParamsSchema,
|
|
319
|
-
id:
|
|
357
|
+
id: v8.string()
|
|
320
358
|
}).entries
|
|
321
359
|
});
|
|
322
360
|
|
|
323
361
|
// src/request/types/walletMethods/common.ts
|
|
324
|
-
import * as
|
|
325
|
-
var accountActionsSchema =
|
|
326
|
-
read:
|
|
362
|
+
import * as v9 from "valibot";
|
|
363
|
+
var accountActionsSchema = v9.object({
|
|
364
|
+
read: v9.optional(v9.boolean())
|
|
327
365
|
});
|
|
328
|
-
var walletActionsSchema =
|
|
329
|
-
readNetwork:
|
|
366
|
+
var walletActionsSchema = v9.object({
|
|
367
|
+
readNetwork: v9.optional(v9.boolean())
|
|
330
368
|
});
|
|
331
|
-
var accountPermissionSchema =
|
|
332
|
-
type:
|
|
333
|
-
resourceId:
|
|
334
|
-
clientId:
|
|
369
|
+
var accountPermissionSchema = v9.object({
|
|
370
|
+
type: v9.literal("account"),
|
|
371
|
+
resourceId: v9.string(),
|
|
372
|
+
clientId: v9.string(),
|
|
335
373
|
actions: accountActionsSchema
|
|
336
374
|
});
|
|
337
|
-
var walletPermissionSchema =
|
|
338
|
-
type:
|
|
339
|
-
resourceId:
|
|
340
|
-
clientId:
|
|
375
|
+
var walletPermissionSchema = v9.object({
|
|
376
|
+
type: v9.literal("wallet"),
|
|
377
|
+
resourceId: v9.string(),
|
|
378
|
+
clientId: v9.string(),
|
|
341
379
|
actions: walletActionsSchema
|
|
342
380
|
});
|
|
343
|
-
var PermissionRequestParams =
|
|
344
|
-
|
|
345
|
-
...
|
|
381
|
+
var PermissionRequestParams = v9.variant("type", [
|
|
382
|
+
v9.object({
|
|
383
|
+
...v9.omit(accountPermissionSchema, ["clientId"]).entries
|
|
346
384
|
}),
|
|
347
|
-
|
|
348
|
-
...
|
|
385
|
+
v9.object({
|
|
386
|
+
...v9.omit(walletPermissionSchema, ["clientId"]).entries
|
|
349
387
|
})
|
|
350
388
|
]);
|
|
351
|
-
var permission =
|
|
389
|
+
var permission = v9.variant("type", [accountPermissionSchema, walletPermissionSchema]);
|
|
352
390
|
|
|
353
391
|
// src/request/types/walletMethods/connect.ts
|
|
354
|
-
import * as
|
|
392
|
+
import * as v11 from "valibot";
|
|
355
393
|
|
|
356
394
|
// src/request/types/walletMethods/getNetwork.ts
|
|
357
|
-
import * as
|
|
395
|
+
import * as v10 from "valibot";
|
|
358
396
|
var getNetworkMethodName = "wallet_getNetwork";
|
|
359
|
-
var getNetworkParamsSchema =
|
|
360
|
-
var getNetworkResultSchema =
|
|
361
|
-
bitcoin:
|
|
362
|
-
name:
|
|
397
|
+
var getNetworkParamsSchema = v10.nullish(v10.null());
|
|
398
|
+
var getNetworkResultSchema = v10.object({
|
|
399
|
+
bitcoin: v10.object({
|
|
400
|
+
name: v10.enum(BitcoinNetworkType)
|
|
363
401
|
}),
|
|
364
|
-
stacks:
|
|
365
|
-
name:
|
|
402
|
+
stacks: v10.object({
|
|
403
|
+
name: v10.enum(StacksNetworkType)
|
|
366
404
|
}),
|
|
367
|
-
spark:
|
|
368
|
-
name:
|
|
405
|
+
spark: v10.object({
|
|
406
|
+
name: v10.enum(SparkNetworkType)
|
|
369
407
|
})
|
|
370
408
|
});
|
|
371
|
-
var getNetworkRequestMessageSchema =
|
|
409
|
+
var getNetworkRequestMessageSchema = v10.object({
|
|
372
410
|
...rpcRequestMessageSchema.entries,
|
|
373
|
-
...
|
|
374
|
-
method:
|
|
411
|
+
...v10.object({
|
|
412
|
+
method: v10.literal(getNetworkMethodName),
|
|
375
413
|
params: getNetworkParamsSchema,
|
|
376
|
-
id:
|
|
414
|
+
id: v10.string()
|
|
377
415
|
}).entries
|
|
378
416
|
});
|
|
379
417
|
|
|
380
418
|
// src/request/types/walletMethods/connect.ts
|
|
381
419
|
var connectMethodName = "wallet_connect";
|
|
382
|
-
var connectParamsSchema =
|
|
383
|
-
|
|
384
|
-
permissions:
|
|
385
|
-
addresses:
|
|
386
|
-
message:
|
|
387
|
-
|
|
420
|
+
var connectParamsSchema = v11.nullish(
|
|
421
|
+
v11.object({
|
|
422
|
+
permissions: v11.optional(v11.array(PermissionRequestParams)),
|
|
423
|
+
addresses: v11.optional(v11.array(v11.enum(AddressPurpose))),
|
|
424
|
+
message: v11.optional(
|
|
425
|
+
v11.pipe(v11.string(), v11.maxLength(80, "The message must not exceed 80 characters."))
|
|
388
426
|
),
|
|
389
|
-
network:
|
|
427
|
+
network: v11.optional(v11.enum(BitcoinNetworkType))
|
|
390
428
|
})
|
|
391
429
|
);
|
|
392
|
-
var connectResultSchema =
|
|
393
|
-
id:
|
|
394
|
-
addresses:
|
|
430
|
+
var connectResultSchema = v11.object({
|
|
431
|
+
id: v11.string(),
|
|
432
|
+
addresses: v11.array(addressSchema),
|
|
395
433
|
walletType: walletTypeSchema,
|
|
396
434
|
network: getNetworkResultSchema
|
|
397
435
|
});
|
|
398
|
-
var connectRequestMessageSchema =
|
|
436
|
+
var connectRequestMessageSchema = v11.object({
|
|
399
437
|
...rpcRequestMessageSchema.entries,
|
|
400
|
-
...
|
|
401
|
-
method:
|
|
438
|
+
...v11.object({
|
|
439
|
+
method: v11.literal(connectMethodName),
|
|
402
440
|
params: connectParamsSchema,
|
|
403
|
-
id:
|
|
441
|
+
id: v11.string()
|
|
404
442
|
}).entries
|
|
405
443
|
});
|
|
406
444
|
|
|
407
445
|
// src/request/types/walletMethods/disconnect.ts
|
|
408
|
-
import * as
|
|
446
|
+
import * as v12 from "valibot";
|
|
409
447
|
var disconnectMethodName = "wallet_disconnect";
|
|
410
|
-
var disconnectParamsSchema =
|
|
411
|
-
var disconnectResultSchema =
|
|
412
|
-
var disconnectRequestMessageSchema =
|
|
448
|
+
var disconnectParamsSchema = v12.nullish(v12.null());
|
|
449
|
+
var disconnectResultSchema = v12.nullish(v12.null());
|
|
450
|
+
var disconnectRequestMessageSchema = v12.object({
|
|
413
451
|
...rpcRequestMessageSchema.entries,
|
|
414
|
-
...
|
|
415
|
-
method:
|
|
452
|
+
...v12.object({
|
|
453
|
+
method: v12.literal(disconnectMethodName),
|
|
416
454
|
params: disconnectParamsSchema,
|
|
417
|
-
id:
|
|
455
|
+
id: v12.string()
|
|
418
456
|
}).entries
|
|
419
457
|
});
|
|
420
458
|
|
|
421
459
|
// src/request/types/walletMethods/getAccount.ts
|
|
422
|
-
import * as
|
|
460
|
+
import * as v13 from "valibot";
|
|
423
461
|
var getAccountMethodName = "wallet_getAccount";
|
|
424
|
-
var getAccountParamsSchema =
|
|
425
|
-
var getAccountResultSchema =
|
|
426
|
-
id:
|
|
427
|
-
addresses:
|
|
462
|
+
var getAccountParamsSchema = v13.nullish(v13.null());
|
|
463
|
+
var getAccountResultSchema = v13.object({
|
|
464
|
+
id: v13.string(),
|
|
465
|
+
addresses: v13.array(addressSchema),
|
|
428
466
|
walletType: walletTypeSchema,
|
|
429
467
|
network: getNetworkResultSchema
|
|
430
468
|
});
|
|
431
|
-
var getAccountRequestMessageSchema =
|
|
469
|
+
var getAccountRequestMessageSchema = v13.object({
|
|
432
470
|
...rpcRequestMessageSchema.entries,
|
|
433
|
-
...
|
|
434
|
-
method:
|
|
471
|
+
...v13.object({
|
|
472
|
+
method: v13.literal(getAccountMethodName),
|
|
435
473
|
params: getAccountParamsSchema,
|
|
436
|
-
id:
|
|
474
|
+
id: v13.string()
|
|
437
475
|
}).entries
|
|
438
476
|
});
|
|
439
477
|
|
|
440
478
|
// src/request/types/walletMethods/getCurrentPermissions.ts
|
|
441
|
-
import * as
|
|
479
|
+
import * as v14 from "valibot";
|
|
442
480
|
var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
|
|
443
|
-
var getCurrentPermissionsParamsSchema =
|
|
444
|
-
var getCurrentPermissionsResultSchema =
|
|
445
|
-
var getCurrentPermissionsRequestMessageSchema =
|
|
481
|
+
var getCurrentPermissionsParamsSchema = v14.nullish(v14.null());
|
|
482
|
+
var getCurrentPermissionsResultSchema = v14.array(permission);
|
|
483
|
+
var getCurrentPermissionsRequestMessageSchema = v14.object({
|
|
446
484
|
...rpcRequestMessageSchema.entries,
|
|
447
|
-
...
|
|
448
|
-
method:
|
|
485
|
+
...v14.object({
|
|
486
|
+
method: v14.literal(getCurrentPermissionsMethodName),
|
|
449
487
|
params: getCurrentPermissionsParamsSchema,
|
|
450
|
-
id:
|
|
488
|
+
id: v14.string()
|
|
451
489
|
}).entries
|
|
452
490
|
});
|
|
453
491
|
|
|
454
492
|
// src/request/types/walletMethods/getWalletType.ts
|
|
455
|
-
import * as
|
|
493
|
+
import * as v15 from "valibot";
|
|
456
494
|
var getWalletTypeMethodName = "wallet_getWalletType";
|
|
457
|
-
var getWalletTypeParamsSchema =
|
|
495
|
+
var getWalletTypeParamsSchema = v15.nullish(v15.null());
|
|
458
496
|
var getWalletTypeResultSchema = walletTypeSchema;
|
|
459
|
-
var getWalletTypeRequestMessageSchema =
|
|
497
|
+
var getWalletTypeRequestMessageSchema = v15.object({
|
|
460
498
|
...rpcRequestMessageSchema.entries,
|
|
461
|
-
...
|
|
462
|
-
method:
|
|
499
|
+
...v15.object({
|
|
500
|
+
method: v15.literal(getWalletTypeMethodName),
|
|
463
501
|
params: getWalletTypeParamsSchema,
|
|
464
|
-
id:
|
|
502
|
+
id: v15.string()
|
|
465
503
|
}).entries
|
|
466
504
|
});
|
|
467
505
|
|
|
468
506
|
// src/request/types/walletMethods/openBridge.ts
|
|
469
|
-
import * as
|
|
507
|
+
import * as v16 from "valibot";
|
|
470
508
|
var openBridgeMethodName = "wallet_openBridge";
|
|
471
|
-
var openBridgeParamsSchema =
|
|
472
|
-
fromAsset:
|
|
473
|
-
toAsset:
|
|
509
|
+
var openBridgeParamsSchema = v16.object({
|
|
510
|
+
fromAsset: v16.string(),
|
|
511
|
+
toAsset: v16.string()
|
|
474
512
|
});
|
|
475
|
-
var openBridgeResultSchema =
|
|
476
|
-
var openBridgeRequestMessageSchema =
|
|
513
|
+
var openBridgeResultSchema = v16.nullish(v16.null());
|
|
514
|
+
var openBridgeRequestMessageSchema = v16.object({
|
|
477
515
|
...rpcRequestMessageSchema.entries,
|
|
478
|
-
...
|
|
479
|
-
method:
|
|
516
|
+
...v16.object({
|
|
517
|
+
method: v16.literal(openBridgeMethodName),
|
|
480
518
|
params: openBridgeParamsSchema,
|
|
481
|
-
id:
|
|
519
|
+
id: v16.string()
|
|
482
520
|
}).entries
|
|
483
521
|
});
|
|
484
522
|
|
|
485
523
|
// src/request/types/walletMethods/openBuy.ts
|
|
486
|
-
import * as
|
|
524
|
+
import * as v17 from "valibot";
|
|
487
525
|
var openBuyMethodName = "wallet_openBuy";
|
|
488
|
-
var openBuyParamsSchema =
|
|
489
|
-
asset:
|
|
526
|
+
var openBuyParamsSchema = v17.object({
|
|
527
|
+
asset: v17.string()
|
|
490
528
|
});
|
|
491
|
-
var openBuyResultSchema =
|
|
492
|
-
var openBuyRequestMessageSchema =
|
|
529
|
+
var openBuyResultSchema = v17.nullish(v17.null());
|
|
530
|
+
var openBuyRequestMessageSchema = v17.object({
|
|
493
531
|
...rpcRequestMessageSchema.entries,
|
|
494
|
-
...
|
|
495
|
-
method:
|
|
532
|
+
...v17.object({
|
|
533
|
+
method: v17.literal(openBuyMethodName),
|
|
496
534
|
params: openBuyParamsSchema,
|
|
497
|
-
id:
|
|
535
|
+
id: v17.string()
|
|
498
536
|
}).entries
|
|
499
537
|
});
|
|
500
538
|
|
|
501
539
|
// src/request/types/walletMethods/openReceive.ts
|
|
502
|
-
import * as
|
|
540
|
+
import * as v18 from "valibot";
|
|
503
541
|
var openReceiveMethodName = "wallet_openReceive";
|
|
504
|
-
var openReceiveParamsSchema =
|
|
505
|
-
address:
|
|
542
|
+
var openReceiveParamsSchema = v18.object({
|
|
543
|
+
address: v18.string()
|
|
506
544
|
});
|
|
507
545
|
var openReceiveResultSchema = addressSchema;
|
|
508
|
-
var openReceiveRequestMessageSchema =
|
|
546
|
+
var openReceiveRequestMessageSchema = v18.object({
|
|
509
547
|
...rpcRequestMessageSchema.entries,
|
|
510
|
-
...
|
|
511
|
-
method:
|
|
548
|
+
...v18.object({
|
|
549
|
+
method: v18.literal(openReceiveMethodName),
|
|
512
550
|
params: openReceiveParamsSchema,
|
|
513
|
-
id:
|
|
551
|
+
id: v18.string()
|
|
514
552
|
}).entries
|
|
515
553
|
});
|
|
516
554
|
|
|
517
555
|
// src/request/types/walletMethods/renouncePermissions.ts
|
|
518
|
-
import * as
|
|
556
|
+
import * as v19 from "valibot";
|
|
519
557
|
var renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
520
|
-
var renouncePermissionsParamsSchema =
|
|
521
|
-
var renouncePermissionsResultSchema =
|
|
522
|
-
var renouncePermissionsRequestMessageSchema =
|
|
558
|
+
var renouncePermissionsParamsSchema = v19.nullish(v19.null());
|
|
559
|
+
var renouncePermissionsResultSchema = v19.nullish(v19.null());
|
|
560
|
+
var renouncePermissionsRequestMessageSchema = v19.object({
|
|
523
561
|
...rpcRequestMessageSchema.entries,
|
|
524
|
-
...
|
|
525
|
-
method:
|
|
562
|
+
...v19.object({
|
|
563
|
+
method: v19.literal(renouncePermissionsMethodName),
|
|
526
564
|
params: renouncePermissionsParamsSchema,
|
|
527
|
-
id:
|
|
565
|
+
id: v19.string()
|
|
528
566
|
}).entries
|
|
529
567
|
});
|
|
530
568
|
|
|
531
569
|
// src/request/types/walletMethods/requestPermissions.ts
|
|
532
|
-
import * as
|
|
570
|
+
import * as v20 from "valibot";
|
|
533
571
|
var requestPermissionsMethodName = "wallet_requestPermissions";
|
|
534
|
-
var requestPermissionsParamsSchema =
|
|
535
|
-
var requestPermissionsResultSchema =
|
|
536
|
-
var requestPermissionsRequestMessageSchema =
|
|
572
|
+
var requestPermissionsParamsSchema = v20.nullish(v20.array(PermissionRequestParams));
|
|
573
|
+
var requestPermissionsResultSchema = v20.literal(true);
|
|
574
|
+
var requestPermissionsRequestMessageSchema = v20.object({
|
|
537
575
|
...rpcRequestMessageSchema.entries,
|
|
538
|
-
...
|
|
539
|
-
method:
|
|
576
|
+
...v20.object({
|
|
577
|
+
method: v20.literal(requestPermissionsMethodName),
|
|
540
578
|
params: requestPermissionsParamsSchema,
|
|
541
|
-
id:
|
|
579
|
+
id: v20.string()
|
|
580
|
+
}).entries
|
|
581
|
+
});
|
|
582
|
+
|
|
583
|
+
// src/request/types/btcMethods/getAddresses.ts
|
|
584
|
+
var getAddressesMethodName = "getAddresses";
|
|
585
|
+
var getAddressesParamsSchema = v21.object({
|
|
586
|
+
/**
|
|
587
|
+
* The purposes for which to generate addresses. See
|
|
588
|
+
* {@linkcode AddressPurpose} for available purposes.
|
|
589
|
+
*/
|
|
590
|
+
purposes: v21.array(v21.enum(AddressPurpose)),
|
|
591
|
+
/**
|
|
592
|
+
* A message to be displayed to the user in the request prompt.
|
|
593
|
+
*/
|
|
594
|
+
message: v21.optional(v21.string())
|
|
595
|
+
});
|
|
596
|
+
var getAddressesResultSchema = v21.object({
|
|
597
|
+
/**
|
|
598
|
+
* The addresses generated for the given purposes.
|
|
599
|
+
*/
|
|
600
|
+
addresses: v21.array(addressSchema),
|
|
601
|
+
network: getNetworkResultSchema
|
|
602
|
+
});
|
|
603
|
+
var getAddressesRequestMessageSchema = v21.object({
|
|
604
|
+
...rpcRequestMessageSchema.entries,
|
|
605
|
+
...v21.object({
|
|
606
|
+
method: v21.literal(getAddressesMethodName),
|
|
607
|
+
params: getAddressesParamsSchema,
|
|
608
|
+
id: v21.string()
|
|
609
|
+
}).entries
|
|
610
|
+
});
|
|
611
|
+
|
|
612
|
+
// src/request/types/btcMethods/getBalance.ts
|
|
613
|
+
import * as v22 from "valibot";
|
|
614
|
+
var getBalanceMethodName = "getBalance";
|
|
615
|
+
var getBalanceParamsSchema = v22.nullish(v22.null());
|
|
616
|
+
var getBalanceResultSchema = v22.object({
|
|
617
|
+
/**
|
|
618
|
+
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
619
|
+
* messages not supporting bigint
|
|
620
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
621
|
+
*/
|
|
622
|
+
confirmed: v22.string(),
|
|
623
|
+
/**
|
|
624
|
+
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
625
|
+
* messages not supporting bigint
|
|
626
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
627
|
+
*/
|
|
628
|
+
unconfirmed: v22.string(),
|
|
629
|
+
/**
|
|
630
|
+
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
631
|
+
* sats. Using a string due to chrome messages not supporting bigint
|
|
632
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
633
|
+
*/
|
|
634
|
+
total: v22.string()
|
|
635
|
+
});
|
|
636
|
+
var getBalanceRequestMessageSchema = v22.object({
|
|
637
|
+
...rpcRequestMessageSchema.entries,
|
|
638
|
+
...v22.object({
|
|
639
|
+
method: v22.literal(getBalanceMethodName),
|
|
640
|
+
id: v22.string()
|
|
542
641
|
}).entries
|
|
543
642
|
});
|
|
544
643
|
|
|
545
|
-
// src/request/types/btcMethods.ts
|
|
644
|
+
// src/request/types/btcMethods/getInfo.ts
|
|
645
|
+
import * as v23 from "valibot";
|
|
546
646
|
var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
|
|
547
647
|
ProviderPlatform2["Web"] = "web";
|
|
548
648
|
ProviderPlatform2["Mobile"] = "mobile";
|
|
549
649
|
return ProviderPlatform2;
|
|
550
650
|
})(ProviderPlatform || {});
|
|
551
651
|
var getInfoMethodName = "getInfo";
|
|
552
|
-
var getInfoParamsSchema =
|
|
553
|
-
var getInfoResultSchema =
|
|
652
|
+
var getInfoParamsSchema = v23.nullish(v23.null());
|
|
653
|
+
var getInfoResultSchema = v23.object({
|
|
554
654
|
/**
|
|
555
655
|
* Version of the wallet.
|
|
556
656
|
*/
|
|
557
|
-
version:
|
|
657
|
+
version: v23.string(),
|
|
558
658
|
/**
|
|
559
659
|
* The platform the wallet is running on (web or mobile).
|
|
560
660
|
*/
|
|
561
|
-
platform:
|
|
661
|
+
platform: v23.optional(v23.enum(ProviderPlatform)),
|
|
562
662
|
/**
|
|
563
663
|
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
564
664
|
*/
|
|
565
|
-
methods:
|
|
665
|
+
methods: v23.optional(v23.array(v23.string())),
|
|
566
666
|
/**
|
|
567
667
|
* List of WBIP standards supported by the wallet. Not currently used.
|
|
568
668
|
*/
|
|
569
|
-
supports:
|
|
669
|
+
supports: v23.array(v23.string())
|
|
570
670
|
});
|
|
571
|
-
var getInfoRequestMessageSchema =
|
|
671
|
+
var getInfoRequestMessageSchema = v23.object({
|
|
572
672
|
...rpcRequestMessageSchema.entries,
|
|
573
|
-
...
|
|
574
|
-
method:
|
|
673
|
+
...v23.object({
|
|
674
|
+
method: v23.literal(getInfoMethodName),
|
|
575
675
|
params: getInfoParamsSchema,
|
|
576
|
-
id:
|
|
676
|
+
id: v23.string()
|
|
577
677
|
}).entries
|
|
578
678
|
});
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
*/
|
|
585
|
-
purposes: v20.array(v20.enum(AddressPurpose)),
|
|
679
|
+
|
|
680
|
+
// src/request/types/btcMethods/sendTransfer.ts
|
|
681
|
+
import * as v24 from "valibot";
|
|
682
|
+
var sendTransferMethodName = "sendTransfer";
|
|
683
|
+
var sendTransferParamsSchema = v24.object({
|
|
586
684
|
/**
|
|
587
|
-
*
|
|
685
|
+
* Array of recipients to send to.
|
|
686
|
+
* The amount to send to each recipient is in satoshis.
|
|
588
687
|
*/
|
|
589
|
-
|
|
688
|
+
recipients: v24.array(
|
|
689
|
+
v24.object({
|
|
690
|
+
address: v24.string(),
|
|
691
|
+
amount: v24.number()
|
|
692
|
+
})
|
|
693
|
+
)
|
|
590
694
|
});
|
|
591
|
-
var
|
|
695
|
+
var sendTransferResultSchema = v24.object({
|
|
592
696
|
/**
|
|
593
|
-
* The
|
|
697
|
+
* The transaction id as a hex-encoded string.
|
|
594
698
|
*/
|
|
595
|
-
|
|
596
|
-
network: getNetworkResultSchema
|
|
699
|
+
txid: v24.string()
|
|
597
700
|
});
|
|
598
|
-
var
|
|
701
|
+
var sendTransferRequestMessageSchema = v24.object({
|
|
599
702
|
...rpcRequestMessageSchema.entries,
|
|
600
|
-
...
|
|
601
|
-
method:
|
|
602
|
-
params:
|
|
603
|
-
id:
|
|
703
|
+
...v24.object({
|
|
704
|
+
method: v24.literal(sendTransferMethodName),
|
|
705
|
+
params: sendTransferParamsSchema,
|
|
706
|
+
id: v24.string()
|
|
604
707
|
}).entries
|
|
605
708
|
});
|
|
709
|
+
|
|
710
|
+
// src/request/types/btcMethods/signMessage.ts
|
|
711
|
+
import * as v25 from "valibot";
|
|
606
712
|
var signMessageMethodName = "signMessage";
|
|
607
|
-
var
|
|
608
|
-
MessageSigningProtocols2["ECDSA"] = "ECDSA";
|
|
609
|
-
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
610
|
-
return MessageSigningProtocols2;
|
|
611
|
-
})(MessageSigningProtocols || {});
|
|
612
|
-
var signMessageParamsSchema = v20.object({
|
|
713
|
+
var signMessageParamsSchema = v25.object({
|
|
613
714
|
/**
|
|
614
715
|
* The address used for signing.
|
|
615
716
|
**/
|
|
616
|
-
address:
|
|
717
|
+
address: v25.string(),
|
|
617
718
|
/**
|
|
618
719
|
* The message to sign.
|
|
619
720
|
**/
|
|
620
|
-
message:
|
|
721
|
+
message: v25.string(),
|
|
621
722
|
/**
|
|
622
723
|
* The protocol to use for signing the message.
|
|
623
724
|
*/
|
|
624
|
-
protocol:
|
|
725
|
+
protocol: v25.optional(v25.enum(MessageSigningProtocols))
|
|
625
726
|
});
|
|
626
|
-
var signMessageResultSchema =
|
|
727
|
+
var signMessageResultSchema = v25.object({
|
|
627
728
|
/**
|
|
628
729
|
* The signature of the message.
|
|
629
730
|
*/
|
|
630
|
-
signature:
|
|
731
|
+
signature: v25.string(),
|
|
631
732
|
/**
|
|
632
733
|
* hash of the message.
|
|
633
734
|
*/
|
|
634
|
-
messageHash:
|
|
735
|
+
messageHash: v25.string(),
|
|
635
736
|
/**
|
|
636
737
|
* The address used for signing.
|
|
637
738
|
*/
|
|
638
|
-
address:
|
|
739
|
+
address: v25.string(),
|
|
639
740
|
/**
|
|
640
741
|
* The protocol to use for signing the message.
|
|
641
742
|
*/
|
|
642
|
-
protocol:
|
|
743
|
+
protocol: v25.enum(MessageSigningProtocols)
|
|
643
744
|
});
|
|
644
|
-
var signMessageRequestMessageSchema =
|
|
745
|
+
var signMessageRequestMessageSchema = v25.object({
|
|
645
746
|
...rpcRequestMessageSchema.entries,
|
|
646
|
-
...
|
|
647
|
-
method:
|
|
747
|
+
...v25.object({
|
|
748
|
+
method: v25.literal(signMessageMethodName),
|
|
648
749
|
params: signMessageParamsSchema,
|
|
649
|
-
id:
|
|
750
|
+
id: v25.string()
|
|
650
751
|
}).entries
|
|
651
752
|
});
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
})
|
|
671
|
-
|
|
753
|
+
|
|
754
|
+
// src/request/types/btcMethods/signMultipleMessages.ts
|
|
755
|
+
import * as v26 from "valibot";
|
|
756
|
+
var signMultipleMessagesMethodName = "signMultipleMessages";
|
|
757
|
+
var signMultipleMessagesParamsSchema = v26.array(
|
|
758
|
+
v26.object({
|
|
759
|
+
/**
|
|
760
|
+
* The address used for signing.
|
|
761
|
+
**/
|
|
762
|
+
address: v26.string(),
|
|
763
|
+
/**
|
|
764
|
+
* The message to sign.
|
|
765
|
+
**/
|
|
766
|
+
message: v26.string(),
|
|
767
|
+
/**
|
|
768
|
+
* The protocol to use for signing the message.
|
|
769
|
+
*/
|
|
770
|
+
protocol: v26.optional(v26.enum(MessageSigningProtocols))
|
|
771
|
+
})
|
|
772
|
+
);
|
|
773
|
+
var signMultipleMessagesResultSchema = v26.array(
|
|
774
|
+
v26.object({
|
|
775
|
+
/**
|
|
776
|
+
* The signature of the message.
|
|
777
|
+
*/
|
|
778
|
+
signature: v26.string(),
|
|
779
|
+
/**
|
|
780
|
+
* The original message which was signed.
|
|
781
|
+
*/
|
|
782
|
+
message: v26.string(),
|
|
783
|
+
/**
|
|
784
|
+
* Hash of the message.
|
|
785
|
+
*/
|
|
786
|
+
messageHash: v26.string(),
|
|
787
|
+
/**
|
|
788
|
+
* The address used for signing.
|
|
789
|
+
*/
|
|
790
|
+
address: v26.string(),
|
|
791
|
+
/**
|
|
792
|
+
* The protocol to use for signing the message.
|
|
793
|
+
*/
|
|
794
|
+
protocol: v26.enum(MessageSigningProtocols)
|
|
795
|
+
})
|
|
796
|
+
);
|
|
797
|
+
var signMultipleMessagesRequestMessageSchema = v26.object({
|
|
672
798
|
...rpcRequestMessageSchema.entries,
|
|
673
|
-
...
|
|
674
|
-
method:
|
|
675
|
-
params:
|
|
676
|
-
id:
|
|
799
|
+
...v26.object({
|
|
800
|
+
method: v26.literal(signMultipleMessagesMethodName),
|
|
801
|
+
params: signMultipleMessagesParamsSchema,
|
|
802
|
+
id: v26.string()
|
|
677
803
|
}).entries
|
|
678
804
|
});
|
|
805
|
+
|
|
806
|
+
// src/request/types/btcMethods/signPSBT.ts
|
|
807
|
+
import * as v27 from "valibot";
|
|
679
808
|
var signPsbtMethodName = "signPsbt";
|
|
680
|
-
var signPsbtParamsSchema =
|
|
809
|
+
var signPsbtParamsSchema = v27.object({
|
|
681
810
|
/**
|
|
682
811
|
* The base64 encoded PSBT to sign.
|
|
683
812
|
*/
|
|
684
|
-
psbt:
|
|
813
|
+
psbt: v27.string(),
|
|
685
814
|
/**
|
|
686
815
|
* The inputs to sign.
|
|
687
816
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
688
817
|
*/
|
|
689
|
-
signInputs:
|
|
818
|
+
signInputs: v27.optional(v27.record(v27.string(), v27.array(v27.number()))),
|
|
690
819
|
/**
|
|
691
820
|
* Whether to broadcast the transaction after signing.
|
|
692
821
|
**/
|
|
693
|
-
broadcast:
|
|
822
|
+
broadcast: v27.optional(v27.boolean())
|
|
694
823
|
});
|
|
695
|
-
var signPsbtResultSchema =
|
|
824
|
+
var signPsbtResultSchema = v27.object({
|
|
696
825
|
/**
|
|
697
826
|
* The base64 encoded PSBT after signing.
|
|
698
827
|
*/
|
|
699
|
-
psbt:
|
|
828
|
+
psbt: v27.string(),
|
|
700
829
|
/**
|
|
701
830
|
* The transaction id as a hex-encoded string.
|
|
702
831
|
* This is only returned if the transaction was broadcast.
|
|
703
832
|
**/
|
|
704
|
-
txid:
|
|
833
|
+
txid: v27.optional(v27.string())
|
|
705
834
|
});
|
|
706
|
-
var signPsbtRequestMessageSchema =
|
|
835
|
+
var signPsbtRequestMessageSchema = v27.object({
|
|
707
836
|
...rpcRequestMessageSchema.entries,
|
|
708
|
-
...
|
|
709
|
-
method:
|
|
837
|
+
...v27.object({
|
|
838
|
+
method: v27.literal(signPsbtMethodName),
|
|
710
839
|
params: signPsbtParamsSchema,
|
|
711
|
-
id:
|
|
712
|
-
}).entries
|
|
713
|
-
});
|
|
714
|
-
var getAccountsMethodName = "getAccounts";
|
|
715
|
-
var getAccountsParamsSchema = v20.object({
|
|
716
|
-
/**
|
|
717
|
-
* The purposes for which to generate addresses. See
|
|
718
|
-
* {@linkcode AddressPurpose} for available purposes.
|
|
719
|
-
*/
|
|
720
|
-
purposes: v20.array(v20.enum(AddressPurpose)),
|
|
721
|
-
/**
|
|
722
|
-
* A message to be displayed to the user in the request prompt.
|
|
723
|
-
*/
|
|
724
|
-
message: v20.optional(v20.string())
|
|
725
|
-
});
|
|
726
|
-
var getAccountsResultSchema = v20.array(
|
|
727
|
-
v20.object({
|
|
728
|
-
...addressSchema.entries,
|
|
729
|
-
...v20.object({
|
|
730
|
-
walletType: walletTypeSchema
|
|
731
|
-
}).entries
|
|
732
|
-
})
|
|
733
|
-
);
|
|
734
|
-
var getAccountsRequestMessageSchema = v20.object({
|
|
735
|
-
...rpcRequestMessageSchema.entries,
|
|
736
|
-
...v20.object({
|
|
737
|
-
method: v20.literal(getAccountsMethodName),
|
|
738
|
-
params: getAccountsParamsSchema,
|
|
739
|
-
id: v20.string()
|
|
740
|
-
}).entries
|
|
741
|
-
});
|
|
742
|
-
var getBalanceMethodName = "getBalance";
|
|
743
|
-
var getBalanceParamsSchema = v20.nullish(v20.null());
|
|
744
|
-
var getBalanceResultSchema = v20.object({
|
|
745
|
-
/**
|
|
746
|
-
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
747
|
-
* messages not supporting bigint
|
|
748
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
749
|
-
*/
|
|
750
|
-
confirmed: v20.string(),
|
|
751
|
-
/**
|
|
752
|
-
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
753
|
-
* messages not supporting bigint
|
|
754
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
755
|
-
*/
|
|
756
|
-
unconfirmed: v20.string(),
|
|
757
|
-
/**
|
|
758
|
-
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
759
|
-
* sats. Using a string due to chrome messages not supporting bigint
|
|
760
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
761
|
-
*/
|
|
762
|
-
total: v20.string()
|
|
763
|
-
});
|
|
764
|
-
var getBalanceRequestMessageSchema = v20.object({
|
|
765
|
-
...rpcRequestMessageSchema.entries,
|
|
766
|
-
...v20.object({
|
|
767
|
-
method: v20.literal(getBalanceMethodName),
|
|
768
|
-
id: v20.string()
|
|
840
|
+
id: v27.string()
|
|
769
841
|
}).entries
|
|
770
842
|
});
|
|
771
843
|
|
|
772
844
|
// src/request/types/ordinalsMethods.ts
|
|
773
|
-
import * as
|
|
845
|
+
import * as v28 from "valibot";
|
|
774
846
|
var getInscriptionsMethodName = "ord_getInscriptions";
|
|
775
|
-
var getInscriptionsParamsSchema =
|
|
776
|
-
offset:
|
|
777
|
-
limit:
|
|
778
|
-
});
|
|
779
|
-
var getInscriptionsResultSchema =
|
|
780
|
-
total:
|
|
781
|
-
limit:
|
|
782
|
-
offset:
|
|
783
|
-
inscriptions:
|
|
784
|
-
|
|
785
|
-
inscriptionId:
|
|
786
|
-
inscriptionNumber:
|
|
787
|
-
address:
|
|
788
|
-
collectionName:
|
|
789
|
-
postage:
|
|
790
|
-
contentLength:
|
|
791
|
-
contentType:
|
|
792
|
-
timestamp:
|
|
793
|
-
offset:
|
|
794
|
-
genesisTransaction:
|
|
795
|
-
output:
|
|
847
|
+
var getInscriptionsParamsSchema = v28.object({
|
|
848
|
+
offset: v28.number(),
|
|
849
|
+
limit: v28.number()
|
|
850
|
+
});
|
|
851
|
+
var getInscriptionsResultSchema = v28.object({
|
|
852
|
+
total: v28.number(),
|
|
853
|
+
limit: v28.number(),
|
|
854
|
+
offset: v28.number(),
|
|
855
|
+
inscriptions: v28.array(
|
|
856
|
+
v28.object({
|
|
857
|
+
inscriptionId: v28.string(),
|
|
858
|
+
inscriptionNumber: v28.string(),
|
|
859
|
+
address: v28.string(),
|
|
860
|
+
collectionName: v28.optional(v28.string()),
|
|
861
|
+
postage: v28.string(),
|
|
862
|
+
contentLength: v28.string(),
|
|
863
|
+
contentType: v28.string(),
|
|
864
|
+
timestamp: v28.number(),
|
|
865
|
+
offset: v28.number(),
|
|
866
|
+
genesisTransaction: v28.string(),
|
|
867
|
+
output: v28.string()
|
|
796
868
|
})
|
|
797
869
|
)
|
|
798
870
|
});
|
|
799
|
-
var getInscriptionsRequestMessageSchema =
|
|
871
|
+
var getInscriptionsRequestMessageSchema = v28.object({
|
|
800
872
|
...rpcRequestMessageSchema.entries,
|
|
801
|
-
...
|
|
802
|
-
method:
|
|
873
|
+
...v28.object({
|
|
874
|
+
method: v28.literal(getInscriptionsMethodName),
|
|
803
875
|
params: getInscriptionsParamsSchema,
|
|
804
|
-
id:
|
|
876
|
+
id: v28.string()
|
|
805
877
|
}).entries
|
|
806
878
|
});
|
|
807
879
|
var sendInscriptionsMethodName = "ord_sendInscriptions";
|
|
808
|
-
var sendInscriptionsParamsSchema =
|
|
809
|
-
transfers:
|
|
810
|
-
|
|
811
|
-
address:
|
|
812
|
-
inscriptionId:
|
|
880
|
+
var sendInscriptionsParamsSchema = v28.object({
|
|
881
|
+
transfers: v28.array(
|
|
882
|
+
v28.object({
|
|
883
|
+
address: v28.string(),
|
|
884
|
+
inscriptionId: v28.string()
|
|
813
885
|
})
|
|
814
886
|
)
|
|
815
887
|
});
|
|
816
|
-
var sendInscriptionsResultSchema =
|
|
817
|
-
txid:
|
|
888
|
+
var sendInscriptionsResultSchema = v28.object({
|
|
889
|
+
txid: v28.string()
|
|
818
890
|
});
|
|
819
|
-
var sendInscriptionsRequestMessageSchema =
|
|
891
|
+
var sendInscriptionsRequestMessageSchema = v28.object({
|
|
820
892
|
...rpcRequestMessageSchema.entries,
|
|
821
|
-
...
|
|
822
|
-
method:
|
|
893
|
+
...v28.object({
|
|
894
|
+
method: v28.literal(sendInscriptionsMethodName),
|
|
823
895
|
params: sendInscriptionsParamsSchema,
|
|
824
|
-
id:
|
|
896
|
+
id: v28.string()
|
|
825
897
|
}).entries
|
|
826
898
|
});
|
|
827
899
|
|
|
828
900
|
// src/request/types/runesMethods/etch.ts
|
|
829
|
-
import * as
|
|
901
|
+
import * as v29 from "valibot";
|
|
830
902
|
var runesEtchMethodName = "runes_etch";
|
|
831
|
-
var etchTermsSchema =
|
|
832
|
-
amount:
|
|
833
|
-
cap:
|
|
834
|
-
heightStart:
|
|
835
|
-
heightEnd:
|
|
836
|
-
offsetStart:
|
|
837
|
-
offsetEnd:
|
|
838
|
-
});
|
|
839
|
-
var inscriptionDetailsSchema =
|
|
840
|
-
contentType:
|
|
841
|
-
contentBase64:
|
|
842
|
-
});
|
|
843
|
-
var runesEtchParamsSchema =
|
|
844
|
-
runeName:
|
|
845
|
-
divisibility:
|
|
846
|
-
symbol:
|
|
847
|
-
premine:
|
|
848
|
-
isMintable:
|
|
849
|
-
delegateInscriptionId:
|
|
850
|
-
destinationAddress:
|
|
851
|
-
refundAddress:
|
|
852
|
-
feeRate:
|
|
853
|
-
appServiceFee:
|
|
854
|
-
appServiceFeeAddress:
|
|
855
|
-
terms:
|
|
856
|
-
inscriptionDetails:
|
|
857
|
-
network:
|
|
858
|
-
});
|
|
859
|
-
var runesEtchResultSchema =
|
|
860
|
-
orderId:
|
|
861
|
-
fundTransactionId:
|
|
862
|
-
fundingAddress:
|
|
863
|
-
});
|
|
864
|
-
var runesEtchRequestMessageSchema =
|
|
903
|
+
var etchTermsSchema = v29.object({
|
|
904
|
+
amount: v29.string(),
|
|
905
|
+
cap: v29.string(),
|
|
906
|
+
heightStart: v29.optional(v29.string()),
|
|
907
|
+
heightEnd: v29.optional(v29.string()),
|
|
908
|
+
offsetStart: v29.optional(v29.string()),
|
|
909
|
+
offsetEnd: v29.optional(v29.string())
|
|
910
|
+
});
|
|
911
|
+
var inscriptionDetailsSchema = v29.object({
|
|
912
|
+
contentType: v29.string(),
|
|
913
|
+
contentBase64: v29.string()
|
|
914
|
+
});
|
|
915
|
+
var runesEtchParamsSchema = v29.object({
|
|
916
|
+
runeName: v29.string(),
|
|
917
|
+
divisibility: v29.optional(v29.number()),
|
|
918
|
+
symbol: v29.optional(v29.string()),
|
|
919
|
+
premine: v29.optional(v29.string()),
|
|
920
|
+
isMintable: v29.boolean(),
|
|
921
|
+
delegateInscriptionId: v29.optional(v29.string()),
|
|
922
|
+
destinationAddress: v29.string(),
|
|
923
|
+
refundAddress: v29.string(),
|
|
924
|
+
feeRate: v29.number(),
|
|
925
|
+
appServiceFee: v29.optional(v29.number()),
|
|
926
|
+
appServiceFeeAddress: v29.optional(v29.string()),
|
|
927
|
+
terms: v29.optional(etchTermsSchema),
|
|
928
|
+
inscriptionDetails: v29.optional(inscriptionDetailsSchema),
|
|
929
|
+
network: v29.optional(v29.enum(BitcoinNetworkType))
|
|
930
|
+
});
|
|
931
|
+
var runesEtchResultSchema = v29.object({
|
|
932
|
+
orderId: v29.string(),
|
|
933
|
+
fundTransactionId: v29.string(),
|
|
934
|
+
fundingAddress: v29.string()
|
|
935
|
+
});
|
|
936
|
+
var runesEtchRequestMessageSchema = v29.object({
|
|
865
937
|
...rpcRequestMessageSchema.entries,
|
|
866
|
-
...
|
|
867
|
-
method:
|
|
938
|
+
...v29.object({
|
|
939
|
+
method: v29.literal(runesEtchMethodName),
|
|
868
940
|
params: runesEtchParamsSchema,
|
|
869
|
-
id:
|
|
941
|
+
id: v29.string()
|
|
870
942
|
}).entries
|
|
871
943
|
});
|
|
872
944
|
|
|
873
945
|
// src/request/types/runesMethods/getBalance.ts
|
|
874
|
-
import * as
|
|
946
|
+
import * as v30 from "valibot";
|
|
875
947
|
var runesGetBalanceMethodName = "runes_getBalance";
|
|
876
|
-
var runesGetBalanceParamsSchema =
|
|
877
|
-
var runesGetBalanceResultSchema =
|
|
878
|
-
balances:
|
|
879
|
-
|
|
880
|
-
runeName:
|
|
881
|
-
amount:
|
|
882
|
-
divisibility:
|
|
883
|
-
symbol:
|
|
884
|
-
inscriptionId:
|
|
885
|
-
spendableBalance:
|
|
948
|
+
var runesGetBalanceParamsSchema = v30.nullish(v30.null());
|
|
949
|
+
var runesGetBalanceResultSchema = v30.object({
|
|
950
|
+
balances: v30.array(
|
|
951
|
+
v30.object({
|
|
952
|
+
runeName: v30.string(),
|
|
953
|
+
amount: v30.string(),
|
|
954
|
+
divisibility: v30.number(),
|
|
955
|
+
symbol: v30.string(),
|
|
956
|
+
inscriptionId: v30.nullish(v30.string()),
|
|
957
|
+
spendableBalance: v30.string()
|
|
886
958
|
})
|
|
887
959
|
)
|
|
888
960
|
});
|
|
889
|
-
var runesGetBalanceRequestMessageSchema =
|
|
961
|
+
var runesGetBalanceRequestMessageSchema = v30.object({
|
|
890
962
|
...rpcRequestMessageSchema.entries,
|
|
891
|
-
...
|
|
892
|
-
method:
|
|
963
|
+
...v30.object({
|
|
964
|
+
method: v30.literal(runesGetBalanceMethodName),
|
|
893
965
|
params: runesGetBalanceParamsSchema,
|
|
894
|
-
id:
|
|
966
|
+
id: v30.string()
|
|
895
967
|
}).entries
|
|
896
968
|
});
|
|
897
969
|
|
|
898
970
|
// src/request/types/runesMethods/mint.ts
|
|
899
|
-
import * as
|
|
971
|
+
import * as v31 from "valibot";
|
|
900
972
|
var runesMintMethodName = "runes_mint";
|
|
901
|
-
var runesMintParamsSchema =
|
|
902
|
-
appServiceFee:
|
|
903
|
-
appServiceFeeAddress:
|
|
904
|
-
destinationAddress:
|
|
905
|
-
feeRate:
|
|
906
|
-
refundAddress:
|
|
907
|
-
repeats:
|
|
908
|
-
runeName:
|
|
909
|
-
network:
|
|
910
|
-
});
|
|
911
|
-
var runesMintResultSchema =
|
|
912
|
-
orderId:
|
|
913
|
-
fundTransactionId:
|
|
914
|
-
fundingAddress:
|
|
915
|
-
});
|
|
916
|
-
var runesMintRequestMessageSchema =
|
|
973
|
+
var runesMintParamsSchema = v31.object({
|
|
974
|
+
appServiceFee: v31.optional(v31.number()),
|
|
975
|
+
appServiceFeeAddress: v31.optional(v31.string()),
|
|
976
|
+
destinationAddress: v31.string(),
|
|
977
|
+
feeRate: v31.number(),
|
|
978
|
+
refundAddress: v31.string(),
|
|
979
|
+
repeats: v31.number(),
|
|
980
|
+
runeName: v31.string(),
|
|
981
|
+
network: v31.optional(v31.enum(BitcoinNetworkType))
|
|
982
|
+
});
|
|
983
|
+
var runesMintResultSchema = v31.object({
|
|
984
|
+
orderId: v31.string(),
|
|
985
|
+
fundTransactionId: v31.string(),
|
|
986
|
+
fundingAddress: v31.string()
|
|
987
|
+
});
|
|
988
|
+
var runesMintRequestMessageSchema = v31.object({
|
|
917
989
|
...rpcRequestMessageSchema.entries,
|
|
918
|
-
...
|
|
919
|
-
method:
|
|
990
|
+
...v31.object({
|
|
991
|
+
method: v31.literal(runesMintMethodName),
|
|
920
992
|
params: runesMintParamsSchema,
|
|
921
|
-
id:
|
|
993
|
+
id: v31.string()
|
|
922
994
|
}).entries
|
|
923
995
|
});
|
|
924
996
|
|
|
925
997
|
// src/request/types/runesMethods/transfer.ts
|
|
926
|
-
import * as
|
|
998
|
+
import * as v32 from "valibot";
|
|
927
999
|
var runesTransferMethodName = "runes_transfer";
|
|
928
|
-
var runesTransferParamsSchema =
|
|
929
|
-
recipients:
|
|
930
|
-
|
|
931
|
-
runeName:
|
|
932
|
-
amount:
|
|
933
|
-
address:
|
|
1000
|
+
var runesTransferParamsSchema = v32.object({
|
|
1001
|
+
recipients: v32.array(
|
|
1002
|
+
v32.object({
|
|
1003
|
+
runeName: v32.string(),
|
|
1004
|
+
amount: v32.string(),
|
|
1005
|
+
address: v32.string()
|
|
934
1006
|
})
|
|
935
1007
|
)
|
|
936
1008
|
});
|
|
937
|
-
var runesTransferResultSchema =
|
|
938
|
-
txid:
|
|
1009
|
+
var runesTransferResultSchema = v32.object({
|
|
1010
|
+
txid: v32.string()
|
|
939
1011
|
});
|
|
940
|
-
var runesTransferRequestMessageSchema =
|
|
1012
|
+
var runesTransferRequestMessageSchema = v32.object({
|
|
941
1013
|
...rpcRequestMessageSchema.entries,
|
|
942
|
-
...
|
|
943
|
-
method:
|
|
1014
|
+
...v32.object({
|
|
1015
|
+
method: v32.literal(runesTransferMethodName),
|
|
944
1016
|
params: runesTransferParamsSchema,
|
|
945
|
-
id:
|
|
1017
|
+
id: v32.string()
|
|
946
1018
|
}).entries
|
|
947
1019
|
});
|
|
948
1020
|
|
|
949
1021
|
// src/request/types/sparkMethods/flashnetMethods/clawbackFunds.ts
|
|
950
|
-
import * as
|
|
1022
|
+
import * as v33 from "valibot";
|
|
951
1023
|
var sparkFlashnetClawbackFundsMethodName = "spark_flashnet_clawbackFunds";
|
|
952
|
-
var sparkFlashnetClawbackFundsParamsSchema =
|
|
953
|
-
sparkTransferId:
|
|
954
|
-
lpIdentityPublicKey:
|
|
955
|
-
});
|
|
956
|
-
var sparkFlashnetClawbackFundsResultSchema =
|
|
957
|
-
requestId:
|
|
958
|
-
accepted:
|
|
959
|
-
internalRequestId:
|
|
960
|
-
sparkStatusTrackingId:
|
|
961
|
-
error:
|
|
962
|
-
});
|
|
963
|
-
var sparkFlashnetClawbackFundsRequestMessageSchema =
|
|
1024
|
+
var sparkFlashnetClawbackFundsParamsSchema = v33.object({
|
|
1025
|
+
sparkTransferId: v33.string(),
|
|
1026
|
+
lpIdentityPublicKey: v33.string()
|
|
1027
|
+
});
|
|
1028
|
+
var sparkFlashnetClawbackFundsResultSchema = v33.object({
|
|
1029
|
+
requestId: v33.string(),
|
|
1030
|
+
accepted: v33.boolean(),
|
|
1031
|
+
internalRequestId: v33.optional(v33.string()),
|
|
1032
|
+
sparkStatusTrackingId: v33.optional(v33.string()),
|
|
1033
|
+
error: v33.optional(v33.string())
|
|
1034
|
+
});
|
|
1035
|
+
var sparkFlashnetClawbackFundsRequestMessageSchema = v33.object({
|
|
964
1036
|
...rpcRequestMessageSchema.entries,
|
|
965
|
-
...
|
|
966
|
-
method:
|
|
1037
|
+
...v33.object({
|
|
1038
|
+
method: v33.literal(sparkFlashnetClawbackFundsMethodName),
|
|
967
1039
|
params: sparkFlashnetClawbackFundsParamsSchema,
|
|
968
|
-
id:
|
|
1040
|
+
id: v33.string()
|
|
969
1041
|
}).entries
|
|
970
1042
|
});
|
|
971
1043
|
|
|
972
1044
|
// src/request/types/sparkMethods/flashnetMethods/executeRouteSwap.ts
|
|
973
|
-
import * as
|
|
1045
|
+
import * as v34 from "valibot";
|
|
974
1046
|
var sparkFlashnetExecuteRouteSwapMethodName = "spark_flashnet_executeRouteSwap";
|
|
975
|
-
var sparkFlashnetExecuteRouteSwapParamsSchema =
|
|
976
|
-
hops:
|
|
977
|
-
|
|
978
|
-
poolId:
|
|
979
|
-
assetInAddress:
|
|
980
|
-
assetOutAddress:
|
|
981
|
-
hopIntegratorFeeRateBps:
|
|
1047
|
+
var sparkFlashnetExecuteRouteSwapParamsSchema = v34.object({
|
|
1048
|
+
hops: v34.array(
|
|
1049
|
+
v34.object({
|
|
1050
|
+
poolId: v34.string(),
|
|
1051
|
+
assetInAddress: v34.string(),
|
|
1052
|
+
assetOutAddress: v34.string(),
|
|
1053
|
+
hopIntegratorFeeRateBps: v34.optional(v34.number())
|
|
982
1054
|
})
|
|
983
1055
|
),
|
|
984
|
-
initialAssetAddress:
|
|
985
|
-
inputAmount:
|
|
986
|
-
maxRouteSlippageBps:
|
|
987
|
-
minAmountOut:
|
|
988
|
-
integratorFeeRateBps:
|
|
989
|
-
integratorPublicKey:
|
|
990
|
-
});
|
|
991
|
-
var sparkFlashnetExecuteRouteSwapResultSchema =
|
|
992
|
-
requestId:
|
|
993
|
-
accepted:
|
|
994
|
-
outputAmount:
|
|
995
|
-
executionPrice:
|
|
996
|
-
finalOutboundTransferId:
|
|
997
|
-
error:
|
|
998
|
-
});
|
|
999
|
-
var sparkFlashnetExecuteRouteSwapRequestMessageSchema =
|
|
1056
|
+
initialAssetAddress: v34.string(),
|
|
1057
|
+
inputAmount: v34.string(),
|
|
1058
|
+
maxRouteSlippageBps: v34.string(),
|
|
1059
|
+
minAmountOut: v34.optional(v34.string()),
|
|
1060
|
+
integratorFeeRateBps: v34.optional(v34.number()),
|
|
1061
|
+
integratorPublicKey: v34.optional(v34.string())
|
|
1062
|
+
});
|
|
1063
|
+
var sparkFlashnetExecuteRouteSwapResultSchema = v34.object({
|
|
1064
|
+
requestId: v34.string(),
|
|
1065
|
+
accepted: v34.boolean(),
|
|
1066
|
+
outputAmount: v34.string(),
|
|
1067
|
+
executionPrice: v34.string(),
|
|
1068
|
+
finalOutboundTransferId: v34.string(),
|
|
1069
|
+
error: v34.optional(v34.string())
|
|
1070
|
+
});
|
|
1071
|
+
var sparkFlashnetExecuteRouteSwapRequestMessageSchema = v34.object({
|
|
1000
1072
|
...rpcRequestMessageSchema.entries,
|
|
1001
|
-
...
|
|
1002
|
-
method:
|
|
1073
|
+
...v34.object({
|
|
1074
|
+
method: v34.literal(sparkFlashnetExecuteRouteSwapMethodName),
|
|
1003
1075
|
params: sparkFlashnetExecuteRouteSwapParamsSchema,
|
|
1004
|
-
id:
|
|
1076
|
+
id: v34.string()
|
|
1005
1077
|
}).entries
|
|
1006
1078
|
});
|
|
1007
1079
|
|
|
1008
1080
|
// src/request/types/sparkMethods/flashnetMethods/executeSwap.ts
|
|
1009
|
-
import * as
|
|
1081
|
+
import * as v35 from "valibot";
|
|
1010
1082
|
var sparkFlashnetExecuteSwapMethodName = "spark_flashnet_executeSwap";
|
|
1011
|
-
var sparkFlashnetExecuteSwapParamsSchema =
|
|
1012
|
-
poolId:
|
|
1013
|
-
assetInAddress:
|
|
1014
|
-
assetOutAddress:
|
|
1015
|
-
amountIn:
|
|
1016
|
-
maxSlippageBps:
|
|
1017
|
-
minAmountOut:
|
|
1018
|
-
integratorFeeRateBps:
|
|
1019
|
-
integratorPublicKey:
|
|
1020
|
-
});
|
|
1021
|
-
var sparkFlashnetExecuteSwapResultSchema =
|
|
1022
|
-
requestId:
|
|
1023
|
-
accepted:
|
|
1024
|
-
amountOut:
|
|
1025
|
-
feeAmount:
|
|
1026
|
-
executionPrice:
|
|
1027
|
-
assetOutAddress:
|
|
1028
|
-
assetInAddress:
|
|
1029
|
-
outboundTransferId:
|
|
1030
|
-
error:
|
|
1031
|
-
});
|
|
1032
|
-
var sparkFlashnetExecuteSwapRequestMessageSchema =
|
|
1083
|
+
var sparkFlashnetExecuteSwapParamsSchema = v35.object({
|
|
1084
|
+
poolId: v35.string(),
|
|
1085
|
+
assetInAddress: v35.string(),
|
|
1086
|
+
assetOutAddress: v35.string(),
|
|
1087
|
+
amountIn: v35.string(),
|
|
1088
|
+
maxSlippageBps: v35.number(),
|
|
1089
|
+
minAmountOut: v35.optional(v35.string()),
|
|
1090
|
+
integratorFeeRateBps: v35.optional(v35.number()),
|
|
1091
|
+
integratorPublicKey: v35.optional(v35.string())
|
|
1092
|
+
});
|
|
1093
|
+
var sparkFlashnetExecuteSwapResultSchema = v35.object({
|
|
1094
|
+
requestId: v35.string(),
|
|
1095
|
+
accepted: v35.boolean(),
|
|
1096
|
+
amountOut: v35.optional(v35.string()),
|
|
1097
|
+
feeAmount: v35.optional(v35.string()),
|
|
1098
|
+
executionPrice: v35.optional(v35.string()),
|
|
1099
|
+
assetOutAddress: v35.optional(v35.string()),
|
|
1100
|
+
assetInAddress: v35.optional(v35.string()),
|
|
1101
|
+
outboundTransferId: v35.optional(v35.string()),
|
|
1102
|
+
error: v35.optional(v35.string())
|
|
1103
|
+
});
|
|
1104
|
+
var sparkFlashnetExecuteSwapRequestMessageSchema = v35.object({
|
|
1033
1105
|
...rpcRequestMessageSchema.entries,
|
|
1034
|
-
...
|
|
1035
|
-
method:
|
|
1106
|
+
...v35.object({
|
|
1107
|
+
method: v35.literal(sparkFlashnetExecuteSwapMethodName),
|
|
1036
1108
|
params: sparkFlashnetExecuteSwapParamsSchema,
|
|
1037
|
-
id:
|
|
1109
|
+
id: v35.string()
|
|
1038
1110
|
}).entries
|
|
1039
1111
|
});
|
|
1040
1112
|
|
|
1041
1113
|
// src/request/types/sparkMethods/flashnetMethods/getClawbackEligibleTransfers.ts
|
|
1042
|
-
import * as
|
|
1114
|
+
import * as v36 from "valibot";
|
|
1043
1115
|
var sparkGetClawbackEligibleTransfersMethodName = "spark_flashnet_getClawbackEligibleTransfers";
|
|
1044
|
-
var sparkGetClawbackEligibleTransfersParamsSchema =
|
|
1045
|
-
var sparkGetClawbackEligibleTransfersResultSchema =
|
|
1046
|
-
eligibleTransfers:
|
|
1047
|
-
|
|
1048
|
-
txId:
|
|
1049
|
-
createdAt:
|
|
1050
|
-
lpIdentityPublicKey:
|
|
1116
|
+
var sparkGetClawbackEligibleTransfersParamsSchema = v36.nullish(v36.null());
|
|
1117
|
+
var sparkGetClawbackEligibleTransfersResultSchema = v36.object({
|
|
1118
|
+
eligibleTransfers: v36.array(
|
|
1119
|
+
v36.object({
|
|
1120
|
+
txId: v36.string(),
|
|
1121
|
+
createdAt: v36.string(),
|
|
1122
|
+
lpIdentityPublicKey: v36.string()
|
|
1051
1123
|
})
|
|
1052
1124
|
)
|
|
1053
1125
|
});
|
|
1054
|
-
var sparkGetClawbackEligibleTransfersRequestMessageSchema =
|
|
1126
|
+
var sparkGetClawbackEligibleTransfersRequestMessageSchema = v36.object({
|
|
1055
1127
|
...rpcRequestMessageSchema.entries,
|
|
1056
|
-
...
|
|
1057
|
-
method:
|
|
1128
|
+
...v36.object({
|
|
1129
|
+
method: v36.literal(sparkGetClawbackEligibleTransfersMethodName),
|
|
1058
1130
|
params: sparkGetClawbackEligibleTransfersParamsSchema,
|
|
1059
|
-
id:
|
|
1131
|
+
id: v36.string()
|
|
1060
1132
|
}).entries
|
|
1061
1133
|
});
|
|
1062
1134
|
|
|
1063
1135
|
// src/request/types/sparkMethods/flashnetMethods/getJwt.ts
|
|
1064
|
-
import * as
|
|
1136
|
+
import * as v37 from "valibot";
|
|
1065
1137
|
var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
|
|
1066
|
-
var sparkFlashnetGetJwtParamsSchema =
|
|
1067
|
-
var sparkFlashnetGetJwtResultSchema =
|
|
1138
|
+
var sparkFlashnetGetJwtParamsSchema = v37.null();
|
|
1139
|
+
var sparkFlashnetGetJwtResultSchema = v37.object({
|
|
1068
1140
|
/**
|
|
1069
1141
|
* The JWT token for authenticated requests to the Flashnet API.
|
|
1070
1142
|
*/
|
|
1071
|
-
jwt:
|
|
1143
|
+
jwt: v37.string()
|
|
1072
1144
|
});
|
|
1073
|
-
var sparkFlashnetGetJwtRequestMessageSchema =
|
|
1145
|
+
var sparkFlashnetGetJwtRequestMessageSchema = v37.object({
|
|
1074
1146
|
...rpcRequestMessageSchema.entries,
|
|
1075
|
-
...
|
|
1076
|
-
method:
|
|
1147
|
+
...v37.object({
|
|
1148
|
+
method: v37.literal(sparkFlashnetGetJwtMethodName),
|
|
1077
1149
|
params: sparkFlashnetGetJwtParamsSchema,
|
|
1078
|
-
id:
|
|
1150
|
+
id: v37.string()
|
|
1079
1151
|
}).entries
|
|
1080
1152
|
});
|
|
1081
1153
|
|
|
1082
1154
|
// src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
|
|
1083
|
-
import * as
|
|
1084
|
-
var sparkFlashnetAddLiquidityIntentSchema =
|
|
1085
|
-
type:
|
|
1086
|
-
data:
|
|
1087
|
-
userPublicKey:
|
|
1088
|
-
poolId:
|
|
1089
|
-
assetAAmount:
|
|
1090
|
-
assetBAmount:
|
|
1091
|
-
assetAMinAmountIn:
|
|
1092
|
-
assetBMinAmountIn:
|
|
1093
|
-
assetATransferId:
|
|
1094
|
-
assetBTransferId:
|
|
1095
|
-
nonce:
|
|
1155
|
+
import * as v38 from "valibot";
|
|
1156
|
+
var sparkFlashnetAddLiquidityIntentSchema = v38.object({
|
|
1157
|
+
type: v38.literal("addLiquidity"),
|
|
1158
|
+
data: v38.object({
|
|
1159
|
+
userPublicKey: v38.string(),
|
|
1160
|
+
poolId: v38.string(),
|
|
1161
|
+
assetAAmount: v38.string(),
|
|
1162
|
+
assetBAmount: v38.string(),
|
|
1163
|
+
assetAMinAmountIn: v38.string(),
|
|
1164
|
+
assetBMinAmountIn: v38.string(),
|
|
1165
|
+
assetATransferId: v38.string(),
|
|
1166
|
+
assetBTransferId: v38.string(),
|
|
1167
|
+
nonce: v38.string()
|
|
1096
1168
|
})
|
|
1097
1169
|
});
|
|
1098
1170
|
|
|
1099
1171
|
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1100
|
-
import * as
|
|
1101
|
-
var sparkFlashnetClawbackIntentSchema =
|
|
1102
|
-
type:
|
|
1103
|
-
data:
|
|
1104
|
-
senderPublicKey:
|
|
1105
|
-
sparkTransferId:
|
|
1106
|
-
lpIdentityPublicKey:
|
|
1107
|
-
nonce:
|
|
1172
|
+
import * as v39 from "valibot";
|
|
1173
|
+
var sparkFlashnetClawbackIntentSchema = v39.object({
|
|
1174
|
+
type: v39.literal("clawback"),
|
|
1175
|
+
data: v39.object({
|
|
1176
|
+
senderPublicKey: v39.string(),
|
|
1177
|
+
sparkTransferId: v39.string(),
|
|
1178
|
+
lpIdentityPublicKey: v39.string(),
|
|
1179
|
+
nonce: v39.string()
|
|
1108
1180
|
})
|
|
1109
1181
|
});
|
|
1110
1182
|
|
|
1111
1183
|
// src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
|
|
1112
|
-
import * as
|
|
1113
|
-
var sparkFlashnetConfirmInitialDepositIntentSchema =
|
|
1114
|
-
type:
|
|
1115
|
-
data:
|
|
1116
|
-
poolId:
|
|
1117
|
-
assetASparkTransferId:
|
|
1118
|
-
poolOwnerPublicKey:
|
|
1119
|
-
nonce:
|
|
1184
|
+
import * as v40 from "valibot";
|
|
1185
|
+
var sparkFlashnetConfirmInitialDepositIntentSchema = v40.object({
|
|
1186
|
+
type: v40.literal("confirmInitialDeposit"),
|
|
1187
|
+
data: v40.object({
|
|
1188
|
+
poolId: v40.string(),
|
|
1189
|
+
assetASparkTransferId: v40.string(),
|
|
1190
|
+
poolOwnerPublicKey: v40.string(),
|
|
1191
|
+
nonce: v40.string()
|
|
1120
1192
|
})
|
|
1121
1193
|
});
|
|
1122
1194
|
|
|
1123
1195
|
// src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
|
|
1124
|
-
import * as
|
|
1125
|
-
var sparkFlashnetCreateConstantProductPoolIntentSchema =
|
|
1126
|
-
type:
|
|
1127
|
-
data:
|
|
1128
|
-
poolOwnerPublicKey:
|
|
1129
|
-
assetAAddress:
|
|
1130
|
-
assetBAddress:
|
|
1131
|
-
lpFeeRateBps:
|
|
1132
|
-
totalHostFeeRateBps:
|
|
1133
|
-
nonce:
|
|
1196
|
+
import * as v41 from "valibot";
|
|
1197
|
+
var sparkFlashnetCreateConstantProductPoolIntentSchema = v41.object({
|
|
1198
|
+
type: v41.literal("createConstantProductPool"),
|
|
1199
|
+
data: v41.object({
|
|
1200
|
+
poolOwnerPublicKey: v41.string(),
|
|
1201
|
+
assetAAddress: v41.string(),
|
|
1202
|
+
assetBAddress: v41.string(),
|
|
1203
|
+
lpFeeRateBps: v41.union([v41.number(), v41.string()]),
|
|
1204
|
+
totalHostFeeRateBps: v41.union([v41.number(), v41.string()]),
|
|
1205
|
+
nonce: v41.string()
|
|
1134
1206
|
})
|
|
1135
1207
|
});
|
|
1136
1208
|
|
|
1137
1209
|
// src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
|
|
1138
|
-
import * as
|
|
1139
|
-
var sparkFlashnetCreateSingleSidedPoolIntentSchema =
|
|
1140
|
-
type:
|
|
1141
|
-
data:
|
|
1142
|
-
assetAAddress:
|
|
1143
|
-
assetBAddress:
|
|
1144
|
-
assetAInitialReserve:
|
|
1145
|
-
virtualReserveA:
|
|
1146
|
-
virtualReserveB:
|
|
1147
|
-
threshold:
|
|
1148
|
-
lpFeeRateBps:
|
|
1149
|
-
totalHostFeeRateBps:
|
|
1150
|
-
poolOwnerPublicKey:
|
|
1151
|
-
nonce:
|
|
1210
|
+
import * as v42 from "valibot";
|
|
1211
|
+
var sparkFlashnetCreateSingleSidedPoolIntentSchema = v42.object({
|
|
1212
|
+
type: v42.literal("createSingleSidedPool"),
|
|
1213
|
+
data: v42.object({
|
|
1214
|
+
assetAAddress: v42.string(),
|
|
1215
|
+
assetBAddress: v42.string(),
|
|
1216
|
+
assetAInitialReserve: v42.string(),
|
|
1217
|
+
virtualReserveA: v42.union([v42.number(), v42.string()]),
|
|
1218
|
+
virtualReserveB: v42.union([v42.number(), v42.string()]),
|
|
1219
|
+
threshold: v42.union([v42.number(), v42.string()]),
|
|
1220
|
+
lpFeeRateBps: v42.union([v42.number(), v42.string()]),
|
|
1221
|
+
totalHostFeeRateBps: v42.union([v42.number(), v42.string()]),
|
|
1222
|
+
poolOwnerPublicKey: v42.string(),
|
|
1223
|
+
nonce: v42.string()
|
|
1152
1224
|
})
|
|
1153
1225
|
});
|
|
1154
1226
|
|
|
1155
1227
|
// src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
|
|
1156
|
-
import * as
|
|
1157
|
-
var sparkFlashnetRemoveLiquidityIntentSchema =
|
|
1158
|
-
type:
|
|
1159
|
-
data:
|
|
1160
|
-
userPublicKey:
|
|
1161
|
-
poolId:
|
|
1162
|
-
lpTokensToRemove:
|
|
1163
|
-
nonce:
|
|
1228
|
+
import * as v43 from "valibot";
|
|
1229
|
+
var sparkFlashnetRemoveLiquidityIntentSchema = v43.object({
|
|
1230
|
+
type: v43.literal("removeLiquidity"),
|
|
1231
|
+
data: v43.object({
|
|
1232
|
+
userPublicKey: v43.string(),
|
|
1233
|
+
poolId: v43.string(),
|
|
1234
|
+
lpTokensToRemove: v43.string(),
|
|
1235
|
+
nonce: v43.string()
|
|
1164
1236
|
})
|
|
1165
1237
|
});
|
|
1166
1238
|
|
|
1167
1239
|
// src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
|
|
1168
|
-
import * as
|
|
1169
|
-
var sparkFlashnetRouteSwapIntentSchema =
|
|
1170
|
-
type:
|
|
1171
|
-
data:
|
|
1172
|
-
userPublicKey:
|
|
1173
|
-
initialSparkTransferId:
|
|
1174
|
-
hops:
|
|
1175
|
-
|
|
1176
|
-
poolId:
|
|
1177
|
-
inputAssetAddress:
|
|
1178
|
-
outputAssetAddress:
|
|
1179
|
-
hopIntegratorFeeRateBps:
|
|
1240
|
+
import * as v44 from "valibot";
|
|
1241
|
+
var sparkFlashnetRouteSwapIntentSchema = v44.object({
|
|
1242
|
+
type: v44.literal("executeRouteSwap"),
|
|
1243
|
+
data: v44.object({
|
|
1244
|
+
userPublicKey: v44.string(),
|
|
1245
|
+
initialSparkTransferId: v44.string(),
|
|
1246
|
+
hops: v44.array(
|
|
1247
|
+
v44.object({
|
|
1248
|
+
poolId: v44.string(),
|
|
1249
|
+
inputAssetAddress: v44.string(),
|
|
1250
|
+
outputAssetAddress: v44.string(),
|
|
1251
|
+
hopIntegratorFeeRateBps: v44.optional(v44.union([v44.number(), v44.string()]))
|
|
1180
1252
|
})
|
|
1181
1253
|
),
|
|
1182
|
-
inputAmount:
|
|
1183
|
-
maxRouteSlippageBps:
|
|
1184
|
-
minAmountOut:
|
|
1185
|
-
defaultIntegratorFeeRateBps:
|
|
1186
|
-
nonce:
|
|
1254
|
+
inputAmount: v44.string(),
|
|
1255
|
+
maxRouteSlippageBps: v44.union([v44.number(), v44.string()]),
|
|
1256
|
+
minAmountOut: v44.string(),
|
|
1257
|
+
defaultIntegratorFeeRateBps: v44.optional(v44.union([v44.number(), v44.string()])),
|
|
1258
|
+
nonce: v44.string()
|
|
1187
1259
|
})
|
|
1188
1260
|
});
|
|
1189
1261
|
|
|
1190
1262
|
// src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
|
|
1191
|
-
import * as
|
|
1192
|
-
var sparkFlashnetSwapIntentSchema =
|
|
1193
|
-
type:
|
|
1194
|
-
data:
|
|
1195
|
-
userPublicKey:
|
|
1196
|
-
poolId:
|
|
1197
|
-
transferId:
|
|
1198
|
-
assetInAddress:
|
|
1199
|
-
assetOutAddress:
|
|
1200
|
-
amountIn:
|
|
1201
|
-
maxSlippageBps:
|
|
1202
|
-
minAmountOut:
|
|
1203
|
-
totalIntegratorFeeRateBps:
|
|
1204
|
-
nonce:
|
|
1263
|
+
import * as v45 from "valibot";
|
|
1264
|
+
var sparkFlashnetSwapIntentSchema = v45.object({
|
|
1265
|
+
type: v45.literal("executeSwap"),
|
|
1266
|
+
data: v45.object({
|
|
1267
|
+
userPublicKey: v45.string(),
|
|
1268
|
+
poolId: v45.string(),
|
|
1269
|
+
transferId: v45.string(),
|
|
1270
|
+
assetInAddress: v45.string(),
|
|
1271
|
+
assetOutAddress: v45.string(),
|
|
1272
|
+
amountIn: v45.string(),
|
|
1273
|
+
maxSlippageBps: v45.union([v45.number(), v45.string()]),
|
|
1274
|
+
minAmountOut: v45.string(),
|
|
1275
|
+
totalIntegratorFeeRateBps: v45.optional(v45.union([v45.number(), v45.string()])),
|
|
1276
|
+
nonce: v45.string()
|
|
1205
1277
|
})
|
|
1206
1278
|
});
|
|
1207
1279
|
|
|
1208
1280
|
// src/request/types/sparkMethods/flashnetMethods/signIntent.ts
|
|
1209
|
-
import * as
|
|
1281
|
+
import * as v46 from "valibot";
|
|
1210
1282
|
var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
|
|
1211
|
-
var sparkFlashnetSignIntentParamsSchema =
|
|
1283
|
+
var sparkFlashnetSignIntentParamsSchema = v46.union([
|
|
1212
1284
|
sparkFlashnetSwapIntentSchema,
|
|
1213
1285
|
sparkFlashnetRouteSwapIntentSchema,
|
|
1214
1286
|
sparkFlashnetAddLiquidityIntentSchema,
|
|
@@ -1218,109 +1290,109 @@ var sparkFlashnetSignIntentParamsSchema = v39.union([
|
|
|
1218
1290
|
sparkFlashnetCreateSingleSidedPoolIntentSchema,
|
|
1219
1291
|
sparkFlashnetRemoveLiquidityIntentSchema
|
|
1220
1292
|
]);
|
|
1221
|
-
var sparkFlashnetSignIntentResultSchema =
|
|
1293
|
+
var sparkFlashnetSignIntentResultSchema = v46.object({
|
|
1222
1294
|
/**
|
|
1223
1295
|
* The signed intent as a hex string.
|
|
1224
1296
|
*/
|
|
1225
|
-
signature:
|
|
1297
|
+
signature: v46.string()
|
|
1226
1298
|
});
|
|
1227
|
-
var sparkFlashnetSignIntentRequestMessageSchema =
|
|
1299
|
+
var sparkFlashnetSignIntentRequestMessageSchema = v46.object({
|
|
1228
1300
|
...rpcRequestMessageSchema.entries,
|
|
1229
|
-
...
|
|
1230
|
-
method:
|
|
1301
|
+
...v46.object({
|
|
1302
|
+
method: v46.literal(sparkFlashnetSignIntentMethodName),
|
|
1231
1303
|
params: sparkFlashnetSignIntentParamsSchema,
|
|
1232
|
-
id:
|
|
1304
|
+
id: v46.string()
|
|
1233
1305
|
}).entries
|
|
1234
1306
|
});
|
|
1235
1307
|
|
|
1236
1308
|
// src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
|
|
1237
|
-
import * as
|
|
1309
|
+
import * as v47 from "valibot";
|
|
1238
1310
|
var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
|
|
1239
|
-
var sparkFlashnetSignStructuredMessageParamsSchema =
|
|
1240
|
-
message:
|
|
1311
|
+
var sparkFlashnetSignStructuredMessageParamsSchema = v47.object({
|
|
1312
|
+
message: v47.string()
|
|
1241
1313
|
});
|
|
1242
|
-
var sparkFlashnetSignStructuredMessageResultSchema =
|
|
1243
|
-
message:
|
|
1244
|
-
signature:
|
|
1314
|
+
var sparkFlashnetSignStructuredMessageResultSchema = v47.object({
|
|
1315
|
+
message: v47.string(),
|
|
1316
|
+
signature: v47.string()
|
|
1245
1317
|
});
|
|
1246
|
-
var sparkFlashnetSignStructuredMessageRequestMessageSchema =
|
|
1318
|
+
var sparkFlashnetSignStructuredMessageRequestMessageSchema = v47.object({
|
|
1247
1319
|
...rpcRequestMessageSchema.entries,
|
|
1248
|
-
...
|
|
1249
|
-
method:
|
|
1320
|
+
...v47.object({
|
|
1321
|
+
method: v47.literal(sparkFlashnetSignStructuredMessageMethodName),
|
|
1250
1322
|
params: sparkFlashnetSignStructuredMessageParamsSchema,
|
|
1251
|
-
id:
|
|
1323
|
+
id: v47.string()
|
|
1252
1324
|
}).entries
|
|
1253
1325
|
});
|
|
1254
1326
|
|
|
1255
1327
|
// src/request/types/sparkMethods/getAddresses.ts
|
|
1256
|
-
import * as
|
|
1328
|
+
import * as v48 from "valibot";
|
|
1257
1329
|
var sparkGetAddressesMethodName = "spark_getAddresses";
|
|
1258
|
-
var sparkGetAddressesParamsSchema =
|
|
1259
|
-
|
|
1330
|
+
var sparkGetAddressesParamsSchema = v48.nullish(
|
|
1331
|
+
v48.object({
|
|
1260
1332
|
/**
|
|
1261
1333
|
* A message to be displayed to the user in the request prompt.
|
|
1262
1334
|
*/
|
|
1263
|
-
message:
|
|
1335
|
+
message: v48.optional(v48.string())
|
|
1264
1336
|
})
|
|
1265
1337
|
);
|
|
1266
|
-
var sparkGetAddressesResultSchema =
|
|
1338
|
+
var sparkGetAddressesResultSchema = v48.object({
|
|
1267
1339
|
/**
|
|
1268
1340
|
* The addresses generated for the given purposes.
|
|
1269
1341
|
*/
|
|
1270
|
-
addresses:
|
|
1342
|
+
addresses: v48.array(addressSchema),
|
|
1271
1343
|
network: getNetworkResultSchema
|
|
1272
1344
|
});
|
|
1273
|
-
var sparkGetAddressesRequestMessageSchema =
|
|
1345
|
+
var sparkGetAddressesRequestMessageSchema = v48.object({
|
|
1274
1346
|
...rpcRequestMessageSchema.entries,
|
|
1275
|
-
...
|
|
1276
|
-
method:
|
|
1347
|
+
...v48.object({
|
|
1348
|
+
method: v48.literal(sparkGetAddressesMethodName),
|
|
1277
1349
|
params: sparkGetAddressesParamsSchema,
|
|
1278
|
-
id:
|
|
1350
|
+
id: v48.string()
|
|
1279
1351
|
}).entries
|
|
1280
1352
|
});
|
|
1281
1353
|
|
|
1282
1354
|
// src/request/types/sparkMethods/getBalance.ts
|
|
1283
|
-
import * as
|
|
1355
|
+
import * as v49 from "valibot";
|
|
1284
1356
|
var sparkGetBalanceMethodName = "spark_getBalance";
|
|
1285
|
-
var sparkGetBalanceParamsSchema =
|
|
1286
|
-
var sparkGetBalanceResultSchema =
|
|
1357
|
+
var sparkGetBalanceParamsSchema = v49.nullish(v49.null());
|
|
1358
|
+
var sparkGetBalanceResultSchema = v49.object({
|
|
1287
1359
|
/**
|
|
1288
1360
|
* The Spark Bitcoin address balance in sats in string form.
|
|
1289
1361
|
*/
|
|
1290
|
-
balance:
|
|
1291
|
-
tokenBalances:
|
|
1292
|
-
|
|
1362
|
+
balance: v49.string(),
|
|
1363
|
+
tokenBalances: v49.array(
|
|
1364
|
+
v49.object({
|
|
1293
1365
|
/* The address balance of the token in string form as it can overflow a js number */
|
|
1294
|
-
balance:
|
|
1295
|
-
tokenMetadata:
|
|
1296
|
-
tokenIdentifier:
|
|
1297
|
-
tokenName:
|
|
1298
|
-
tokenTicker:
|
|
1299
|
-
decimals:
|
|
1300
|
-
maxSupply:
|
|
1366
|
+
balance: v49.string(),
|
|
1367
|
+
tokenMetadata: v49.object({
|
|
1368
|
+
tokenIdentifier: v49.string(),
|
|
1369
|
+
tokenName: v49.string(),
|
|
1370
|
+
tokenTicker: v49.string(),
|
|
1371
|
+
decimals: v49.number(),
|
|
1372
|
+
maxSupply: v49.string()
|
|
1301
1373
|
})
|
|
1302
1374
|
})
|
|
1303
1375
|
)
|
|
1304
1376
|
});
|
|
1305
|
-
var sparkGetBalanceRequestMessageSchema =
|
|
1377
|
+
var sparkGetBalanceRequestMessageSchema = v49.object({
|
|
1306
1378
|
...rpcRequestMessageSchema.entries,
|
|
1307
|
-
...
|
|
1308
|
-
method:
|
|
1379
|
+
...v49.object({
|
|
1380
|
+
method: v49.literal(sparkGetBalanceMethodName),
|
|
1309
1381
|
params: sparkGetBalanceParamsSchema,
|
|
1310
|
-
id:
|
|
1382
|
+
id: v49.string()
|
|
1311
1383
|
}).entries
|
|
1312
1384
|
});
|
|
1313
1385
|
|
|
1314
1386
|
// src/request/types/sparkMethods/signMessage.ts
|
|
1315
|
-
import * as
|
|
1387
|
+
import * as v50 from "valibot";
|
|
1316
1388
|
var sparkSignMessageMethodName = "spark_signMessage";
|
|
1317
|
-
var sparkSignMessageParamsSchema =
|
|
1389
|
+
var sparkSignMessageParamsSchema = v50.object({
|
|
1318
1390
|
/**
|
|
1319
1391
|
* The message to sign. The message should only consist of valid UTF-8 characters.
|
|
1320
1392
|
*/
|
|
1321
|
-
message:
|
|
1393
|
+
message: v50.string()
|
|
1322
1394
|
});
|
|
1323
|
-
var sparkSignMessageResultSchema =
|
|
1395
|
+
var sparkSignMessageResultSchema = v50.object({
|
|
1324
1396
|
/**
|
|
1325
1397
|
* The signature, encoded in base64, of the message hash.
|
|
1326
1398
|
*
|
|
@@ -1328,98 +1400,98 @@ var sparkSignMessageResultSchema = v43.object({
|
|
|
1328
1400
|
* and the resulting byte array is hashed with SHA256 before signing
|
|
1329
1401
|
* with the private key.
|
|
1330
1402
|
*/
|
|
1331
|
-
signature:
|
|
1403
|
+
signature: v50.string()
|
|
1332
1404
|
});
|
|
1333
|
-
var sparkSignMessageRequestMessageSchema =
|
|
1405
|
+
var sparkSignMessageRequestMessageSchema = v50.object({
|
|
1334
1406
|
...rpcRequestMessageSchema.entries,
|
|
1335
|
-
...
|
|
1336
|
-
method:
|
|
1407
|
+
...v50.object({
|
|
1408
|
+
method: v50.literal(sparkSignMessageMethodName),
|
|
1337
1409
|
params: sparkSignMessageParamsSchema,
|
|
1338
|
-
id:
|
|
1410
|
+
id: v50.string()
|
|
1339
1411
|
}).entries
|
|
1340
1412
|
});
|
|
1341
1413
|
|
|
1342
1414
|
// src/request/types/sparkMethods/transfer.ts
|
|
1343
|
-
import * as
|
|
1415
|
+
import * as v51 from "valibot";
|
|
1344
1416
|
var sparkTransferMethodName = "spark_transfer";
|
|
1345
|
-
var sparkTransferParamsSchema =
|
|
1417
|
+
var sparkTransferParamsSchema = v51.object({
|
|
1346
1418
|
/**
|
|
1347
1419
|
* Amount of SATS to transfer as a string or number.
|
|
1348
1420
|
*/
|
|
1349
|
-
amountSats:
|
|
1421
|
+
amountSats: v51.union([v51.number(), v51.string()]),
|
|
1350
1422
|
/**
|
|
1351
1423
|
* The recipient's spark address.
|
|
1352
1424
|
*/
|
|
1353
|
-
receiverSparkAddress:
|
|
1425
|
+
receiverSparkAddress: v51.string()
|
|
1354
1426
|
});
|
|
1355
|
-
var sparkTransferResultSchema =
|
|
1427
|
+
var sparkTransferResultSchema = v51.object({
|
|
1356
1428
|
/**
|
|
1357
1429
|
* The ID of the transaction.
|
|
1358
1430
|
*/
|
|
1359
|
-
id:
|
|
1431
|
+
id: v51.string()
|
|
1360
1432
|
});
|
|
1361
|
-
var sparkTransferRequestMessageSchema =
|
|
1433
|
+
var sparkTransferRequestMessageSchema = v51.object({
|
|
1362
1434
|
...rpcRequestMessageSchema.entries,
|
|
1363
|
-
...
|
|
1364
|
-
method:
|
|
1435
|
+
...v51.object({
|
|
1436
|
+
method: v51.literal(sparkTransferMethodName),
|
|
1365
1437
|
params: sparkTransferParamsSchema,
|
|
1366
|
-
id:
|
|
1438
|
+
id: v51.string()
|
|
1367
1439
|
}).entries
|
|
1368
1440
|
});
|
|
1369
1441
|
|
|
1370
1442
|
// src/request/types/sparkMethods/transferToken.ts
|
|
1371
|
-
import * as
|
|
1443
|
+
import * as v52 from "valibot";
|
|
1372
1444
|
var sparkTransferTokenMethodName = "spark_transferToken";
|
|
1373
|
-
var sparkTransferTokenParamsSchema =
|
|
1445
|
+
var sparkTransferTokenParamsSchema = v52.object({
|
|
1374
1446
|
/**
|
|
1375
1447
|
* Amount of units of the token to transfer as a string or number.
|
|
1376
1448
|
*/
|
|
1377
|
-
tokenAmount:
|
|
1449
|
+
tokenAmount: v52.union([v52.number(), v52.string()]),
|
|
1378
1450
|
/**
|
|
1379
1451
|
* The Bech32m token identifier.
|
|
1380
1452
|
*/
|
|
1381
|
-
tokenIdentifier:
|
|
1453
|
+
tokenIdentifier: v52.string(),
|
|
1382
1454
|
/**
|
|
1383
1455
|
* The recipient's spark address.
|
|
1384
1456
|
*/
|
|
1385
|
-
receiverSparkAddress:
|
|
1457
|
+
receiverSparkAddress: v52.string()
|
|
1386
1458
|
});
|
|
1387
|
-
var sparkTransferTokenResultSchema =
|
|
1459
|
+
var sparkTransferTokenResultSchema = v52.object({
|
|
1388
1460
|
/**
|
|
1389
1461
|
* The ID of the transaction.
|
|
1390
1462
|
*/
|
|
1391
|
-
id:
|
|
1463
|
+
id: v52.string()
|
|
1392
1464
|
});
|
|
1393
|
-
var sparkTransferTokenRequestMessageSchema =
|
|
1465
|
+
var sparkTransferTokenRequestMessageSchema = v52.object({
|
|
1394
1466
|
...rpcRequestMessageSchema.entries,
|
|
1395
|
-
...
|
|
1396
|
-
method:
|
|
1467
|
+
...v52.object({
|
|
1468
|
+
method: v52.literal(sparkTransferTokenMethodName),
|
|
1397
1469
|
params: sparkTransferTokenParamsSchema,
|
|
1398
|
-
id:
|
|
1470
|
+
id: v52.string()
|
|
1399
1471
|
}).entries
|
|
1400
1472
|
});
|
|
1401
1473
|
|
|
1402
1474
|
// src/request/types/stxMethods/callContract.ts
|
|
1403
|
-
import * as
|
|
1475
|
+
import * as v53 from "valibot";
|
|
1404
1476
|
var stxCallContractMethodName = "stx_callContract";
|
|
1405
|
-
var stxCallContractParamsSchema =
|
|
1477
|
+
var stxCallContractParamsSchema = v53.object({
|
|
1406
1478
|
/**
|
|
1407
1479
|
* The contract principal.
|
|
1408
1480
|
*
|
|
1409
1481
|
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1410
1482
|
*/
|
|
1411
|
-
contract:
|
|
1483
|
+
contract: v53.string(),
|
|
1412
1484
|
/**
|
|
1413
1485
|
* The name of the function to call.
|
|
1414
1486
|
*
|
|
1415
1487
|
* Note: spec changes ongoing,
|
|
1416
1488
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1417
1489
|
*/
|
|
1418
|
-
functionName:
|
|
1490
|
+
functionName: v53.string(),
|
|
1419
1491
|
/**
|
|
1420
1492
|
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1421
1493
|
*/
|
|
1422
|
-
arguments:
|
|
1494
|
+
arguments: v53.optional(v53.array(v53.string())),
|
|
1423
1495
|
/**
|
|
1424
1496
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1425
1497
|
* strings of Clarity values.
|
|
@@ -1434,274 +1506,274 @@ var stxCallContractParamsSchema = v46.object({
|
|
|
1434
1506
|
* const hexArgs = functionArgs.map(cvToHex);
|
|
1435
1507
|
* ```
|
|
1436
1508
|
*/
|
|
1437
|
-
functionArgs:
|
|
1509
|
+
functionArgs: v53.optional(v53.array(v53.string())),
|
|
1438
1510
|
/**
|
|
1439
1511
|
* The post conditions to apply to the contract call.
|
|
1440
1512
|
*/
|
|
1441
|
-
postConditions:
|
|
1513
|
+
postConditions: v53.optional(v53.array(v53.string())),
|
|
1442
1514
|
/**
|
|
1443
1515
|
* The mode to apply to the post conditions.
|
|
1444
1516
|
*/
|
|
1445
|
-
postConditionMode:
|
|
1517
|
+
postConditionMode: v53.optional(v53.union([v53.literal("allow"), v53.literal("deny")]))
|
|
1446
1518
|
});
|
|
1447
|
-
var stxCallContractResultSchema =
|
|
1519
|
+
var stxCallContractResultSchema = v53.object({
|
|
1448
1520
|
/**
|
|
1449
1521
|
* The ID of the transaction.
|
|
1450
1522
|
*/
|
|
1451
|
-
txid:
|
|
1523
|
+
txid: v53.string(),
|
|
1452
1524
|
/**
|
|
1453
1525
|
* A Stacks transaction as a hex-encoded string.
|
|
1454
1526
|
*/
|
|
1455
|
-
transaction:
|
|
1527
|
+
transaction: v53.string()
|
|
1456
1528
|
});
|
|
1457
|
-
var stxCallContractRequestMessageSchema =
|
|
1529
|
+
var stxCallContractRequestMessageSchema = v53.object({
|
|
1458
1530
|
...rpcRequestMessageSchema.entries,
|
|
1459
|
-
...
|
|
1460
|
-
method:
|
|
1531
|
+
...v53.object({
|
|
1532
|
+
method: v53.literal(stxCallContractMethodName),
|
|
1461
1533
|
params: stxCallContractParamsSchema,
|
|
1462
|
-
id:
|
|
1534
|
+
id: v53.string()
|
|
1463
1535
|
}).entries
|
|
1464
1536
|
});
|
|
1465
1537
|
|
|
1466
1538
|
// src/request/types/stxMethods/deployContract.ts
|
|
1467
|
-
import * as
|
|
1539
|
+
import * as v54 from "valibot";
|
|
1468
1540
|
var stxDeployContractMethodName = "stx_deployContract";
|
|
1469
|
-
var stxDeployContractParamsSchema =
|
|
1541
|
+
var stxDeployContractParamsSchema = v54.object({
|
|
1470
1542
|
/**
|
|
1471
1543
|
* Name of the contract.
|
|
1472
1544
|
*/
|
|
1473
|
-
name:
|
|
1545
|
+
name: v54.string(),
|
|
1474
1546
|
/**
|
|
1475
1547
|
* The source code of the Clarity contract.
|
|
1476
1548
|
*/
|
|
1477
|
-
clarityCode:
|
|
1549
|
+
clarityCode: v54.string(),
|
|
1478
1550
|
/**
|
|
1479
1551
|
* The version of the Clarity contract.
|
|
1480
1552
|
*/
|
|
1481
|
-
clarityVersion:
|
|
1553
|
+
clarityVersion: v54.optional(v54.number()),
|
|
1482
1554
|
/**
|
|
1483
1555
|
* The post conditions to apply to the contract call.
|
|
1484
1556
|
*/
|
|
1485
|
-
postConditions:
|
|
1557
|
+
postConditions: v54.optional(v54.array(v54.string())),
|
|
1486
1558
|
/**
|
|
1487
1559
|
* The mode to apply to the post conditions.
|
|
1488
1560
|
*/
|
|
1489
|
-
postConditionMode:
|
|
1561
|
+
postConditionMode: v54.optional(v54.union([v54.literal("allow"), v54.literal("deny")]))
|
|
1490
1562
|
});
|
|
1491
|
-
var stxDeployContractResultSchema =
|
|
1563
|
+
var stxDeployContractResultSchema = v54.object({
|
|
1492
1564
|
/**
|
|
1493
1565
|
* The ID of the transaction.
|
|
1494
1566
|
*/
|
|
1495
|
-
txid:
|
|
1567
|
+
txid: v54.string(),
|
|
1496
1568
|
/**
|
|
1497
1569
|
* A Stacks transaction as a hex-encoded string.
|
|
1498
1570
|
*/
|
|
1499
|
-
transaction:
|
|
1571
|
+
transaction: v54.string()
|
|
1500
1572
|
});
|
|
1501
|
-
var stxDeployContractRequestMessageSchema =
|
|
1573
|
+
var stxDeployContractRequestMessageSchema = v54.object({
|
|
1502
1574
|
...rpcRequestMessageSchema.entries,
|
|
1503
|
-
...
|
|
1504
|
-
method:
|
|
1575
|
+
...v54.object({
|
|
1576
|
+
method: v54.literal(stxDeployContractMethodName),
|
|
1505
1577
|
params: stxDeployContractParamsSchema,
|
|
1506
|
-
id:
|
|
1578
|
+
id: v54.string()
|
|
1507
1579
|
}).entries
|
|
1508
1580
|
});
|
|
1509
1581
|
|
|
1510
1582
|
// src/request/types/stxMethods/getAccounts.ts
|
|
1511
|
-
import * as
|
|
1583
|
+
import * as v55 from "valibot";
|
|
1512
1584
|
var stxGetAccountsMethodName = "stx_getAccounts";
|
|
1513
|
-
var stxGetAccountsParamsSchema =
|
|
1514
|
-
var stxGetAccountsResultSchema =
|
|
1585
|
+
var stxGetAccountsParamsSchema = v55.nullish(v55.null());
|
|
1586
|
+
var stxGetAccountsResultSchema = v55.object({
|
|
1515
1587
|
/**
|
|
1516
1588
|
* The addresses generated for the given purposes.
|
|
1517
1589
|
*/
|
|
1518
|
-
addresses:
|
|
1519
|
-
|
|
1520
|
-
address:
|
|
1521
|
-
publicKey:
|
|
1522
|
-
gaiaHubUrl:
|
|
1523
|
-
gaiaAppKey:
|
|
1590
|
+
addresses: v55.array(
|
|
1591
|
+
v55.object({
|
|
1592
|
+
address: v55.string(),
|
|
1593
|
+
publicKey: v55.string(),
|
|
1594
|
+
gaiaHubUrl: v55.string(),
|
|
1595
|
+
gaiaAppKey: v55.string()
|
|
1524
1596
|
})
|
|
1525
1597
|
),
|
|
1526
1598
|
network: getNetworkResultSchema
|
|
1527
1599
|
});
|
|
1528
|
-
var stxGetAccountsRequestMessageSchema =
|
|
1600
|
+
var stxGetAccountsRequestMessageSchema = v55.object({
|
|
1529
1601
|
...rpcRequestMessageSchema.entries,
|
|
1530
|
-
...
|
|
1531
|
-
method:
|
|
1602
|
+
...v55.object({
|
|
1603
|
+
method: v55.literal(stxGetAccountsMethodName),
|
|
1532
1604
|
params: stxGetAccountsParamsSchema,
|
|
1533
|
-
id:
|
|
1605
|
+
id: v55.string()
|
|
1534
1606
|
}).entries
|
|
1535
1607
|
});
|
|
1536
1608
|
|
|
1537
1609
|
// src/request/types/stxMethods/getAddresses.ts
|
|
1538
|
-
import * as
|
|
1610
|
+
import * as v56 from "valibot";
|
|
1539
1611
|
var stxGetAddressesMethodName = "stx_getAddresses";
|
|
1540
|
-
var stxGetAddressesParamsSchema =
|
|
1541
|
-
|
|
1612
|
+
var stxGetAddressesParamsSchema = v56.nullish(
|
|
1613
|
+
v56.object({
|
|
1542
1614
|
/**
|
|
1543
1615
|
* A message to be displayed to the user in the request prompt.
|
|
1544
1616
|
*/
|
|
1545
|
-
message:
|
|
1617
|
+
message: v56.optional(v56.string())
|
|
1546
1618
|
})
|
|
1547
1619
|
);
|
|
1548
|
-
var stxGetAddressesResultSchema =
|
|
1620
|
+
var stxGetAddressesResultSchema = v56.object({
|
|
1549
1621
|
/**
|
|
1550
1622
|
* The addresses generated for the given purposes.
|
|
1551
1623
|
*/
|
|
1552
|
-
addresses:
|
|
1624
|
+
addresses: v56.array(addressSchema),
|
|
1553
1625
|
network: getNetworkResultSchema
|
|
1554
1626
|
});
|
|
1555
|
-
var stxGetAddressesRequestMessageSchema =
|
|
1627
|
+
var stxGetAddressesRequestMessageSchema = v56.object({
|
|
1556
1628
|
...rpcRequestMessageSchema.entries,
|
|
1557
|
-
...
|
|
1558
|
-
method:
|
|
1629
|
+
...v56.object({
|
|
1630
|
+
method: v56.literal(stxGetAddressesMethodName),
|
|
1559
1631
|
params: stxGetAddressesParamsSchema,
|
|
1560
|
-
id:
|
|
1632
|
+
id: v56.string()
|
|
1561
1633
|
}).entries
|
|
1562
1634
|
});
|
|
1563
1635
|
|
|
1564
1636
|
// src/request/types/stxMethods/signMessage.ts
|
|
1565
|
-
import * as
|
|
1637
|
+
import * as v57 from "valibot";
|
|
1566
1638
|
var stxSignMessageMethodName = "stx_signMessage";
|
|
1567
|
-
var stxSignMessageParamsSchema =
|
|
1639
|
+
var stxSignMessageParamsSchema = v57.object({
|
|
1568
1640
|
/**
|
|
1569
1641
|
* The message to sign.
|
|
1570
1642
|
*/
|
|
1571
|
-
message:
|
|
1643
|
+
message: v57.string()
|
|
1572
1644
|
});
|
|
1573
|
-
var stxSignMessageResultSchema =
|
|
1645
|
+
var stxSignMessageResultSchema = v57.object({
|
|
1574
1646
|
/**
|
|
1575
1647
|
* The signature of the message.
|
|
1576
1648
|
*/
|
|
1577
|
-
signature:
|
|
1649
|
+
signature: v57.string(),
|
|
1578
1650
|
/**
|
|
1579
1651
|
* The public key used to sign the message.
|
|
1580
1652
|
*/
|
|
1581
|
-
publicKey:
|
|
1653
|
+
publicKey: v57.string()
|
|
1582
1654
|
});
|
|
1583
|
-
var stxSignMessageRequestMessageSchema =
|
|
1655
|
+
var stxSignMessageRequestMessageSchema = v57.object({
|
|
1584
1656
|
...rpcRequestMessageSchema.entries,
|
|
1585
|
-
...
|
|
1586
|
-
method:
|
|
1657
|
+
...v57.object({
|
|
1658
|
+
method: v57.literal(stxSignMessageMethodName),
|
|
1587
1659
|
params: stxSignMessageParamsSchema,
|
|
1588
|
-
id:
|
|
1660
|
+
id: v57.string()
|
|
1589
1661
|
}).entries
|
|
1590
1662
|
});
|
|
1591
1663
|
|
|
1592
1664
|
// src/request/types/stxMethods/signStructuredMessage.ts
|
|
1593
|
-
import * as
|
|
1665
|
+
import * as v58 from "valibot";
|
|
1594
1666
|
var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
|
|
1595
|
-
var stxSignStructuredMessageParamsSchema =
|
|
1667
|
+
var stxSignStructuredMessageParamsSchema = v58.object({
|
|
1596
1668
|
/**
|
|
1597
1669
|
* The domain to be signed.
|
|
1598
1670
|
*/
|
|
1599
|
-
domain:
|
|
1671
|
+
domain: v58.string(),
|
|
1600
1672
|
/**
|
|
1601
1673
|
* Message payload to be signed.
|
|
1602
1674
|
*/
|
|
1603
|
-
message:
|
|
1675
|
+
message: v58.string(),
|
|
1604
1676
|
/**
|
|
1605
1677
|
* The public key to sign the message with.
|
|
1606
1678
|
*/
|
|
1607
|
-
publicKey:
|
|
1679
|
+
publicKey: v58.optional(v58.string())
|
|
1608
1680
|
});
|
|
1609
|
-
var stxSignStructuredMessageResultSchema =
|
|
1681
|
+
var stxSignStructuredMessageResultSchema = v58.object({
|
|
1610
1682
|
/**
|
|
1611
1683
|
* Signature of the message.
|
|
1612
1684
|
*/
|
|
1613
|
-
signature:
|
|
1685
|
+
signature: v58.string(),
|
|
1614
1686
|
/**
|
|
1615
1687
|
* Public key as hex-encoded string.
|
|
1616
1688
|
*/
|
|
1617
|
-
publicKey:
|
|
1689
|
+
publicKey: v58.string()
|
|
1618
1690
|
});
|
|
1619
|
-
var stxSignStructuredMessageRequestMessageSchema =
|
|
1691
|
+
var stxSignStructuredMessageRequestMessageSchema = v58.object({
|
|
1620
1692
|
...rpcRequestMessageSchema.entries,
|
|
1621
|
-
...
|
|
1622
|
-
method:
|
|
1693
|
+
...v58.object({
|
|
1694
|
+
method: v58.literal(stxSignStructuredMessageMethodName),
|
|
1623
1695
|
params: stxSignStructuredMessageParamsSchema,
|
|
1624
|
-
id:
|
|
1696
|
+
id: v58.string()
|
|
1625
1697
|
}).entries
|
|
1626
1698
|
});
|
|
1627
1699
|
|
|
1628
1700
|
// src/request/types/stxMethods/signTransaction.ts
|
|
1629
|
-
import * as
|
|
1701
|
+
import * as v59 from "valibot";
|
|
1630
1702
|
var stxSignTransactionMethodName = "stx_signTransaction";
|
|
1631
|
-
var stxSignTransactionParamsSchema =
|
|
1703
|
+
var stxSignTransactionParamsSchema = v59.object({
|
|
1632
1704
|
/**
|
|
1633
1705
|
* The transaction to sign as a hex-encoded string.
|
|
1634
1706
|
*/
|
|
1635
|
-
transaction:
|
|
1707
|
+
transaction: v59.string(),
|
|
1636
1708
|
/**
|
|
1637
1709
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1638
1710
|
* when not provided.
|
|
1639
1711
|
*/
|
|
1640
|
-
pubkey:
|
|
1712
|
+
pubkey: v59.optional(v59.string()),
|
|
1641
1713
|
/**
|
|
1642
1714
|
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1643
1715
|
*/
|
|
1644
|
-
broadcast:
|
|
1716
|
+
broadcast: v59.optional(v59.boolean())
|
|
1645
1717
|
});
|
|
1646
|
-
var stxSignTransactionResultSchema =
|
|
1718
|
+
var stxSignTransactionResultSchema = v59.object({
|
|
1647
1719
|
/**
|
|
1648
1720
|
* The signed transaction as a hex-encoded string.
|
|
1649
1721
|
*/
|
|
1650
|
-
transaction:
|
|
1722
|
+
transaction: v59.string()
|
|
1651
1723
|
});
|
|
1652
|
-
var stxSignTransactionRequestMessageSchema =
|
|
1724
|
+
var stxSignTransactionRequestMessageSchema = v59.object({
|
|
1653
1725
|
...rpcRequestMessageSchema.entries,
|
|
1654
|
-
...
|
|
1655
|
-
method:
|
|
1726
|
+
...v59.object({
|
|
1727
|
+
method: v59.literal(stxSignTransactionMethodName),
|
|
1656
1728
|
params: stxSignTransactionParamsSchema,
|
|
1657
|
-
id:
|
|
1729
|
+
id: v59.string()
|
|
1658
1730
|
}).entries
|
|
1659
1731
|
});
|
|
1660
1732
|
|
|
1661
1733
|
// src/request/types/stxMethods/signTransactions.ts
|
|
1662
|
-
import * as
|
|
1734
|
+
import * as v60 from "valibot";
|
|
1663
1735
|
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
1664
|
-
var stxSignTransactionsParamsSchema =
|
|
1736
|
+
var stxSignTransactionsParamsSchema = v60.object({
|
|
1665
1737
|
/**
|
|
1666
1738
|
* The transactions to sign as hex-encoded strings.
|
|
1667
1739
|
*/
|
|
1668
|
-
transactions:
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1740
|
+
transactions: v60.pipe(
|
|
1741
|
+
v60.array(
|
|
1742
|
+
v60.pipe(
|
|
1743
|
+
v60.string(),
|
|
1744
|
+
v60.check((hex) => {
|
|
1673
1745
|
return true;
|
|
1674
1746
|
}, "Invalid hex-encoded Stacks transaction.")
|
|
1675
1747
|
)
|
|
1676
1748
|
),
|
|
1677
|
-
|
|
1749
|
+
v60.minLength(1)
|
|
1678
1750
|
),
|
|
1679
1751
|
/**
|
|
1680
1752
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1681
1753
|
* to `true`.
|
|
1682
1754
|
*/
|
|
1683
|
-
broadcast:
|
|
1755
|
+
broadcast: v60.optional(v60.boolean())
|
|
1684
1756
|
});
|
|
1685
|
-
var stxSignTransactionsResultSchema =
|
|
1757
|
+
var stxSignTransactionsResultSchema = v60.object({
|
|
1686
1758
|
/**
|
|
1687
1759
|
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
1688
1760
|
* sign request.
|
|
1689
1761
|
*/
|
|
1690
|
-
transactions:
|
|
1762
|
+
transactions: v60.array(v60.string())
|
|
1691
1763
|
});
|
|
1692
|
-
var stxSignTransactionsRequestMessageSchema =
|
|
1764
|
+
var stxSignTransactionsRequestMessageSchema = v60.object({
|
|
1693
1765
|
...rpcRequestMessageSchema.entries,
|
|
1694
|
-
...
|
|
1695
|
-
method:
|
|
1766
|
+
...v60.object({
|
|
1767
|
+
method: v60.literal(stxSignTransactionsMethodName),
|
|
1696
1768
|
params: stxSignTransactionsParamsSchema,
|
|
1697
|
-
id:
|
|
1769
|
+
id: v60.string()
|
|
1698
1770
|
}).entries
|
|
1699
1771
|
});
|
|
1700
1772
|
|
|
1701
1773
|
// src/request/types/stxMethods/transferStx.ts
|
|
1702
|
-
import * as
|
|
1774
|
+
import * as v61 from "valibot";
|
|
1703
1775
|
var stxTransferStxMethodName = "stx_transferStx";
|
|
1704
|
-
var stxTransferStxParamsSchema =
|
|
1776
|
+
var stxTransferStxParamsSchema = v61.object({
|
|
1705
1777
|
/**
|
|
1706
1778
|
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1707
1779
|
* parseable by `BigInt` is acceptable.
|
|
@@ -1714,23 +1786,23 @@ var stxTransferStxParamsSchema = v54.object({
|
|
|
1714
1786
|
* const amount3 = '1234';
|
|
1715
1787
|
* ```
|
|
1716
1788
|
*/
|
|
1717
|
-
amount:
|
|
1789
|
+
amount: v61.union([v61.number(), v61.string()]),
|
|
1718
1790
|
/**
|
|
1719
1791
|
* The recipient's principal.
|
|
1720
1792
|
*/
|
|
1721
|
-
recipient:
|
|
1793
|
+
recipient: v61.string(),
|
|
1722
1794
|
/**
|
|
1723
1795
|
* A string representing the memo.
|
|
1724
1796
|
*/
|
|
1725
|
-
memo:
|
|
1797
|
+
memo: v61.optional(v61.string()),
|
|
1726
1798
|
/**
|
|
1727
1799
|
* Version of parameter format.
|
|
1728
1800
|
*/
|
|
1729
|
-
version:
|
|
1801
|
+
version: v61.optional(v61.string()),
|
|
1730
1802
|
/**
|
|
1731
1803
|
* The mode of the post conditions.
|
|
1732
1804
|
*/
|
|
1733
|
-
postConditionMode:
|
|
1805
|
+
postConditionMode: v61.optional(v61.number()),
|
|
1734
1806
|
/**
|
|
1735
1807
|
* A hex-encoded string representing the post conditions.
|
|
1736
1808
|
*
|
|
@@ -1743,29 +1815,29 @@ var stxTransferStxParamsSchema = v54.object({
|
|
|
1743
1815
|
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1744
1816
|
* ```
|
|
1745
1817
|
*/
|
|
1746
|
-
postConditions:
|
|
1818
|
+
postConditions: v61.optional(v61.array(v61.string())),
|
|
1747
1819
|
/**
|
|
1748
1820
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1749
1821
|
* when not provided.
|
|
1750
1822
|
*/
|
|
1751
|
-
pubkey:
|
|
1823
|
+
pubkey: v61.optional(v61.string())
|
|
1752
1824
|
});
|
|
1753
|
-
var stxTransferStxResultSchema =
|
|
1825
|
+
var stxTransferStxResultSchema = v61.object({
|
|
1754
1826
|
/**
|
|
1755
1827
|
* The ID of the transaction.
|
|
1756
1828
|
*/
|
|
1757
|
-
txid:
|
|
1829
|
+
txid: v61.string(),
|
|
1758
1830
|
/**
|
|
1759
1831
|
* A Stacks transaction as a hex-encoded string.
|
|
1760
1832
|
*/
|
|
1761
|
-
transaction:
|
|
1833
|
+
transaction: v61.string()
|
|
1762
1834
|
});
|
|
1763
|
-
var stxTransferStxRequestMessageSchema =
|
|
1835
|
+
var stxTransferStxRequestMessageSchema = v61.object({
|
|
1764
1836
|
...rpcRequestMessageSchema.entries,
|
|
1765
|
-
...
|
|
1766
|
-
method:
|
|
1837
|
+
...v61.object({
|
|
1838
|
+
method: v61.literal(stxTransferStxMethodName),
|
|
1767
1839
|
params: stxTransferStxParamsSchema,
|
|
1768
|
-
id:
|
|
1840
|
+
id: v61.string()
|
|
1769
1841
|
}).entries
|
|
1770
1842
|
});
|
|
1771
1843
|
|
|
@@ -1773,13 +1845,13 @@ var stxTransferStxRequestMessageSchema = v54.object({
|
|
|
1773
1845
|
var cache = {};
|
|
1774
1846
|
var requestInternal = async (provider, method, params) => {
|
|
1775
1847
|
const response = await provider.request(method, params);
|
|
1776
|
-
if (
|
|
1848
|
+
if (v62.is(rpcErrorResponseMessageSchema, response)) {
|
|
1777
1849
|
return {
|
|
1778
1850
|
status: "error",
|
|
1779
1851
|
error: response.error
|
|
1780
1852
|
};
|
|
1781
1853
|
}
|
|
1782
|
-
if (
|
|
1854
|
+
if (v62.is(rpcSuccessResponseMessageSchema, response)) {
|
|
1783
1855
|
return {
|
|
1784
1856
|
status: "success",
|
|
1785
1857
|
result: response.result
|
|
@@ -2973,6 +3045,10 @@ export {
|
|
|
2973
3045
|
signMessageParamsSchema,
|
|
2974
3046
|
signMessageRequestMessageSchema,
|
|
2975
3047
|
signMessageResultSchema,
|
|
3048
|
+
signMultipleMessagesMethodName,
|
|
3049
|
+
signMultipleMessagesParamsSchema,
|
|
3050
|
+
signMultipleMessagesRequestMessageSchema,
|
|
3051
|
+
signMultipleMessagesResultSchema,
|
|
2976
3052
|
signMultipleTransactions,
|
|
2977
3053
|
signPsbtMethodName,
|
|
2978
3054
|
signPsbtParamsSchema,
|