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