@sats-connect/core 0.7.1-2a549f3 → 0.7.1-586ad3d

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.js CHANGED
@@ -40,6 +40,7 @@ __export(index_exports, {
40
40
  RpcErrorCode: () => RpcErrorCode,
41
41
  RpcIdSchema: () => RpcIdSchema,
42
42
  SatsConnectAdapter: () => SatsConnectAdapter,
43
+ SparkNetworkType: () => SparkNetworkType,
43
44
  StacksNetworkType: () => StacksNetworkType,
44
45
  StarknetNetworkType: () => StarknetNetworkType,
45
46
  accountActionsSchema: () => accountActionsSchema,
@@ -171,6 +172,22 @@ __export(index_exports, {
171
172
  signPsbtRequestMessageSchema: () => signPsbtRequestMessageSchema,
172
173
  signPsbtResultSchema: () => signPsbtResultSchema,
173
174
  signTransaction: () => signTransaction,
175
+ sparkGetAddressesMethodName: () => sparkGetAddressesMethodName,
176
+ sparkGetAddressesParamsSchema: () => sparkGetAddressesParamsSchema,
177
+ sparkGetAddressesRequestMessageSchema: () => sparkGetAddressesRequestMessageSchema,
178
+ sparkGetAddressesResultSchema: () => sparkGetAddressesResultSchema,
179
+ sparkGetBalanceMethodName: () => sparkGetBalanceMethodName,
180
+ sparkGetBalanceParamsSchema: () => sparkGetBalanceParamsSchema,
181
+ sparkGetBalanceRequestMessageSchema: () => sparkGetBalanceRequestMessageSchema,
182
+ sparkGetBalanceResultSchema: () => sparkGetBalanceResultSchema,
183
+ sparkTransferMethodName: () => sparkTransferMethodName,
184
+ sparkTransferParamsSchema: () => sparkTransferParamsSchema,
185
+ sparkTransferRequestMessageSchema: () => sparkTransferRequestMessageSchema,
186
+ sparkTransferResultSchema: () => sparkTransferResultSchema,
187
+ sparkTransferTokenMethodName: () => sparkTransferTokenMethodName,
188
+ sparkTransferTokenParamsSchema: () => sparkTransferTokenParamsSchema,
189
+ sparkTransferTokenRequestMessageSchema: () => sparkTransferTokenRequestMessageSchema,
190
+ sparkTransferTokenResultSchema: () => sparkTransferTokenResultSchema,
174
191
  stxCallContractMethodName: () => stxCallContractMethodName,
175
192
  stxCallContractParamsSchema: () => stxCallContractParamsSchema,
176
193
  stxCallContractRequestMessageSchema: () => stxCallContractRequestMessageSchema,
@@ -234,6 +251,8 @@ var AddressPurpose = /* @__PURE__ */ ((AddressPurpose2) => {
234
251
  AddressPurpose2["Ordinals"] = "ordinals";
235
252
  AddressPurpose2["Payment"] = "payment";
236
253
  AddressPurpose2["Stacks"] = "stacks";
254
+ AddressPurpose2["Starknet"] = "starknet";
255
+ AddressPurpose2["Spark"] = "spark";
237
256
  return AddressPurpose2;
238
257
  })(AddressPurpose || {});
239
258
  var AddressType = /* @__PURE__ */ ((AddressType3) => {
@@ -243,6 +262,8 @@ var AddressType = /* @__PURE__ */ ((AddressType3) => {
243
262
  AddressType3["p2wsh"] = "p2wsh";
244
263
  AddressType3["p2tr"] = "p2tr";
245
264
  AddressType3["stacks"] = "stacks";
265
+ AddressType3["starknet"] = "starknet";
266
+ AddressType3["spark"] = "spark";
246
267
  return AddressType3;
247
268
  })(AddressType || {});
248
269
  var addressSchema = v2.object({
@@ -290,6 +311,11 @@ var StarknetNetworkType = /* @__PURE__ */ ((StarknetNetworkType2) => {
290
311
  StarknetNetworkType2["Sepolia"] = "sepolia";
291
312
  return StarknetNetworkType2;
292
313
  })(StarknetNetworkType || {});
314
+ var SparkNetworkType = /* @__PURE__ */ ((SparkNetworkType2) => {
315
+ SparkNetworkType2["Mainnet"] = "mainnet";
316
+ SparkNetworkType2["Regtest"] = "regtest";
317
+ return SparkNetworkType2;
318
+ })(SparkNetworkType || {});
293
319
  var RpcIdSchema = v3.optional(v3.union([v3.string(), v3.number(), v3.null()]));
294
320
  var rpcRequestMessageSchema = v3.object({
295
321
  jsonrpc: v3.literal("2.0"),
@@ -400,523 +426,1042 @@ function getSupportedWallets() {
400
426
  }
401
427
 
402
428
  // src/request/index.ts
403
- var v21 = __toESM(require("valibot"));
404
-
405
- // src/request/types/stxMethods/callContract.ts
406
- var v5 = __toESM(require("valibot"));
407
- var stxCallContractMethodName = "stx_callContract";
408
- var stxCallContractParamsSchema = v5.object({
409
- /**
410
- * The contract principal.
411
- *
412
- * E.g. `"SPKE...GD5C.my-contract"`
413
- */
414
- contract: v5.string(),
415
- /**
416
- * The name of the function to call.
417
- *
418
- * Note: spec changes ongoing,
419
- * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
420
- */
421
- functionName: v5.string(),
422
- /**
423
- * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
424
- */
425
- arguments: v5.optional(v5.array(v5.string())),
426
- /**
427
- * The function's arguments. The arguments are expected to be hex-encoded
428
- * strings of Clarity values.
429
- *
430
- * To convert Clarity values to their hex representation, the `cvToHex`
431
- * helper from the `@stacks/transactions` package may be helpful.
432
- *
433
- * ```js
434
- * import { cvToHex } from '@stacks/transactions';
435
- *
436
- * const functionArgs = [someClarityValue1, someClarityValue2];
437
- * const hexArgs = functionArgs.map(cvToHex);
438
- * ```
439
- */
440
- functionArgs: v5.optional(v5.array(v5.string())),
441
- /**
442
- * The post conditions to apply to the contract call.
443
- */
444
- postConditions: v5.optional(v5.array(v5.string())),
445
- /**
446
- * The mode to apply to the post conditions.
447
- */
448
- postConditionMode: v5.optional(v5.union([v5.literal("allow"), v5.literal("deny")]))
449
- });
450
- var stxCallContractResultSchema = v5.object({
451
- /**
452
- * The ID of the transaction.
453
- */
454
- txid: v5.string(),
455
- /**
456
- * A Stacks transaction as a hex-encoded string.
457
- */
458
- transaction: v5.string()
459
- });
460
- var stxCallContractRequestMessageSchema = v5.object({
461
- ...rpcRequestMessageSchema.entries,
462
- ...v5.object({
463
- method: v5.literal(stxCallContractMethodName),
464
- params: stxCallContractParamsSchema,
465
- id: v5.string()
466
- }).entries
467
- });
429
+ var v25 = __toESM(require("valibot"));
468
430
 
469
- // src/request/types/stxMethods/deployContract.ts
431
+ // src/request/types/btcMethods.ts
470
432
  var v6 = __toESM(require("valibot"));
471
- var stxDeployContractMethodName = "stx_deployContract";
472
- var stxDeployContractParamsSchema = v6.object({
473
- /**
474
- * Name of the contract.
475
- */
476
- name: v6.string(),
477
- /**
478
- * The source code of the Clarity contract.
479
- */
480
- clarityCode: v6.string(),
481
- /**
482
- * The version of the Clarity contract.
483
- */
484
- clarityVersion: v6.optional(v6.number()),
485
- /**
486
- * The post conditions to apply to the contract call.
487
- */
488
- postConditions: v6.optional(v6.array(v6.string())),
489
- /**
490
- * The mode to apply to the post conditions.
491
- */
492
- postConditionMode: v6.optional(v6.union([v6.literal("allow"), v6.literal("deny")]))
493
- });
494
- var stxDeployContractResultSchema = v6.object({
495
- /**
496
- * The ID of the transaction.
497
- */
498
- txid: v6.string(),
499
- /**
500
- * A Stacks transaction as a hex-encoded string.
501
- */
502
- transaction: v6.string()
503
- });
504
- var stxDeployContractRequestMessageSchema = v6.object({
505
- ...rpcRequestMessageSchema.entries,
506
- ...v6.object({
507
- method: v6.literal(stxDeployContractMethodName),
508
- params: stxDeployContractParamsSchema,
509
- id: v6.string()
510
- }).entries
511
- });
512
-
513
- // src/request/types/stxMethods/getAccounts.ts
514
- var v8 = __toESM(require("valibot"));
515
433
 
516
434
  // src/request/types/walletMethods.ts
517
- var v7 = __toESM(require("valibot"));
518
- var accountActionsSchema = v7.object({
519
- read: v7.optional(v7.boolean())
435
+ var v5 = __toESM(require("valibot"));
436
+ var accountActionsSchema = v5.object({
437
+ read: v5.optional(v5.boolean())
520
438
  });
521
- var walletActionsSchema = v7.object({
522
- readNetwork: v7.optional(v7.boolean())
439
+ var walletActionsSchema = v5.object({
440
+ readNetwork: v5.optional(v5.boolean())
523
441
  });
524
- var accountPermissionSchema = v7.object({
525
- type: v7.literal("account"),
526
- resourceId: v7.string(),
527
- clientId: v7.string(),
442
+ var accountPermissionSchema = v5.object({
443
+ type: v5.literal("account"),
444
+ resourceId: v5.string(),
445
+ clientId: v5.string(),
528
446
  actions: accountActionsSchema
529
447
  });
530
- var walletPermissionSchema = v7.object({
531
- type: v7.literal("wallet"),
532
- resourceId: v7.string(),
533
- clientId: v7.string(),
448
+ var walletPermissionSchema = v5.object({
449
+ type: v5.literal("wallet"),
450
+ resourceId: v5.string(),
451
+ clientId: v5.string(),
534
452
  actions: walletActionsSchema
535
453
  });
536
- var PermissionRequestParams = v7.variant("type", [
537
- v7.object({
538
- ...v7.omit(accountPermissionSchema, ["clientId"]).entries
454
+ var PermissionRequestParams = v5.variant("type", [
455
+ v5.object({
456
+ ...v5.omit(accountPermissionSchema, ["clientId"]).entries
539
457
  }),
540
- v7.object({
541
- ...v7.omit(walletPermissionSchema, ["clientId"]).entries
458
+ v5.object({
459
+ ...v5.omit(walletPermissionSchema, ["clientId"]).entries
542
460
  })
543
461
  ]);
544
- var permission = v7.variant("type", [accountPermissionSchema, walletPermissionSchema]);
462
+ var permission = v5.variant("type", [accountPermissionSchema, walletPermissionSchema]);
545
463
  var requestPermissionsMethodName = "wallet_requestPermissions";
546
- var requestPermissionsParamsSchema = v7.nullish(v7.array(PermissionRequestParams));
547
- var requestPermissionsResultSchema = v7.literal(true);
548
- var requestPermissionsRequestMessageSchema = v7.object({
464
+ var requestPermissionsParamsSchema = v5.nullish(v5.array(PermissionRequestParams));
465
+ var requestPermissionsResultSchema = v5.literal(true);
466
+ var requestPermissionsRequestMessageSchema = v5.object({
549
467
  ...rpcRequestMessageSchema.entries,
550
- ...v7.object({
551
- method: v7.literal(requestPermissionsMethodName),
468
+ ...v5.object({
469
+ method: v5.literal(requestPermissionsMethodName),
552
470
  params: requestPermissionsParamsSchema,
553
- id: v7.string()
471
+ id: v5.string()
554
472
  }).entries
555
473
  });
556
474
  var renouncePermissionsMethodName = "wallet_renouncePermissions";
557
- var renouncePermissionsParamsSchema = v7.nullish(v7.null());
558
- var renouncePermissionsResultSchema = v7.nullish(v7.null());
559
- var renouncePermissionsRequestMessageSchema = v7.object({
475
+ var renouncePermissionsParamsSchema = v5.nullish(v5.null());
476
+ var renouncePermissionsResultSchema = v5.nullish(v5.null());
477
+ var renouncePermissionsRequestMessageSchema = v5.object({
560
478
  ...rpcRequestMessageSchema.entries,
561
- ...v7.object({
562
- method: v7.literal(renouncePermissionsMethodName),
479
+ ...v5.object({
480
+ method: v5.literal(renouncePermissionsMethodName),
563
481
  params: renouncePermissionsParamsSchema,
564
- id: v7.string()
482
+ id: v5.string()
565
483
  }).entries
566
484
  });
567
485
  var disconnectMethodName = "wallet_disconnect";
568
- var disconnectParamsSchema = v7.nullish(v7.null());
569
- var disconnectResultSchema = v7.nullish(v7.null());
570
- var disconnectRequestMessageSchema = v7.object({
486
+ var disconnectParamsSchema = v5.nullish(v5.null());
487
+ var disconnectResultSchema = v5.nullish(v5.null());
488
+ var disconnectRequestMessageSchema = v5.object({
571
489
  ...rpcRequestMessageSchema.entries,
572
- ...v7.object({
573
- method: v7.literal(disconnectMethodName),
490
+ ...v5.object({
491
+ method: v5.literal(disconnectMethodName),
574
492
  params: disconnectParamsSchema,
575
- id: v7.string()
493
+ id: v5.string()
576
494
  }).entries
577
495
  });
578
496
  var getWalletTypeMethodName = "wallet_getWalletType";
579
- var getWalletTypeParamsSchema = v7.nullish(v7.null());
497
+ var getWalletTypeParamsSchema = v5.nullish(v5.null());
580
498
  var getWalletTypeResultSchema = walletTypeSchema;
581
- var getWalletTypeRequestMessageSchema = v7.object({
499
+ var getWalletTypeRequestMessageSchema = v5.object({
582
500
  ...rpcRequestMessageSchema.entries,
583
- ...v7.object({
584
- method: v7.literal(getWalletTypeMethodName),
501
+ ...v5.object({
502
+ method: v5.literal(getWalletTypeMethodName),
585
503
  params: getWalletTypeParamsSchema,
586
- id: v7.string()
504
+ id: v5.string()
587
505
  }).entries
588
506
  });
589
507
  var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
590
- var getCurrentPermissionsParamsSchema = v7.nullish(v7.null());
591
- var getCurrentPermissionsResultSchema = v7.array(permission);
592
- var getCurrentPermissionsRequestMessageSchema = v7.object({
508
+ var getCurrentPermissionsParamsSchema = v5.nullish(v5.null());
509
+ var getCurrentPermissionsResultSchema = v5.array(permission);
510
+ var getCurrentPermissionsRequestMessageSchema = v5.object({
593
511
  ...rpcRequestMessageSchema.entries,
594
- ...v7.object({
595
- method: v7.literal(getCurrentPermissionsMethodName),
512
+ ...v5.object({
513
+ method: v5.literal(getCurrentPermissionsMethodName),
596
514
  params: getCurrentPermissionsParamsSchema,
597
- id: v7.string()
515
+ id: v5.string()
598
516
  }).entries
599
517
  });
600
518
  var getNetworkMethodName = "wallet_getNetwork";
601
- var getNetworkParamsSchema = v7.nullish(v7.null());
602
- var getNetworkResultSchema = v7.object({
603
- bitcoin: v7.object({
604
- name: v7.enum(BitcoinNetworkType)
519
+ var getNetworkParamsSchema = v5.nullish(v5.null());
520
+ var getNetworkResultSchema = v5.object({
521
+ bitcoin: v5.object({
522
+ name: v5.enum(BitcoinNetworkType)
605
523
  }),
606
- stacks: v7.object({
607
- name: v7.string()
524
+ stacks: v5.object({
525
+ name: v5.enum(StacksNetworkType)
526
+ }),
527
+ spark: v5.object({
528
+ name: v5.enum(SparkNetworkType)
608
529
  })
609
530
  });
610
- var getNetworkRequestMessageSchema = v7.object({
531
+ var getNetworkRequestMessageSchema = v5.object({
611
532
  ...rpcRequestMessageSchema.entries,
612
- ...v7.object({
613
- method: v7.literal(getNetworkMethodName),
533
+ ...v5.object({
534
+ method: v5.literal(getNetworkMethodName),
614
535
  params: getNetworkParamsSchema,
615
- id: v7.string()
536
+ id: v5.string()
616
537
  }).entries
617
538
  });
618
539
  var changeNetworkMethodName = "wallet_changeNetwork";
619
- var changeNetworkParamsSchema = v7.object({
620
- name: v7.enum(BitcoinNetworkType)
540
+ var changeNetworkParamsSchema = v5.object({
541
+ name: v5.enum(BitcoinNetworkType)
621
542
  });
622
- var changeNetworkResultSchema = v7.nullish(v7.null());
623
- var changeNetworkRequestMessageSchema = v7.object({
543
+ var changeNetworkResultSchema = v5.nullish(v5.null());
544
+ var changeNetworkRequestMessageSchema = v5.object({
624
545
  ...rpcRequestMessageSchema.entries,
625
- ...v7.object({
626
- method: v7.literal(changeNetworkMethodName),
546
+ ...v5.object({
547
+ method: v5.literal(changeNetworkMethodName),
627
548
  params: changeNetworkParamsSchema,
628
- id: v7.string()
549
+ id: v5.string()
629
550
  }).entries
630
551
  });
631
552
  var changeNetworkByIdMethodName = "wallet_changeNetworkById";
632
- var changeNetworkByIdParamsSchema = v7.object({
633
- id: v7.string()
553
+ var changeNetworkByIdParamsSchema = v5.object({
554
+ id: v5.string()
634
555
  });
635
- var changeNetworkByIdResultSchema = v7.nullish(v7.null());
636
- var changeNetworkByIdRequestMessageSchema = v7.object({
556
+ var changeNetworkByIdResultSchema = v5.nullish(v5.null());
557
+ var changeNetworkByIdRequestMessageSchema = v5.object({
637
558
  ...rpcRequestMessageSchema.entries,
638
- ...v7.object({
639
- method: v7.literal(changeNetworkByIdMethodName),
559
+ ...v5.object({
560
+ method: v5.literal(changeNetworkByIdMethodName),
640
561
  params: changeNetworkByIdParamsSchema,
641
- id: v7.string()
562
+ id: v5.string()
642
563
  }).entries
643
564
  });
644
565
  var getAccountMethodName = "wallet_getAccount";
645
- var getAccountParamsSchema = v7.nullish(v7.null());
646
- var getAccountResultSchema = v7.object({
647
- id: v7.string(),
648
- addresses: v7.array(addressSchema),
566
+ var getAccountParamsSchema = v5.nullish(v5.null());
567
+ var getAccountResultSchema = v5.object({
568
+ id: v5.string(),
569
+ addresses: v5.array(addressSchema),
649
570
  walletType: walletTypeSchema,
650
571
  network: getNetworkResultSchema
651
572
  });
652
- var getAccountRequestMessageSchema = v7.object({
573
+ var getAccountRequestMessageSchema = v5.object({
653
574
  ...rpcRequestMessageSchema.entries,
654
- ...v7.object({
655
- method: v7.literal(getAccountMethodName),
575
+ ...v5.object({
576
+ method: v5.literal(getAccountMethodName),
656
577
  params: getAccountParamsSchema,
657
- id: v7.string()
578
+ id: v5.string()
658
579
  }).entries
659
580
  });
660
581
  var connectMethodName = "wallet_connect";
661
- var connectParamsSchema = v7.nullish(
662
- v7.object({
663
- permissions: v7.optional(v7.array(PermissionRequestParams)),
664
- addresses: v7.optional(v7.array(v7.enum(AddressPurpose))),
665
- message: v7.optional(
666
- v7.pipe(v7.string(), v7.maxLength(80, "The message must not exceed 80 characters."))
582
+ var connectParamsSchema = v5.nullish(
583
+ v5.object({
584
+ permissions: v5.optional(v5.array(PermissionRequestParams)),
585
+ addresses: v5.optional(v5.array(v5.enum(AddressPurpose))),
586
+ message: v5.optional(
587
+ v5.pipe(v5.string(), v5.maxLength(80, "The message must not exceed 80 characters."))
667
588
  ),
668
- network: v7.optional(v7.enum(BitcoinNetworkType))
589
+ network: v5.optional(v5.enum(BitcoinNetworkType))
669
590
  })
670
591
  );
671
- var connectResultSchema = v7.object({
672
- id: v7.string(),
673
- addresses: v7.array(addressSchema),
592
+ var connectResultSchema = v5.object({
593
+ id: v5.string(),
594
+ addresses: v5.array(addressSchema),
674
595
  walletType: walletTypeSchema,
675
596
  network: getNetworkResultSchema
676
597
  });
677
- var connectRequestMessageSchema = v7.object({
598
+ var connectRequestMessageSchema = v5.object({
678
599
  ...rpcRequestMessageSchema.entries,
679
- ...v7.object({
680
- method: v7.literal(connectMethodName),
600
+ ...v5.object({
601
+ method: v5.literal(connectMethodName),
681
602
  params: connectParamsSchema,
682
- id: v7.string()
603
+ id: v5.string()
683
604
  }).entries
684
605
  });
685
606
  var addNetworkMethodName = "wallet_addNetwork";
686
- var addNetworkParamsSchema = v7.variant("chain", [
687
- v7.object({
688
- chain: v7.literal("bitcoin"),
689
- type: v7.enum(BitcoinNetworkType),
690
- name: v7.string(),
691
- rpcUrl: v7.string(),
692
- rpcFallbackUrl: v7.optional(v7.string()),
693
- indexerUrl: v7.optional(v7.string()),
694
- blockExplorerUrl: v7.optional(v7.string()),
695
- switch: v7.optional(v7.boolean())
607
+ var addNetworkParamsSchema = v5.variant("chain", [
608
+ v5.object({
609
+ chain: v5.literal("bitcoin"),
610
+ type: v5.enum(BitcoinNetworkType),
611
+ name: v5.string(),
612
+ rpcUrl: v5.string(),
613
+ rpcFallbackUrl: v5.optional(v5.string()),
614
+ indexerUrl: v5.optional(v5.string()),
615
+ blockExplorerUrl: v5.optional(v5.string()),
616
+ switch: v5.optional(v5.boolean())
696
617
  }),
697
- v7.object({
698
- chain: v7.literal("stacks"),
699
- name: v7.string(),
700
- type: v7.enum(StacksNetworkType),
701
- rpcUrl: v7.string(),
702
- blockExplorerUrl: v7.optional(v7.string()),
703
- switch: v7.optional(v7.boolean())
618
+ v5.object({
619
+ chain: v5.literal("stacks"),
620
+ name: v5.string(),
621
+ type: v5.enum(StacksNetworkType),
622
+ rpcUrl: v5.string(),
623
+ blockExplorerUrl: v5.optional(v5.string()),
624
+ switch: v5.optional(v5.boolean())
704
625
  }),
705
- v7.object({
706
- chain: v7.literal("starknet"),
707
- name: v7.string(),
708
- type: v7.enum(StarknetNetworkType),
709
- rpcUrl: v7.string(),
710
- blockExplorerUrl: v7.optional(v7.string()),
711
- switch: v7.optional(v7.boolean())
626
+ v5.object({
627
+ chain: v5.literal("starknet"),
628
+ name: v5.string(),
629
+ type: v5.enum(StarknetNetworkType),
630
+ rpcUrl: v5.string(),
631
+ blockExplorerUrl: v5.optional(v5.string()),
632
+ switch: v5.optional(v5.boolean())
712
633
  })
713
634
  ]);
714
- var addNetworkRequestMessageSchema = v7.object({
635
+ var addNetworkRequestMessageSchema = v5.object({
715
636
  ...rpcRequestMessageSchema.entries,
716
- ...v7.object({
717
- method: v7.literal(addNetworkMethodName),
637
+ ...v5.object({
638
+ method: v5.literal(addNetworkMethodName),
718
639
  params: addNetworkParamsSchema,
719
- id: v7.string()
640
+ id: v5.string()
720
641
  }).entries
721
642
  });
722
- var addNetworkResultSchema = v7.object({
723
- id: v7.string()
643
+ var addNetworkResultSchema = v5.object({
644
+ id: v5.string()
724
645
  });
725
646
 
726
- // src/request/types/stxMethods/getAccounts.ts
727
- var stxGetAccountsMethodName = "stx_getAccounts";
728
- var stxGetAccountsParamsSchema = v8.nullish(v8.null());
729
- var stxGetAccountsResultSchema = v8.object({
647
+ // src/request/types/btcMethods.ts
648
+ var getInfoMethodName = "getInfo";
649
+ var getInfoParamsSchema = v6.nullish(v6.null());
650
+ var getInfoResultSchema = v6.object({
651
+ /**
652
+ * Version of the wallet.
653
+ */
654
+ version: v6.string(),
655
+ /**
656
+ * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
657
+ */
658
+ methods: v6.optional(v6.array(v6.string())),
659
+ /**
660
+ * List of WBIP standards supported by the wallet. Not currently used.
661
+ */
662
+ supports: v6.array(v6.string())
663
+ });
664
+ var getInfoRequestMessageSchema = v6.object({
665
+ ...rpcRequestMessageSchema.entries,
666
+ ...v6.object({
667
+ method: v6.literal(getInfoMethodName),
668
+ params: getInfoParamsSchema,
669
+ id: v6.string()
670
+ }).entries
671
+ });
672
+ var getAddressesMethodName = "getAddresses";
673
+ var getAddressesParamsSchema = v6.object({
674
+ /**
675
+ * The purposes for which to generate addresses. See
676
+ * {@linkcode AddressPurpose} for available purposes.
677
+ */
678
+ purposes: v6.array(v6.enum(AddressPurpose)),
679
+ /**
680
+ * A message to be displayed to the user in the request prompt.
681
+ */
682
+ message: v6.optional(v6.string())
683
+ });
684
+ var getAddressesResultSchema = v6.object({
730
685
  /**
731
686
  * The addresses generated for the given purposes.
732
687
  */
733
- addresses: v8.array(
734
- v8.object({
735
- address: v8.string(),
736
- publicKey: v8.string(),
737
- gaiaHubUrl: v8.string(),
738
- gaiaAppKey: v8.string()
739
- })
740
- ),
688
+ addresses: v6.array(addressSchema),
741
689
  network: getNetworkResultSchema
742
690
  });
743
- var stxGetAccountsRequestMessageSchema = v8.object({
691
+ var getAddressesRequestMessageSchema = v6.object({
744
692
  ...rpcRequestMessageSchema.entries,
745
- ...v8.object({
746
- method: v8.literal(stxGetAccountsMethodName),
747
- params: stxGetAccountsParamsSchema,
748
- id: v8.string()
693
+ ...v6.object({
694
+ method: v6.literal(getAddressesMethodName),
695
+ params: getAddressesParamsSchema,
696
+ id: v6.string()
749
697
  }).entries
750
698
  });
751
-
752
- // src/request/types/stxMethods/getAddresses.ts
753
- var v9 = __toESM(require("valibot"));
699
+ var signMessageMethodName = "signMessage";
700
+ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
701
+ MessageSigningProtocols2["ECDSA"] = "ECDSA";
702
+ MessageSigningProtocols2["BIP322"] = "BIP322";
703
+ return MessageSigningProtocols2;
704
+ })(MessageSigningProtocols || {});
705
+ var signMessageParamsSchema = v6.object({
706
+ /**
707
+ * The address used for signing.
708
+ **/
709
+ address: v6.string(),
710
+ /**
711
+ * The message to sign.
712
+ **/
713
+ message: v6.string(),
714
+ /**
715
+ * The protocol to use for signing the message.
716
+ */
717
+ protocol: v6.optional(v6.enum(MessageSigningProtocols))
718
+ });
719
+ var signMessageResultSchema = v6.object({
720
+ /**
721
+ * The signature of the message.
722
+ */
723
+ signature: v6.string(),
724
+ /**
725
+ * hash of the message.
726
+ */
727
+ messageHash: v6.string(),
728
+ /**
729
+ * The address used for signing.
730
+ */
731
+ address: v6.string(),
732
+ /**
733
+ * The protocol to use for signing the message.
734
+ */
735
+ protocol: v6.enum(MessageSigningProtocols)
736
+ });
737
+ var signMessageRequestMessageSchema = v6.object({
738
+ ...rpcRequestMessageSchema.entries,
739
+ ...v6.object({
740
+ method: v6.literal(signMessageMethodName),
741
+ params: signMessageParamsSchema,
742
+ id: v6.string()
743
+ }).entries
744
+ });
745
+ var sendTransferMethodName = "sendTransfer";
746
+ var sendTransferParamsSchema = v6.object({
747
+ /**
748
+ * Array of recipients to send to.
749
+ * The amount to send to each recipient is in satoshis.
750
+ */
751
+ recipients: v6.array(
752
+ v6.object({
753
+ address: v6.string(),
754
+ amount: v6.number()
755
+ })
756
+ )
757
+ });
758
+ var sendTransferResultSchema = v6.object({
759
+ /**
760
+ * The transaction id as a hex-encoded string.
761
+ */
762
+ txid: v6.string()
763
+ });
764
+ var sendTransferRequestMessageSchema = v6.object({
765
+ ...rpcRequestMessageSchema.entries,
766
+ ...v6.object({
767
+ method: v6.literal(sendTransferMethodName),
768
+ params: sendTransferParamsSchema,
769
+ id: v6.string()
770
+ }).entries
771
+ });
772
+ var signPsbtMethodName = "signPsbt";
773
+ var signPsbtParamsSchema = v6.object({
774
+ /**
775
+ * The base64 encoded PSBT to sign.
776
+ */
777
+ psbt: v6.string(),
778
+ /**
779
+ * The inputs to sign.
780
+ * The key is the address and the value is an array of indexes of the inputs to sign.
781
+ */
782
+ signInputs: v6.optional(v6.record(v6.string(), v6.array(v6.number()))),
783
+ /**
784
+ * Whether to broadcast the transaction after signing.
785
+ **/
786
+ broadcast: v6.optional(v6.boolean())
787
+ });
788
+ var signPsbtResultSchema = v6.object({
789
+ /**
790
+ * The base64 encoded PSBT after signing.
791
+ */
792
+ psbt: v6.string(),
793
+ /**
794
+ * The transaction id as a hex-encoded string.
795
+ * This is only returned if the transaction was broadcast.
796
+ **/
797
+ txid: v6.optional(v6.string())
798
+ });
799
+ var signPsbtRequestMessageSchema = v6.object({
800
+ ...rpcRequestMessageSchema.entries,
801
+ ...v6.object({
802
+ method: v6.literal(signPsbtMethodName),
803
+ params: signPsbtParamsSchema,
804
+ id: v6.string()
805
+ }).entries
806
+ });
807
+ var getAccountsMethodName = "getAccounts";
808
+ var getAccountsParamsSchema = v6.object({
809
+ /**
810
+ * The purposes for which to generate addresses. See
811
+ * {@linkcode AddressPurpose} for available purposes.
812
+ */
813
+ purposes: v6.array(v6.enum(AddressPurpose)),
814
+ /**
815
+ * A message to be displayed to the user in the request prompt.
816
+ */
817
+ message: v6.optional(v6.string())
818
+ });
819
+ var getAccountsResultSchema = v6.array(
820
+ v6.object({
821
+ ...addressSchema.entries,
822
+ ...v6.object({
823
+ walletType: walletTypeSchema
824
+ }).entries
825
+ })
826
+ );
827
+ var getAccountsRequestMessageSchema = v6.object({
828
+ ...rpcRequestMessageSchema.entries,
829
+ ...v6.object({
830
+ method: v6.literal(getAccountsMethodName),
831
+ params: getAccountsParamsSchema,
832
+ id: v6.string()
833
+ }).entries
834
+ });
835
+ var getBalanceMethodName = "getBalance";
836
+ var getBalanceParamsSchema = v6.nullish(v6.null());
837
+ var getBalanceResultSchema = v6.object({
838
+ /**
839
+ * The confirmed balance of the wallet in sats. Using a string due to chrome
840
+ * messages not supporting bigint
841
+ * (https://issues.chromium.org/issues/40116184).
842
+ */
843
+ confirmed: v6.string(),
844
+ /**
845
+ * The unconfirmed balance of the wallet in sats. Using a string due to chrome
846
+ * messages not supporting bigint
847
+ * (https://issues.chromium.org/issues/40116184).
848
+ */
849
+ unconfirmed: v6.string(),
850
+ /**
851
+ * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
852
+ * sats. Using a string due to chrome messages not supporting bigint
853
+ * (https://issues.chromium.org/issues/40116184).
854
+ */
855
+ total: v6.string()
856
+ });
857
+ var getBalanceRequestMessageSchema = v6.object({
858
+ ...rpcRequestMessageSchema.entries,
859
+ ...v6.object({
860
+ method: v6.literal(getBalanceMethodName),
861
+ id: v6.string()
862
+ }).entries
863
+ });
864
+
865
+ // src/request/types/ordinalsMethods.ts
866
+ var v7 = __toESM(require("valibot"));
867
+ var getInscriptionsMethodName = "ord_getInscriptions";
868
+ var getInscriptionsParamsSchema = v7.object({
869
+ offset: v7.number(),
870
+ limit: v7.number()
871
+ });
872
+ var getInscriptionsResultSchema = v7.object({
873
+ total: v7.number(),
874
+ limit: v7.number(),
875
+ offset: v7.number(),
876
+ inscriptions: v7.array(
877
+ v7.object({
878
+ inscriptionId: v7.string(),
879
+ inscriptionNumber: v7.string(),
880
+ address: v7.string(),
881
+ collectionName: v7.optional(v7.string()),
882
+ postage: v7.string(),
883
+ contentLength: v7.string(),
884
+ contentType: v7.string(),
885
+ timestamp: v7.number(),
886
+ offset: v7.number(),
887
+ genesisTransaction: v7.string(),
888
+ output: v7.string()
889
+ })
890
+ )
891
+ });
892
+ var getInscriptionsRequestMessageSchema = v7.object({
893
+ ...rpcRequestMessageSchema.entries,
894
+ ...v7.object({
895
+ method: v7.literal(getInscriptionsMethodName),
896
+ params: getInscriptionsParamsSchema,
897
+ id: v7.string()
898
+ }).entries
899
+ });
900
+ var sendInscriptionsMethodName = "ord_sendInscriptions";
901
+ var sendInscriptionsParamsSchema = v7.object({
902
+ transfers: v7.array(
903
+ v7.object({
904
+ address: v7.string(),
905
+ inscriptionId: v7.string()
906
+ })
907
+ )
908
+ });
909
+ var sendInscriptionsResultSchema = v7.object({
910
+ txid: v7.string()
911
+ });
912
+ var sendInscriptionsRequestMessageSchema = v7.object({
913
+ ...rpcRequestMessageSchema.entries,
914
+ ...v7.object({
915
+ method: v7.literal(sendInscriptionsMethodName),
916
+ params: sendInscriptionsParamsSchema,
917
+ id: v7.string()
918
+ }).entries
919
+ });
920
+
921
+ // src/request/types/runesMethods/etch.ts
922
+ var v8 = __toESM(require("valibot"));
923
+ var runesEtchMethodName = "runes_etch";
924
+ var etchTermsSchema = v8.object({
925
+ amount: v8.string(),
926
+ cap: v8.string(),
927
+ heightStart: v8.optional(v8.string()),
928
+ heightEnd: v8.optional(v8.string()),
929
+ offsetStart: v8.optional(v8.string()),
930
+ offsetEnd: v8.optional(v8.string())
931
+ });
932
+ var inscriptionDetailsSchema = v8.object({
933
+ contentType: v8.string(),
934
+ contentBase64: v8.string()
935
+ });
936
+ var runesEtchParamsSchema = v8.object({
937
+ runeName: v8.string(),
938
+ divisibility: v8.optional(v8.number()),
939
+ symbol: v8.optional(v8.string()),
940
+ premine: v8.optional(v8.string()),
941
+ isMintable: v8.boolean(),
942
+ delegateInscriptionId: v8.optional(v8.string()),
943
+ destinationAddress: v8.string(),
944
+ refundAddress: v8.string(),
945
+ feeRate: v8.number(),
946
+ appServiceFee: v8.optional(v8.number()),
947
+ appServiceFeeAddress: v8.optional(v8.string()),
948
+ terms: v8.optional(etchTermsSchema),
949
+ inscriptionDetails: v8.optional(inscriptionDetailsSchema),
950
+ network: v8.optional(v8.enum(BitcoinNetworkType))
951
+ });
952
+ var runesEtchResultSchema = v8.object({
953
+ orderId: v8.string(),
954
+ fundTransactionId: v8.string(),
955
+ fundingAddress: v8.string()
956
+ });
957
+ var runesEtchRequestMessageSchema = v8.object({
958
+ ...rpcRequestMessageSchema.entries,
959
+ ...v8.object({
960
+ method: v8.literal(runesEtchMethodName),
961
+ params: runesEtchParamsSchema,
962
+ id: v8.string()
963
+ }).entries
964
+ });
965
+
966
+ // src/request/types/runesMethods/getBalance.ts
967
+ var v9 = __toESM(require("valibot"));
968
+ var runesGetBalanceMethodName = "runes_getBalance";
969
+ var runesGetBalanceParamsSchema = v9.nullish(v9.null());
970
+ var runesGetBalanceResultSchema = v9.object({
971
+ balances: v9.array(
972
+ v9.object({
973
+ runeName: v9.string(),
974
+ amount: v9.string(),
975
+ divisibility: v9.number(),
976
+ symbol: v9.string(),
977
+ inscriptionId: v9.nullish(v9.string()),
978
+ spendableBalance: v9.string()
979
+ })
980
+ )
981
+ });
982
+ var runesGetBalanceRequestMessageSchema = v9.object({
983
+ ...rpcRequestMessageSchema.entries,
984
+ ...v9.object({
985
+ method: v9.literal(runesGetBalanceMethodName),
986
+ params: runesGetBalanceParamsSchema,
987
+ id: v9.string()
988
+ }).entries
989
+ });
990
+
991
+ // src/request/types/runesMethods/mint.ts
992
+ var v10 = __toESM(require("valibot"));
993
+ var runesMintMethodName = "runes_mint";
994
+ var runesMintParamsSchema = v10.object({
995
+ appServiceFee: v10.optional(v10.number()),
996
+ appServiceFeeAddress: v10.optional(v10.string()),
997
+ destinationAddress: v10.string(),
998
+ feeRate: v10.number(),
999
+ refundAddress: v10.string(),
1000
+ repeats: v10.number(),
1001
+ runeName: v10.string(),
1002
+ network: v10.optional(v10.enum(BitcoinNetworkType))
1003
+ });
1004
+ var runesMintResultSchema = v10.object({
1005
+ orderId: v10.string(),
1006
+ fundTransactionId: v10.string(),
1007
+ fundingAddress: v10.string()
1008
+ });
1009
+ var runesMintRequestMessageSchema = v10.object({
1010
+ ...rpcRequestMessageSchema.entries,
1011
+ ...v10.object({
1012
+ method: v10.literal(runesMintMethodName),
1013
+ params: runesMintParamsSchema,
1014
+ id: v10.string()
1015
+ }).entries
1016
+ });
1017
+
1018
+ // src/request/types/runesMethods/transfer.ts
1019
+ var v11 = __toESM(require("valibot"));
1020
+ var runesTransferMethodName = "runes_transfer";
1021
+ var runesTransferParamsSchema = v11.object({
1022
+ recipients: v11.array(
1023
+ v11.object({
1024
+ runeName: v11.string(),
1025
+ amount: v11.string(),
1026
+ address: v11.string()
1027
+ })
1028
+ )
1029
+ });
1030
+ var runesTransferResultSchema = v11.object({
1031
+ txid: v11.string()
1032
+ });
1033
+ var runesTransferRequestMessageSchema = v11.object({
1034
+ ...rpcRequestMessageSchema.entries,
1035
+ ...v11.object({
1036
+ method: v11.literal(runesTransferMethodName),
1037
+ params: runesTransferParamsSchema,
1038
+ id: v11.string()
1039
+ }).entries
1040
+ });
1041
+
1042
+ // src/request/types/sparkMethods/getAddresses.ts
1043
+ var v12 = __toESM(require("valibot"));
1044
+ var sparkGetAddressesMethodName = "spark_getAddresses";
1045
+ var sparkGetAddressesParamsSchema = v12.nullish(
1046
+ v12.object({
1047
+ /**
1048
+ * A message to be displayed to the user in the request prompt.
1049
+ */
1050
+ message: v12.optional(v12.string())
1051
+ })
1052
+ );
1053
+ var sparkGetAddressesResultSchema = v12.object({
1054
+ /**
1055
+ * The addresses generated for the given purposes.
1056
+ */
1057
+ addresses: v12.array(addressSchema),
1058
+ network: getNetworkResultSchema
1059
+ });
1060
+ var sparkGetAddressesRequestMessageSchema = v12.object({
1061
+ ...rpcRequestMessageSchema.entries,
1062
+ ...v12.object({
1063
+ method: v12.literal(sparkGetAddressesMethodName),
1064
+ params: sparkGetAddressesParamsSchema,
1065
+ id: v12.string()
1066
+ }).entries
1067
+ });
1068
+
1069
+ // src/request/types/sparkMethods/getBalance.ts
1070
+ var v13 = __toESM(require("valibot"));
1071
+ var sparkGetBalanceMethodName = "spark_getBalance";
1072
+ var sparkGetBalanceParamsSchema = v13.nullish(v13.null());
1073
+ var sparkGetBalanceResultSchema = v13.object({
1074
+ /**
1075
+ * The Spark Bitcoin address balance in sats in string form.
1076
+ */
1077
+ balance: v13.string(),
1078
+ tokenBalances: v13.array(
1079
+ v13.object({
1080
+ /* The address balance of the token in string form as it can overflow a js number */
1081
+ balance: v13.string(),
1082
+ tokenMetadata: v13.object({
1083
+ tokenIdentifier: v13.string(),
1084
+ tokenPublicKey: v13.string(),
1085
+ tokenName: v13.string(),
1086
+ tokenTicker: v13.string(),
1087
+ decimals: v13.number(),
1088
+ maxSupply: v13.string()
1089
+ })
1090
+ })
1091
+ )
1092
+ });
1093
+ var sparkGetBalanceRequestMessageSchema = v13.object({
1094
+ ...rpcRequestMessageSchema.entries,
1095
+ ...v13.object({
1096
+ method: v13.literal(sparkGetBalanceMethodName),
1097
+ params: sparkGetBalanceParamsSchema,
1098
+ id: v13.string()
1099
+ }).entries
1100
+ });
1101
+
1102
+ // src/request/types/sparkMethods/transfer.ts
1103
+ var v14 = __toESM(require("valibot"));
1104
+ var sparkTransferMethodName = "spark_transfer";
1105
+ var sparkTransferParamsSchema = v14.object({
1106
+ /**
1107
+ * Amount of SATS to transfer as a string or number.
1108
+ */
1109
+ amountSats: v14.union([v14.number(), v14.string()]),
1110
+ /**
1111
+ * The recipient's spark address.
1112
+ */
1113
+ receiverSparkAddress: v14.string()
1114
+ });
1115
+ var sparkTransferResultSchema = v14.object({
1116
+ /**
1117
+ * The ID of the transaction.
1118
+ */
1119
+ id: v14.string()
1120
+ });
1121
+ var sparkTransferRequestMessageSchema = v14.object({
1122
+ ...rpcRequestMessageSchema.entries,
1123
+ ...v14.object({
1124
+ method: v14.literal(sparkTransferMethodName),
1125
+ params: sparkTransferParamsSchema,
1126
+ id: v14.string()
1127
+ }).entries
1128
+ });
1129
+
1130
+ // src/request/types/sparkMethods/transferToken.ts
1131
+ var v15 = __toESM(require("valibot"));
1132
+ var sparkTransferTokenMethodName = "spark_transferToken";
1133
+ var sparkTransferTokenParamsSchema = v15.object({
1134
+ /**
1135
+ * Amount of units of the token to transfer as a string or number.
1136
+ */
1137
+ tokenAmount: v15.union([v15.number(), v15.string()]),
1138
+ /**
1139
+ * The token identifier.
1140
+ */
1141
+ tokenIdentifier: v15.string(),
1142
+ /**
1143
+ * The recipient's spark address.
1144
+ */
1145
+ receiverSparkAddress: v15.string()
1146
+ });
1147
+ var sparkTransferTokenResultSchema = v15.object({
1148
+ /**
1149
+ * The ID of the transaction.
1150
+ */
1151
+ id: v15.string()
1152
+ });
1153
+ var sparkTransferTokenRequestMessageSchema = v15.object({
1154
+ ...rpcRequestMessageSchema.entries,
1155
+ ...v15.object({
1156
+ method: v15.literal(sparkTransferTokenMethodName),
1157
+ params: sparkTransferTokenParamsSchema,
1158
+ id: v15.string()
1159
+ }).entries
1160
+ });
1161
+
1162
+ // src/request/types/stxMethods/callContract.ts
1163
+ var v16 = __toESM(require("valibot"));
1164
+ var stxCallContractMethodName = "stx_callContract";
1165
+ var stxCallContractParamsSchema = v16.object({
1166
+ /**
1167
+ * The contract principal.
1168
+ *
1169
+ * E.g. `"SPKE...GD5C.my-contract"`
1170
+ */
1171
+ contract: v16.string(),
1172
+ /**
1173
+ * The name of the function to call.
1174
+ *
1175
+ * Note: spec changes ongoing,
1176
+ * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1177
+ */
1178
+ functionName: v16.string(),
1179
+ /**
1180
+ * @deprecated in favor of `functionArgs` for @stacks/connect compatibility
1181
+ */
1182
+ arguments: v16.optional(v16.array(v16.string())),
1183
+ /**
1184
+ * The function's arguments. The arguments are expected to be hex-encoded
1185
+ * strings of Clarity values.
1186
+ *
1187
+ * To convert Clarity values to their hex representation, the `cvToHex`
1188
+ * helper from the `@stacks/transactions` package may be helpful.
1189
+ *
1190
+ * ```js
1191
+ * import { cvToHex } from '@stacks/transactions';
1192
+ *
1193
+ * const functionArgs = [someClarityValue1, someClarityValue2];
1194
+ * const hexArgs = functionArgs.map(cvToHex);
1195
+ * ```
1196
+ */
1197
+ functionArgs: v16.optional(v16.array(v16.string())),
1198
+ /**
1199
+ * The post conditions to apply to the contract call.
1200
+ */
1201
+ postConditions: v16.optional(v16.array(v16.string())),
1202
+ /**
1203
+ * The mode to apply to the post conditions.
1204
+ */
1205
+ postConditionMode: v16.optional(v16.union([v16.literal("allow"), v16.literal("deny")]))
1206
+ });
1207
+ var stxCallContractResultSchema = v16.object({
1208
+ /**
1209
+ * The ID of the transaction.
1210
+ */
1211
+ txid: v16.string(),
1212
+ /**
1213
+ * A Stacks transaction as a hex-encoded string.
1214
+ */
1215
+ transaction: v16.string()
1216
+ });
1217
+ var stxCallContractRequestMessageSchema = v16.object({
1218
+ ...rpcRequestMessageSchema.entries,
1219
+ ...v16.object({
1220
+ method: v16.literal(stxCallContractMethodName),
1221
+ params: stxCallContractParamsSchema,
1222
+ id: v16.string()
1223
+ }).entries
1224
+ });
1225
+
1226
+ // src/request/types/stxMethods/deployContract.ts
1227
+ var v17 = __toESM(require("valibot"));
1228
+ var stxDeployContractMethodName = "stx_deployContract";
1229
+ var stxDeployContractParamsSchema = v17.object({
1230
+ /**
1231
+ * Name of the contract.
1232
+ */
1233
+ name: v17.string(),
1234
+ /**
1235
+ * The source code of the Clarity contract.
1236
+ */
1237
+ clarityCode: v17.string(),
1238
+ /**
1239
+ * The version of the Clarity contract.
1240
+ */
1241
+ clarityVersion: v17.optional(v17.number()),
1242
+ /**
1243
+ * The post conditions to apply to the contract call.
1244
+ */
1245
+ postConditions: v17.optional(v17.array(v17.string())),
1246
+ /**
1247
+ * The mode to apply to the post conditions.
1248
+ */
1249
+ postConditionMode: v17.optional(v17.union([v17.literal("allow"), v17.literal("deny")]))
1250
+ });
1251
+ var stxDeployContractResultSchema = v17.object({
1252
+ /**
1253
+ * The ID of the transaction.
1254
+ */
1255
+ txid: v17.string(),
1256
+ /**
1257
+ * A Stacks transaction as a hex-encoded string.
1258
+ */
1259
+ transaction: v17.string()
1260
+ });
1261
+ var stxDeployContractRequestMessageSchema = v17.object({
1262
+ ...rpcRequestMessageSchema.entries,
1263
+ ...v17.object({
1264
+ method: v17.literal(stxDeployContractMethodName),
1265
+ params: stxDeployContractParamsSchema,
1266
+ id: v17.string()
1267
+ }).entries
1268
+ });
1269
+
1270
+ // src/request/types/stxMethods/getAccounts.ts
1271
+ var v18 = __toESM(require("valibot"));
1272
+ var stxGetAccountsMethodName = "stx_getAccounts";
1273
+ var stxGetAccountsParamsSchema = v18.nullish(v18.null());
1274
+ var stxGetAccountsResultSchema = v18.object({
1275
+ /**
1276
+ * The addresses generated for the given purposes.
1277
+ */
1278
+ addresses: v18.array(
1279
+ v18.object({
1280
+ address: v18.string(),
1281
+ publicKey: v18.string(),
1282
+ gaiaHubUrl: v18.string(),
1283
+ gaiaAppKey: v18.string()
1284
+ })
1285
+ ),
1286
+ network: getNetworkResultSchema
1287
+ });
1288
+ var stxGetAccountsRequestMessageSchema = v18.object({
1289
+ ...rpcRequestMessageSchema.entries,
1290
+ ...v18.object({
1291
+ method: v18.literal(stxGetAccountsMethodName),
1292
+ params: stxGetAccountsParamsSchema,
1293
+ id: v18.string()
1294
+ }).entries
1295
+ });
1296
+
1297
+ // src/request/types/stxMethods/getAddresses.ts
1298
+ var v19 = __toESM(require("valibot"));
754
1299
  var stxGetAddressesMethodName = "stx_getAddresses";
755
- var stxGetAddressesParamsSchema = v9.nullish(
756
- v9.object({
1300
+ var stxGetAddressesParamsSchema = v19.nullish(
1301
+ v19.object({
757
1302
  /**
758
1303
  * A message to be displayed to the user in the request prompt.
759
1304
  */
760
- message: v9.optional(v9.string())
1305
+ message: v19.optional(v19.string())
761
1306
  })
762
1307
  );
763
- var stxGetAddressesResultSchema = v9.object({
1308
+ var stxGetAddressesResultSchema = v19.object({
764
1309
  /**
765
1310
  * The addresses generated for the given purposes.
766
1311
  */
767
- addresses: v9.array(addressSchema),
1312
+ addresses: v19.array(addressSchema),
768
1313
  network: getNetworkResultSchema
769
1314
  });
770
- var stxGetAddressesRequestMessageSchema = v9.object({
1315
+ var stxGetAddressesRequestMessageSchema = v19.object({
771
1316
  ...rpcRequestMessageSchema.entries,
772
- ...v9.object({
773
- method: v9.literal(stxGetAddressesMethodName),
1317
+ ...v19.object({
1318
+ method: v19.literal(stxGetAddressesMethodName),
774
1319
  params: stxGetAddressesParamsSchema,
775
- id: v9.string()
1320
+ id: v19.string()
776
1321
  }).entries
777
1322
  });
778
1323
 
779
1324
  // src/request/types/stxMethods/signMessage.ts
780
- var v10 = __toESM(require("valibot"));
1325
+ var v20 = __toESM(require("valibot"));
781
1326
  var stxSignMessageMethodName = "stx_signMessage";
782
- var stxSignMessageParamsSchema = v10.object({
1327
+ var stxSignMessageParamsSchema = v20.object({
783
1328
  /**
784
1329
  * The message to sign.
785
1330
  */
786
- message: v10.string()
1331
+ message: v20.string()
787
1332
  });
788
- var stxSignMessageResultSchema = v10.object({
1333
+ var stxSignMessageResultSchema = v20.object({
789
1334
  /**
790
1335
  * The signature of the message.
791
1336
  */
792
- signature: v10.string(),
1337
+ signature: v20.string(),
793
1338
  /**
794
1339
  * The public key used to sign the message.
795
1340
  */
796
- publicKey: v10.string()
1341
+ publicKey: v20.string()
797
1342
  });
798
- var stxSignMessageRequestMessageSchema = v10.object({
1343
+ var stxSignMessageRequestMessageSchema = v20.object({
799
1344
  ...rpcRequestMessageSchema.entries,
800
- ...v10.object({
801
- method: v10.literal(stxSignMessageMethodName),
1345
+ ...v20.object({
1346
+ method: v20.literal(stxSignMessageMethodName),
802
1347
  params: stxSignMessageParamsSchema,
803
- id: v10.string()
1348
+ id: v20.string()
804
1349
  }).entries
805
1350
  });
806
1351
 
807
1352
  // src/request/types/stxMethods/signStructuredMessage.ts
808
- var v11 = __toESM(require("valibot"));
1353
+ var v21 = __toESM(require("valibot"));
809
1354
  var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
810
- var stxSignStructuredMessageParamsSchema = v11.object({
1355
+ var stxSignStructuredMessageParamsSchema = v21.object({
811
1356
  /**
812
1357
  * The domain to be signed.
813
1358
  */
814
- domain: v11.string(),
1359
+ domain: v21.string(),
815
1360
  /**
816
1361
  * Message payload to be signed.
817
1362
  */
818
- message: v11.string(),
1363
+ message: v21.string(),
819
1364
  /**
820
1365
  * The public key to sign the message with.
821
1366
  */
822
- publicKey: v11.optional(v11.string())
1367
+ publicKey: v21.optional(v21.string())
823
1368
  });
824
- var stxSignStructuredMessageResultSchema = v11.object({
1369
+ var stxSignStructuredMessageResultSchema = v21.object({
825
1370
  /**
826
1371
  * Signature of the message.
827
1372
  */
828
- signature: v11.string(),
1373
+ signature: v21.string(),
829
1374
  /**
830
1375
  * Public key as hex-encoded string.
831
1376
  */
832
- publicKey: v11.string()
1377
+ publicKey: v21.string()
833
1378
  });
834
- var stxSignStructuredMessageRequestMessageSchema = v11.object({
1379
+ var stxSignStructuredMessageRequestMessageSchema = v21.object({
835
1380
  ...rpcRequestMessageSchema.entries,
836
- ...v11.object({
837
- method: v11.literal(stxSignStructuredMessageMethodName),
1381
+ ...v21.object({
1382
+ method: v21.literal(stxSignStructuredMessageMethodName),
838
1383
  params: stxSignStructuredMessageParamsSchema,
839
- id: v11.string()
1384
+ id: v21.string()
840
1385
  }).entries
841
1386
  });
842
1387
 
843
1388
  // src/request/types/stxMethods/signTransaction.ts
844
- var v12 = __toESM(require("valibot"));
1389
+ var v22 = __toESM(require("valibot"));
845
1390
  var stxSignTransactionMethodName = "stx_signTransaction";
846
- var stxSignTransactionParamsSchema = v12.object({
1391
+ var stxSignTransactionParamsSchema = v22.object({
847
1392
  /**
848
1393
  * The transaction to sign as a hex-encoded string.
849
1394
  */
850
- transaction: v12.string(),
1395
+ transaction: v22.string(),
851
1396
  /**
852
1397
  * The public key to sign the transaction with. The wallet may use any key
853
1398
  * when not provided.
854
1399
  */
855
- pubkey: v12.optional(v12.string()),
1400
+ pubkey: v22.optional(v22.string()),
856
1401
  /**
857
1402
  * Whether to broadcast the transaction after signing. Defaults to `true`.
858
1403
  */
859
- broadcast: v12.optional(v12.boolean())
1404
+ broadcast: v22.optional(v22.boolean())
860
1405
  });
861
- var stxSignTransactionResultSchema = v12.object({
1406
+ var stxSignTransactionResultSchema = v22.object({
862
1407
  /**
863
1408
  * The signed transaction as a hex-encoded string.
864
1409
  */
865
- transaction: v12.string()
1410
+ transaction: v22.string()
866
1411
  });
867
- var stxSignTransactionRequestMessageSchema = v12.object({
1412
+ var stxSignTransactionRequestMessageSchema = v22.object({
868
1413
  ...rpcRequestMessageSchema.entries,
869
- ...v12.object({
870
- method: v12.literal(stxSignTransactionMethodName),
1414
+ ...v22.object({
1415
+ method: v22.literal(stxSignTransactionMethodName),
871
1416
  params: stxSignTransactionParamsSchema,
872
- id: v12.string()
1417
+ id: v22.string()
873
1418
  }).entries
874
1419
  });
875
1420
 
876
1421
  // src/request/types/stxMethods/signTransactions.ts
877
- var v13 = __toESM(require("valibot"));
1422
+ var v23 = __toESM(require("valibot"));
878
1423
  var stxSignTransactionsMethodName = "stx_signTransactions";
879
- var stxSignTransactionsParamsSchema = v13.object({
1424
+ var stxSignTransactionsParamsSchema = v23.object({
880
1425
  /**
881
1426
  * The transactions to sign as hex-encoded strings.
882
1427
  */
883
- transactions: v13.pipe(
884
- v13.array(
885
- v13.pipe(
886
- v13.string(),
887
- v13.check((hex) => {
1428
+ transactions: v23.pipe(
1429
+ v23.array(
1430
+ v23.pipe(
1431
+ v23.string(),
1432
+ v23.check((hex) => {
888
1433
  return true;
889
1434
  }, "Invalid hex-encoded Stacks transaction.")
890
1435
  )
891
1436
  ),
892
- v13.minLength(1)
1437
+ v23.minLength(1)
893
1438
  ),
894
1439
  /**
895
1440
  * Whether the signed transactions should be broadcast after signing. Defaults
896
1441
  * to `true`.
897
1442
  */
898
- broadcast: v13.optional(v13.boolean())
1443
+ broadcast: v23.optional(v23.boolean())
899
1444
  });
900
- var stxSignTransactionsResultSchema = v13.object({
1445
+ var stxSignTransactionsResultSchema = v23.object({
901
1446
  /**
902
1447
  * The signed transactions as hex-encoded strings, in the same order as in the
903
1448
  * sign request.
904
1449
  */
905
- transactions: v13.array(v13.string())
1450
+ transactions: v23.array(v23.string())
906
1451
  });
907
- var stxSignTransactionsRequestMessageSchema = v13.object({
1452
+ var stxSignTransactionsRequestMessageSchema = v23.object({
908
1453
  ...rpcRequestMessageSchema.entries,
909
- ...v13.object({
910
- method: v13.literal(stxSignTransactionsMethodName),
1454
+ ...v23.object({
1455
+ method: v23.literal(stxSignTransactionsMethodName),
911
1456
  params: stxSignTransactionsParamsSchema,
912
- id: v13.string()
1457
+ id: v23.string()
913
1458
  }).entries
914
1459
  });
915
1460
 
916
1461
  // src/request/types/stxMethods/transferStx.ts
917
- var v14 = __toESM(require("valibot"));
1462
+ var v24 = __toESM(require("valibot"));
918
1463
  var stxTransferStxMethodName = "stx_transferStx";
919
- var stxTransferStxParamsSchema = v14.object({
1464
+ var stxTransferStxParamsSchema = v24.object({
920
1465
  /**
921
1466
  * Amount of STX tokens to transfer in microstacks as a string. Anything
922
1467
  * parseable by `BigInt` is acceptable.
@@ -929,23 +1474,23 @@ var stxTransferStxParamsSchema = v14.object({
929
1474
  * const amount3 = '1234';
930
1475
  * ```
931
1476
  */
932
- amount: v14.union([v14.number(), v14.string()]),
1477
+ amount: v24.union([v24.number(), v24.string()]),
933
1478
  /**
934
- * The recipeint's principal.
1479
+ * The recipient's principal.
935
1480
  */
936
- recipient: v14.string(),
1481
+ recipient: v24.string(),
937
1482
  /**
938
1483
  * A string representing the memo.
939
1484
  */
940
- memo: v14.optional(v14.string()),
1485
+ memo: v24.optional(v24.string()),
941
1486
  /**
942
1487
  * Version of parameter format.
943
1488
  */
944
- version: v14.optional(v14.string()),
1489
+ version: v24.optional(v24.string()),
945
1490
  /**
946
1491
  * The mode of the post conditions.
947
1492
  */
948
- postConditionMode: v14.optional(v14.number()),
1493
+ postConditionMode: v24.optional(v24.number()),
949
1494
  /**
950
1495
  * A hex-encoded string representing the post conditions.
951
1496
  *
@@ -958,425 +1503,29 @@ var stxTransferStxParamsSchema = v14.object({
958
1503
  * const hexPostCondition = serializePostCondition(postCondition).toString('hex');
959
1504
  * ```
960
1505
  */
961
- postConditions: v14.optional(v14.array(v14.string())),
1506
+ postConditions: v24.optional(v24.array(v24.string())),
962
1507
  /**
963
1508
  * The public key to sign the transaction with. The wallet may use any key
964
1509
  * when not provided.
965
1510
  */
966
- pubkey: v14.optional(v14.string())
1511
+ pubkey: v24.optional(v24.string())
967
1512
  });
968
- var stxTransferStxResultSchema = v14.object({
1513
+ var stxTransferStxResultSchema = v24.object({
969
1514
  /**
970
1515
  * The ID of the transaction.
971
1516
  */
972
- txid: v14.string(),
1517
+ txid: v24.string(),
973
1518
  /**
974
1519
  * A Stacks transaction as a hex-encoded string.
975
1520
  */
976
- transaction: v14.string()
1521
+ transaction: v24.string()
977
1522
  });
978
- var stxTransferStxRequestMessageSchema = v14.object({
1523
+ var stxTransferStxRequestMessageSchema = v24.object({
979
1524
  ...rpcRequestMessageSchema.entries,
980
- ...v14.object({
981
- method: v14.literal(stxTransferStxMethodName),
1525
+ ...v24.object({
1526
+ method: v24.literal(stxTransferStxMethodName),
982
1527
  params: stxTransferStxParamsSchema,
983
- id: v14.string()
984
- }).entries
985
- });
986
-
987
- // src/request/types/btcMethods.ts
988
- var v15 = __toESM(require("valibot"));
989
- var getInfoMethodName = "getInfo";
990
- var getInfoParamsSchema = v15.nullish(v15.null());
991
- var getInfoResultSchema = v15.object({
992
- /**
993
- * Version of the wallet.
994
- */
995
- version: v15.string(),
996
- /**
997
- * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
998
- */
999
- methods: v15.optional(v15.array(v15.string())),
1000
- /**
1001
- * List of WBIP standards supported by the wallet. Not currently used.
1002
- */
1003
- supports: v15.array(v15.string())
1004
- });
1005
- var getInfoRequestMessageSchema = v15.object({
1006
- ...rpcRequestMessageSchema.entries,
1007
- ...v15.object({
1008
- method: v15.literal(getInfoMethodName),
1009
- params: getInfoParamsSchema,
1010
- id: v15.string()
1011
- }).entries
1012
- });
1013
- var getAddressesMethodName = "getAddresses";
1014
- var getAddressesParamsSchema = v15.object({
1015
- /**
1016
- * The purposes for which to generate addresses. See
1017
- * {@linkcode AddressPurpose} for available purposes.
1018
- */
1019
- purposes: v15.array(v15.enum(AddressPurpose)),
1020
- /**
1021
- * A message to be displayed to the user in the request prompt.
1022
- */
1023
- message: v15.optional(v15.string())
1024
- });
1025
- var getAddressesResultSchema = v15.object({
1026
- /**
1027
- * The addresses generated for the given purposes.
1028
- */
1029
- addresses: v15.array(addressSchema),
1030
- network: getNetworkResultSchema
1031
- });
1032
- var getAddressesRequestMessageSchema = v15.object({
1033
- ...rpcRequestMessageSchema.entries,
1034
- ...v15.object({
1035
- method: v15.literal(getAddressesMethodName),
1036
- params: getAddressesParamsSchema,
1037
- id: v15.string()
1038
- }).entries
1039
- });
1040
- var signMessageMethodName = "signMessage";
1041
- var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
1042
- MessageSigningProtocols2["ECDSA"] = "ECDSA";
1043
- MessageSigningProtocols2["BIP322"] = "BIP322";
1044
- return MessageSigningProtocols2;
1045
- })(MessageSigningProtocols || {});
1046
- var signMessageParamsSchema = v15.object({
1047
- /**
1048
- * The address used for signing.
1049
- **/
1050
- address: v15.string(),
1051
- /**
1052
- * The message to sign.
1053
- **/
1054
- message: v15.string(),
1055
- /**
1056
- * The protocol to use for signing the message.
1057
- */
1058
- protocol: v15.optional(v15.enum(MessageSigningProtocols))
1059
- });
1060
- var signMessageResultSchema = v15.object({
1061
- /**
1062
- * The signature of the message.
1063
- */
1064
- signature: v15.string(),
1065
- /**
1066
- * hash of the message.
1067
- */
1068
- messageHash: v15.string(),
1069
- /**
1070
- * The address used for signing.
1071
- */
1072
- address: v15.string(),
1073
- /**
1074
- * The protocol to use for signing the message.
1075
- */
1076
- protocol: v15.enum(MessageSigningProtocols)
1077
- });
1078
- var signMessageRequestMessageSchema = v15.object({
1079
- ...rpcRequestMessageSchema.entries,
1080
- ...v15.object({
1081
- method: v15.literal(signMessageMethodName),
1082
- params: signMessageParamsSchema,
1083
- id: v15.string()
1084
- }).entries
1085
- });
1086
- var sendTransferMethodName = "sendTransfer";
1087
- var sendTransferParamsSchema = v15.object({
1088
- /**
1089
- * Array of recipients to send to.
1090
- * The amount to send to each recipient is in satoshis.
1091
- */
1092
- recipients: v15.array(
1093
- v15.object({
1094
- address: v15.string(),
1095
- amount: v15.number()
1096
- })
1097
- )
1098
- });
1099
- var sendTransferResultSchema = v15.object({
1100
- /**
1101
- * The transaction id as a hex-encoded string.
1102
- */
1103
- txid: v15.string()
1104
- });
1105
- var sendTransferRequestMessageSchema = v15.object({
1106
- ...rpcRequestMessageSchema.entries,
1107
- ...v15.object({
1108
- method: v15.literal(sendTransferMethodName),
1109
- params: sendTransferParamsSchema,
1110
- id: v15.string()
1111
- }).entries
1112
- });
1113
- var signPsbtMethodName = "signPsbt";
1114
- var signPsbtParamsSchema = v15.object({
1115
- /**
1116
- * The base64 encoded PSBT to sign.
1117
- */
1118
- psbt: v15.string(),
1119
- /**
1120
- * The inputs to sign.
1121
- * The key is the address and the value is an array of indexes of the inputs to sign.
1122
- */
1123
- signInputs: v15.optional(v15.record(v15.string(), v15.array(v15.number()))),
1124
- /**
1125
- * Whether to broadcast the transaction after signing.
1126
- **/
1127
- broadcast: v15.optional(v15.boolean())
1128
- });
1129
- var signPsbtResultSchema = v15.object({
1130
- /**
1131
- * The base64 encoded PSBT after signing.
1132
- */
1133
- psbt: v15.string(),
1134
- /**
1135
- * The transaction id as a hex-encoded string.
1136
- * This is only returned if the transaction was broadcast.
1137
- **/
1138
- txid: v15.optional(v15.string())
1139
- });
1140
- var signPsbtRequestMessageSchema = v15.object({
1141
- ...rpcRequestMessageSchema.entries,
1142
- ...v15.object({
1143
- method: v15.literal(signPsbtMethodName),
1144
- params: signPsbtParamsSchema,
1145
- id: v15.string()
1146
- }).entries
1147
- });
1148
- var getAccountsMethodName = "getAccounts";
1149
- var getAccountsParamsSchema = v15.object({
1150
- /**
1151
- * The purposes for which to generate addresses. See
1152
- * {@linkcode AddressPurpose} for available purposes.
1153
- */
1154
- purposes: v15.array(v15.enum(AddressPurpose)),
1155
- /**
1156
- * A message to be displayed to the user in the request prompt.
1157
- */
1158
- message: v15.optional(v15.string())
1159
- });
1160
- var getAccountsResultSchema = v15.array(
1161
- v15.object({
1162
- ...addressSchema.entries,
1163
- ...v15.object({
1164
- walletType: walletTypeSchema
1165
- }).entries
1166
- })
1167
- );
1168
- var getAccountsRequestMessageSchema = v15.object({
1169
- ...rpcRequestMessageSchema.entries,
1170
- ...v15.object({
1171
- method: v15.literal(getAccountsMethodName),
1172
- params: getAccountsParamsSchema,
1173
- id: v15.string()
1174
- }).entries
1175
- });
1176
- var getBalanceMethodName = "getBalance";
1177
- var getBalanceParamsSchema = v15.nullish(v15.null());
1178
- var getBalanceResultSchema = v15.object({
1179
- /**
1180
- * The confirmed balance of the wallet in sats. Using a string due to chrome
1181
- * messages not supporting bigint
1182
- * (https://issues.chromium.org/issues/40116184).
1183
- */
1184
- confirmed: v15.string(),
1185
- /**
1186
- * The unconfirmed balance of the wallet in sats. Using a string due to chrome
1187
- * messages not supporting bigint
1188
- * (https://issues.chromium.org/issues/40116184).
1189
- */
1190
- unconfirmed: v15.string(),
1191
- /**
1192
- * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
1193
- * sats. Using a string due to chrome messages not supporting bigint
1194
- * (https://issues.chromium.org/issues/40116184).
1195
- */
1196
- total: v15.string()
1197
- });
1198
- var getBalanceRequestMessageSchema = v15.object({
1199
- ...rpcRequestMessageSchema.entries,
1200
- ...v15.object({
1201
- method: v15.literal(getBalanceMethodName),
1202
- id: v15.string()
1203
- }).entries
1204
- });
1205
-
1206
- // src/request/types/runesMethods/etch.ts
1207
- var v16 = __toESM(require("valibot"));
1208
- var runesEtchMethodName = "runes_etch";
1209
- var etchTermsSchema = v16.object({
1210
- amount: v16.string(),
1211
- cap: v16.string(),
1212
- heightStart: v16.optional(v16.string()),
1213
- heightEnd: v16.optional(v16.string()),
1214
- offsetStart: v16.optional(v16.string()),
1215
- offsetEnd: v16.optional(v16.string())
1216
- });
1217
- var inscriptionDetailsSchema = v16.object({
1218
- contentType: v16.string(),
1219
- contentBase64: v16.string()
1220
- });
1221
- var runesEtchParamsSchema = v16.object({
1222
- runeName: v16.string(),
1223
- divisibility: v16.optional(v16.number()),
1224
- symbol: v16.optional(v16.string()),
1225
- premine: v16.optional(v16.string()),
1226
- isMintable: v16.boolean(),
1227
- delegateInscriptionId: v16.optional(v16.string()),
1228
- destinationAddress: v16.string(),
1229
- refundAddress: v16.string(),
1230
- feeRate: v16.number(),
1231
- appServiceFee: v16.optional(v16.number()),
1232
- appServiceFeeAddress: v16.optional(v16.string()),
1233
- terms: v16.optional(etchTermsSchema),
1234
- inscriptionDetails: v16.optional(inscriptionDetailsSchema),
1235
- network: v16.optional(v16.enum(BitcoinNetworkType))
1236
- });
1237
- var runesEtchResultSchema = v16.object({
1238
- orderId: v16.string(),
1239
- fundTransactionId: v16.string(),
1240
- fundingAddress: v16.string()
1241
- });
1242
- var runesEtchRequestMessageSchema = v16.object({
1243
- ...rpcRequestMessageSchema.entries,
1244
- ...v16.object({
1245
- method: v16.literal(runesEtchMethodName),
1246
- params: runesEtchParamsSchema,
1247
- id: v16.string()
1248
- }).entries
1249
- });
1250
-
1251
- // src/request/types/runesMethods/getBalance.ts
1252
- var v17 = __toESM(require("valibot"));
1253
- var runesGetBalanceMethodName = "runes_getBalance";
1254
- var runesGetBalanceParamsSchema = v17.nullish(v17.null());
1255
- var runesGetBalanceResultSchema = v17.object({
1256
- balances: v17.array(
1257
- v17.object({
1258
- runeName: v17.string(),
1259
- amount: v17.string(),
1260
- divisibility: v17.number(),
1261
- symbol: v17.string(),
1262
- inscriptionId: v17.nullish(v17.string()),
1263
- spendableBalance: v17.string()
1264
- })
1265
- )
1266
- });
1267
- var runesGetBalanceRequestMessageSchema = v17.object({
1268
- ...rpcRequestMessageSchema.entries,
1269
- ...v17.object({
1270
- method: v17.literal(runesGetBalanceMethodName),
1271
- params: runesGetBalanceParamsSchema,
1272
- id: v17.string()
1273
- }).entries
1274
- });
1275
-
1276
- // src/request/types/runesMethods/mint.ts
1277
- var v18 = __toESM(require("valibot"));
1278
- var runesMintMethodName = "runes_mint";
1279
- var runesMintParamsSchema = v18.object({
1280
- appServiceFee: v18.optional(v18.number()),
1281
- appServiceFeeAddress: v18.optional(v18.string()),
1282
- destinationAddress: v18.string(),
1283
- feeRate: v18.number(),
1284
- refundAddress: v18.string(),
1285
- repeats: v18.number(),
1286
- runeName: v18.string(),
1287
- network: v18.optional(v18.enum(BitcoinNetworkType))
1288
- });
1289
- var runesMintResultSchema = v18.object({
1290
- orderId: v18.string(),
1291
- fundTransactionId: v18.string(),
1292
- fundingAddress: v18.string()
1293
- });
1294
- var runesMintRequestMessageSchema = v18.object({
1295
- ...rpcRequestMessageSchema.entries,
1296
- ...v18.object({
1297
- method: v18.literal(runesMintMethodName),
1298
- params: runesMintParamsSchema,
1299
- id: v18.string()
1300
- }).entries
1301
- });
1302
-
1303
- // src/request/types/runesMethods/transfer.ts
1304
- var v19 = __toESM(require("valibot"));
1305
- var runesTransferMethodName = "runes_transfer";
1306
- var runesTransferParamsSchema = v19.object({
1307
- recipients: v19.array(
1308
- v19.object({
1309
- runeName: v19.string(),
1310
- amount: v19.string(),
1311
- address: v19.string()
1312
- })
1313
- )
1314
- });
1315
- var runesTransferResultSchema = v19.object({
1316
- txid: v19.string()
1317
- });
1318
- var runesTransferRequestMessageSchema = v19.object({
1319
- ...rpcRequestMessageSchema.entries,
1320
- ...v19.object({
1321
- method: v19.literal(runesTransferMethodName),
1322
- params: runesTransferParamsSchema,
1323
- id: v19.string()
1324
- }).entries
1325
- });
1326
-
1327
- // src/request/types/ordinalsMethods.ts
1328
- var v20 = __toESM(require("valibot"));
1329
- var getInscriptionsMethodName = "ord_getInscriptions";
1330
- var getInscriptionsParamsSchema = v20.object({
1331
- offset: v20.number(),
1332
- limit: v20.number()
1333
- });
1334
- var getInscriptionsResultSchema = v20.object({
1335
- total: v20.number(),
1336
- limit: v20.number(),
1337
- offset: v20.number(),
1338
- inscriptions: v20.array(
1339
- v20.object({
1340
- inscriptionId: v20.string(),
1341
- inscriptionNumber: v20.string(),
1342
- address: v20.string(),
1343
- collectionName: v20.optional(v20.string()),
1344
- postage: v20.string(),
1345
- contentLength: v20.string(),
1346
- contentType: v20.string(),
1347
- timestamp: v20.number(),
1348
- offset: v20.number(),
1349
- genesisTransaction: v20.string(),
1350
- output: v20.string()
1351
- })
1352
- )
1353
- });
1354
- var getInscriptionsRequestMessageSchema = v20.object({
1355
- ...rpcRequestMessageSchema.entries,
1356
- ...v20.object({
1357
- method: v20.literal(getInscriptionsMethodName),
1358
- params: getInscriptionsParamsSchema,
1359
- id: v20.string()
1360
- }).entries
1361
- });
1362
- var sendInscriptionsMethodName = "ord_sendInscriptions";
1363
- var sendInscriptionsParamsSchema = v20.object({
1364
- transfers: v20.array(
1365
- v20.object({
1366
- address: v20.string(),
1367
- inscriptionId: v20.string()
1368
- })
1369
- )
1370
- });
1371
- var sendInscriptionsResultSchema = v20.object({
1372
- txid: v20.string()
1373
- });
1374
- var sendInscriptionsRequestMessageSchema = v20.object({
1375
- ...rpcRequestMessageSchema.entries,
1376
- ...v20.object({
1377
- method: v20.literal(sendInscriptionsMethodName),
1378
- params: sendInscriptionsParamsSchema,
1379
- id: v20.string()
1528
+ id: v24.string()
1380
1529
  }).entries
1381
1530
  });
1382
1531
 
@@ -1393,13 +1542,13 @@ var request = async (method, params, providerId) => {
1393
1542
  throw new Error("A wallet method is required");
1394
1543
  }
1395
1544
  const response = await provider.request(method, params);
1396
- if (v21.is(rpcErrorResponseMessageSchema, response)) {
1545
+ if (v25.is(rpcErrorResponseMessageSchema, response)) {
1397
1546
  return {
1398
1547
  status: "error",
1399
1548
  error: response.error
1400
1549
  };
1401
1550
  }
1402
- if (v21.is(rpcSuccessResponseMessageSchema, response)) {
1551
+ if (v25.is(rpcSuccessResponseMessageSchema, response)) {
1403
1552
  return {
1404
1553
  status: "success",
1405
1554
  result: response.result
@@ -1962,7 +2111,7 @@ var UnisatAdapter = class extends SatsConnectAdapter {
1962
2111
  id = DefaultAdaptersInfo.unisat.id;
1963
2112
  async getAccounts(params) {
1964
2113
  const { purposes } = params;
1965
- if (purposes.includes("stacks" /* Stacks */)) {
2114
+ if (purposes.includes("stacks" /* Stacks */) || purposes.includes("starknet" /* Starknet */) || purposes.includes("spark" /* Spark */)) {
1966
2115
  throw new Error("Only bitcoin addresses are supported");
1967
2116
  }
1968
2117
  const accounts = await window.unisat.requestAccounts();
@@ -2422,6 +2571,7 @@ var signMultipleTransactions = async (options) => {
2422
2571
  RpcErrorCode,
2423
2572
  RpcIdSchema,
2424
2573
  SatsConnectAdapter,
2574
+ SparkNetworkType,
2425
2575
  StacksNetworkType,
2426
2576
  StarknetNetworkType,
2427
2577
  accountActionsSchema,
@@ -2553,6 +2703,22 @@ var signMultipleTransactions = async (options) => {
2553
2703
  signPsbtRequestMessageSchema,
2554
2704
  signPsbtResultSchema,
2555
2705
  signTransaction,
2706
+ sparkGetAddressesMethodName,
2707
+ sparkGetAddressesParamsSchema,
2708
+ sparkGetAddressesRequestMessageSchema,
2709
+ sparkGetAddressesResultSchema,
2710
+ sparkGetBalanceMethodName,
2711
+ sparkGetBalanceParamsSchema,
2712
+ sparkGetBalanceRequestMessageSchema,
2713
+ sparkGetBalanceResultSchema,
2714
+ sparkTransferMethodName,
2715
+ sparkTransferParamsSchema,
2716
+ sparkTransferRequestMessageSchema,
2717
+ sparkTransferResultSchema,
2718
+ sparkTransferTokenMethodName,
2719
+ sparkTransferTokenParamsSchema,
2720
+ sparkTransferTokenRequestMessageSchema,
2721
+ sparkTransferTokenResultSchema,
2556
2722
  stxCallContractMethodName,
2557
2723
  stxCallContractParamsSchema,
2558
2724
  stxCallContractRequestMessageSchema,