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