@sats-connect/core 0.4.0-8f3e1e5 → 0.4.0-8f77109
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 +668 -620
- package/dist/index.d.ts +1694 -0
- package/dist/index.js +2311 -0
- package/dist/index.mjs +732 -272
- package/package.json +9 -13
package/dist/index.d.mts
CHANGED
|
@@ -42,15 +42,15 @@ type SignMessageOptions = RequestOptions<SignMessagePayload, SignMessageResponse
|
|
|
42
42
|
|
|
43
43
|
declare const signMessage: (options: SignMessageOptions) => Promise<void>;
|
|
44
44
|
|
|
45
|
-
interface Recipient
|
|
45
|
+
interface Recipient {
|
|
46
46
|
address: string;
|
|
47
47
|
amountSats: bigint;
|
|
48
48
|
}
|
|
49
|
-
type SerializedRecipient = Omit<Recipient
|
|
49
|
+
type SerializedRecipient = Omit<Recipient, 'amountSats'> & {
|
|
50
50
|
amountSats: string;
|
|
51
51
|
};
|
|
52
52
|
interface SendBtcTransactionPayload extends RequestPayload {
|
|
53
|
-
recipients: Recipient
|
|
53
|
+
recipients: Recipient[];
|
|
54
54
|
senderAddress: string;
|
|
55
55
|
message?: string;
|
|
56
56
|
}
|
|
@@ -193,7 +193,7 @@ declare const rpcRequestMessageSchema: v.ObjectSchema<{
|
|
|
193
193
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
194
194
|
readonly method: v.StringSchema<undefined>;
|
|
195
195
|
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, never>;
|
|
196
|
-
readonly id: v.
|
|
196
|
+
readonly id: v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>, v.NullSchema<undefined>], undefined>;
|
|
197
197
|
}, undefined>;
|
|
198
198
|
type RpcRequestMessage = v.InferOutput<typeof rpcRequestMessageSchema>;
|
|
199
199
|
interface RpcBase {
|
|
@@ -313,9 +313,9 @@ declare const addressSchema: v.ObjectSchema<{
|
|
|
313
313
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
314
314
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
315
315
|
}, undefined>;
|
|
316
|
-
type Address
|
|
316
|
+
type Address = v.InferOutput<typeof addressSchema>;
|
|
317
317
|
interface GetAddressResponse {
|
|
318
|
-
addresses: Address
|
|
318
|
+
addresses: Address[];
|
|
319
319
|
}
|
|
320
320
|
type GetAddressOptions = RequestOptions<GetAddressPayload, GetAddressResponse>;
|
|
321
321
|
|
|
@@ -455,61 +455,92 @@ declare const signMessageRequestMessageSchema: v.ObjectSchema<{
|
|
|
455
455
|
}, undefined>;
|
|
456
456
|
type SignMessageRequestMessage = v.InferOutput<typeof signMessageRequestMessageSchema>;
|
|
457
457
|
type SignMessage = MethodParamsAndResult<v.InferOutput<typeof signMessageParamsSchema>, v.InferOutput<typeof signMessageResultSchema>>;
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
* The recipient's address.
|
|
461
|
-
**/
|
|
462
|
-
address: string;
|
|
463
|
-
/**
|
|
464
|
-
* The amount to send to the recipient in satoshis.
|
|
465
|
-
*/
|
|
466
|
-
amount: number;
|
|
467
|
-
};
|
|
468
|
-
type SendTransferParams = {
|
|
458
|
+
declare const sendTransferMethodName = "sendTransfer";
|
|
459
|
+
declare const sendTransferParamsSchema: v.ObjectSchema<{
|
|
469
460
|
/**
|
|
470
461
|
* Array of recipients to send to.
|
|
471
462
|
* The amount to send to each recipient is in satoshis.
|
|
472
463
|
*/
|
|
473
|
-
recipients:
|
|
474
|
-
|
|
475
|
-
|
|
464
|
+
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
465
|
+
readonly address: v.StringSchema<undefined>;
|
|
466
|
+
readonly amount: v.NumberSchema<undefined>;
|
|
467
|
+
}, undefined>, undefined>;
|
|
468
|
+
}, undefined>;
|
|
469
|
+
type SendTransferParams = v.InferOutput<typeof sendTransferParamsSchema>;
|
|
470
|
+
declare const sendTransferResultSchema: v.ObjectSchema<{
|
|
476
471
|
/**
|
|
477
472
|
* The transaction id as a hex-encoded string.
|
|
478
473
|
*/
|
|
479
|
-
txid:
|
|
480
|
-
}
|
|
474
|
+
readonly txid: v.StringSchema<undefined>;
|
|
475
|
+
}, undefined>;
|
|
476
|
+
type SendTransferResult = v.InferOutput<typeof sendTransferResultSchema>;
|
|
477
|
+
declare const sendTransferRequestMessageSchema: v.ObjectSchema<{
|
|
478
|
+
readonly method: v.LiteralSchema<"sendTransfer", undefined>;
|
|
479
|
+
readonly params: v.ObjectSchema<{
|
|
480
|
+
/**
|
|
481
|
+
* Array of recipients to send to.
|
|
482
|
+
* The amount to send to each recipient is in satoshis.
|
|
483
|
+
*/
|
|
484
|
+
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
485
|
+
readonly address: v.StringSchema<undefined>;
|
|
486
|
+
readonly amount: v.NumberSchema<undefined>;
|
|
487
|
+
}, undefined>, undefined>;
|
|
488
|
+
}, undefined>;
|
|
489
|
+
readonly id: v.StringSchema<undefined>;
|
|
490
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
491
|
+
}, undefined>;
|
|
492
|
+
type SendTransferRequestMessage = v.InferOutput<typeof sendTransferRequestMessageSchema>;
|
|
481
493
|
type SendTransfer = MethodParamsAndResult<SendTransferParams, SendTransferResult>;
|
|
482
|
-
|
|
494
|
+
declare const signPsbtMethodName = "signPsbt";
|
|
495
|
+
declare const signPsbtParamsSchema: v.ObjectSchema<{
|
|
483
496
|
/**
|
|
484
497
|
* The base64 encoded PSBT to sign.
|
|
485
498
|
*/
|
|
486
|
-
psbt:
|
|
499
|
+
readonly psbt: v.StringSchema<undefined>;
|
|
487
500
|
/**
|
|
488
501
|
* The inputs to sign.
|
|
489
502
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
490
503
|
*/
|
|
491
|
-
signInputs:
|
|
492
|
-
/**
|
|
493
|
-
* the sigHash type to use for signing.
|
|
494
|
-
* will default to the sighash type of the input if not provided.
|
|
495
|
-
**/
|
|
496
|
-
allowedSignHash?: number;
|
|
504
|
+
readonly signInputs: v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
497
505
|
/**
|
|
498
506
|
* Whether to broadcast the transaction after signing.
|
|
499
507
|
**/
|
|
500
|
-
broadcast
|
|
501
|
-
}
|
|
502
|
-
type
|
|
508
|
+
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
509
|
+
}, undefined>;
|
|
510
|
+
type SignPsbtParams = v.InferOutput<typeof signPsbtParamsSchema>;
|
|
511
|
+
declare const signPsbtResultSchema: v.ObjectSchema<{
|
|
503
512
|
/**
|
|
504
513
|
* The base64 encoded PSBT after signing.
|
|
505
514
|
*/
|
|
506
|
-
psbt:
|
|
515
|
+
readonly psbt: v.StringSchema<undefined>;
|
|
507
516
|
/**
|
|
508
517
|
* The transaction id as a hex-encoded string.
|
|
509
518
|
* This is only returned if the transaction was broadcast.
|
|
510
519
|
**/
|
|
511
|
-
txid
|
|
512
|
-
}
|
|
520
|
+
readonly txid: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
521
|
+
}, undefined>;
|
|
522
|
+
type SignPsbtResult = v.InferOutput<typeof signPsbtResultSchema>;
|
|
523
|
+
declare const signPsbtRequestMessageSchema: v.ObjectSchema<{
|
|
524
|
+
readonly method: v.LiteralSchema<"signPsbt", undefined>;
|
|
525
|
+
readonly params: v.ObjectSchema<{
|
|
526
|
+
/**
|
|
527
|
+
* The base64 encoded PSBT to sign.
|
|
528
|
+
*/
|
|
529
|
+
readonly psbt: v.StringSchema<undefined>;
|
|
530
|
+
/**
|
|
531
|
+
* The inputs to sign.
|
|
532
|
+
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
533
|
+
*/
|
|
534
|
+
readonly signInputs: v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
535
|
+
/**
|
|
536
|
+
* Whether to broadcast the transaction after signing.
|
|
537
|
+
**/
|
|
538
|
+
readonly broadcast: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
539
|
+
}, undefined>;
|
|
540
|
+
readonly id: v.StringSchema<undefined>;
|
|
541
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
542
|
+
}, undefined>;
|
|
543
|
+
type SignPsbtRequestMessage = v.InferOutput<typeof signPsbtRequestMessageSchema>;
|
|
513
544
|
type SignPsbt = MethodParamsAndResult<SignPsbtParams, SignPsbtResult>;
|
|
514
545
|
declare const getAccountsMethodName = "getAccounts";
|
|
515
546
|
declare const getAccountsParamsSchema: v.ObjectSchema<{
|
|
@@ -554,6 +585,7 @@ type GetAccountsRequestMessage = v.InferOutput<typeof getAccountsRequestMessageS
|
|
|
554
585
|
type GetAccounts = MethodParamsAndResult<v.InferOutput<typeof getAccountsParamsSchema>, v.InferOutput<typeof getAccountsResultSchema>>;
|
|
555
586
|
declare const getBalanceMethodName = "getBalance";
|
|
556
587
|
declare const getBalanceParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
588
|
+
type GetBalanceParams = v.InferOutput<typeof getBalanceParamsSchema>;
|
|
557
589
|
declare const getBalanceResultSchema: v.ObjectSchema<{
|
|
558
590
|
/**
|
|
559
591
|
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
@@ -574,19 +606,22 @@ declare const getBalanceResultSchema: v.ObjectSchema<{
|
|
|
574
606
|
*/
|
|
575
607
|
readonly total: v.StringSchema<undefined>;
|
|
576
608
|
}, undefined>;
|
|
609
|
+
type GetBalanceResult = v.InferOutput<typeof getBalanceResultSchema>;
|
|
577
610
|
declare const getBalanceRequestMessageSchema: v.ObjectSchema<{
|
|
578
611
|
readonly method: v.LiteralSchema<"getBalance", undefined>;
|
|
579
612
|
readonly id: v.StringSchema<undefined>;
|
|
580
613
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
581
614
|
readonly params: v.OptionalSchema<v.UnionSchema<[v.ArraySchema<v.UnknownSchema, undefined>, v.LooseObjectSchema<{}, undefined>, v.NullSchema<undefined>], undefined>, never>;
|
|
582
615
|
}, undefined>;
|
|
583
|
-
type
|
|
616
|
+
type GetBalanceRequestMessage = v.InferOutput<typeof getBalanceRequestMessageSchema>;
|
|
617
|
+
type GetBalance = MethodParamsAndResult<GetBalanceParams, GetBalanceResult>;
|
|
584
618
|
|
|
585
619
|
declare const getInscriptionsMethodName = "ord_getInscriptions";
|
|
586
620
|
declare const getInscriptionsParamsSchema: v.ObjectSchema<{
|
|
587
621
|
readonly offset: v.NumberSchema<undefined>;
|
|
588
622
|
readonly limit: v.NumberSchema<undefined>;
|
|
589
623
|
}, undefined>;
|
|
624
|
+
type GetInscriptionsParams = v.InferOutput<typeof getInscriptionsParamsSchema>;
|
|
590
625
|
declare const getInscriptionsResultSchema: v.ObjectSchema<{
|
|
591
626
|
readonly total: v.NumberSchema<undefined>;
|
|
592
627
|
readonly limit: v.NumberSchema<undefined>;
|
|
@@ -605,7 +640,8 @@ declare const getInscriptionsResultSchema: v.ObjectSchema<{
|
|
|
605
640
|
readonly output: v.StringSchema<undefined>;
|
|
606
641
|
}, undefined>, undefined>;
|
|
607
642
|
}, undefined>;
|
|
608
|
-
|
|
643
|
+
type GetInscriptionsResult = v.InferOutput<typeof getInscriptionsResultSchema>;
|
|
644
|
+
declare const getInscriptionsRequestMessageSchema: v.ObjectSchema<{
|
|
609
645
|
readonly method: v.LiteralSchema<"ord_getInscriptions", undefined>;
|
|
610
646
|
readonly params: v.ObjectSchema<{
|
|
611
647
|
readonly offset: v.NumberSchema<undefined>;
|
|
@@ -614,7 +650,8 @@ declare const getInscriptionsSchema: v.ObjectSchema<{
|
|
|
614
650
|
readonly id: v.StringSchema<undefined>;
|
|
615
651
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
616
652
|
}, undefined>;
|
|
617
|
-
type
|
|
653
|
+
type GetInscriptionsRequestMessage = v.InferOutput<typeof getInscriptionsRequestMessageSchema>;
|
|
654
|
+
type GetInscriptions = MethodParamsAndResult<GetInscriptionsParams, GetInscriptionsResult>;
|
|
618
655
|
declare const sendInscriptionsMethodName = "ord_sendInscriptions";
|
|
619
656
|
declare const sendInscriptionsParamsSchema: v.ObjectSchema<{
|
|
620
657
|
readonly transfers: v.ArraySchema<v.ObjectSchema<{
|
|
@@ -622,10 +659,12 @@ declare const sendInscriptionsParamsSchema: v.ObjectSchema<{
|
|
|
622
659
|
readonly inscriptionId: v.StringSchema<undefined>;
|
|
623
660
|
}, undefined>, undefined>;
|
|
624
661
|
}, undefined>;
|
|
662
|
+
type SendInscriptionsParams = v.InferOutput<typeof sendInscriptionsParamsSchema>;
|
|
625
663
|
declare const sendInscriptionsResultSchema: v.ObjectSchema<{
|
|
626
664
|
readonly txid: v.StringSchema<undefined>;
|
|
627
665
|
}, undefined>;
|
|
628
|
-
|
|
666
|
+
type SendInscriptionsResult = v.InferOutput<typeof sendInscriptionsResultSchema>;
|
|
667
|
+
declare const sendInscriptionsRequestMessageSchema: v.ObjectSchema<{
|
|
629
668
|
readonly method: v.LiteralSchema<"ord_sendInscriptions", undefined>;
|
|
630
669
|
readonly params: v.ObjectSchema<{
|
|
631
670
|
readonly transfers: v.ArraySchema<v.ObjectSchema<{
|
|
@@ -636,7 +675,8 @@ declare const sendInscriptionsSchema: v.ObjectSchema<{
|
|
|
636
675
|
readonly id: v.StringSchema<undefined>;
|
|
637
676
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
638
677
|
}, undefined>;
|
|
639
|
-
type
|
|
678
|
+
type SendInscriptionsRequestMessage = v.InferOutput<typeof sendInscriptionsRequestMessageSchema>;
|
|
679
|
+
type SendInscriptions = MethodParamsAndResult<SendInscriptionsParams, SendInscriptionsResult>;
|
|
640
680
|
|
|
641
681
|
type CreateMintOrderRequest = {
|
|
642
682
|
runeName: string;
|
|
@@ -704,55 +744,95 @@ type RBFOrderResponse = {
|
|
|
704
744
|
fundingAddress: string;
|
|
705
745
|
};
|
|
706
746
|
|
|
707
|
-
interface
|
|
708
|
-
network?: BitcoinNetworkType;
|
|
709
|
-
}
|
|
710
|
-
type EstimateRunesMintResult = EstimateOrderResponse;
|
|
711
|
-
type EstimateRunesMint = MethodParamsAndResult<EstimateRunesMintParams, EstimateRunesMintResult>;
|
|
712
|
-
interface MintRunesParams extends CreateMintOrderRequest {
|
|
713
|
-
network?: BitcoinNetworkType;
|
|
714
|
-
}
|
|
715
|
-
type MintRunesResult = {
|
|
716
|
-
orderId: string;
|
|
717
|
-
fundTransactionId: string;
|
|
718
|
-
fundingAddress: string;
|
|
719
|
-
};
|
|
720
|
-
type MintRunes = MethodParamsAndResult<MintRunesParams, MintRunesResult>;
|
|
721
|
-
interface EstimateRunesEtchParams extends EstimateEtchOrderRequest {
|
|
722
|
-
network?: BitcoinNetworkType;
|
|
723
|
-
}
|
|
724
|
-
type EstimateRunesEtchResult = EstimateOrderResponse;
|
|
725
|
-
type EstimateRunesEtch = MethodParamsAndResult<EstimateRunesEtchParams, EstimateRunesEtchResult>;
|
|
726
|
-
interface EtchRunesParams extends CreateEtchOrderRequest {
|
|
747
|
+
interface RunesEstimateEtchParams extends EstimateEtchOrderRequest {
|
|
727
748
|
network?: BitcoinNetworkType;
|
|
728
749
|
}
|
|
729
|
-
type
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
};
|
|
734
|
-
type EtchRunes = MethodParamsAndResult<EtchRunesParams, EtchRunesResult>;
|
|
735
|
-
interface GetOrderParams extends GetOrderRequest {
|
|
736
|
-
network?: BitcoinNetworkType;
|
|
737
|
-
}
|
|
738
|
-
type GetOrder = MethodParamsAndResult<GetOrderParams, GetOrderResponse>;
|
|
739
|
-
interface EstimateRbfOrderParams extends RBFOrderRequest {
|
|
750
|
+
type RunesEstimateEtchResult = EstimateOrderResponse;
|
|
751
|
+
type RunesEstimateEtch = MethodParamsAndResult<RunesEstimateEtchParams, RunesEstimateEtchResult>;
|
|
752
|
+
|
|
753
|
+
interface runesEstimateMintParams extends EstimateMintOrderRequest {
|
|
740
754
|
network?: BitcoinNetworkType;
|
|
741
755
|
}
|
|
742
|
-
type
|
|
743
|
-
|
|
756
|
+
type runesEstimateMintResult = EstimateOrderResponse;
|
|
757
|
+
type RunesEstimateMint = MethodParamsAndResult<runesEstimateMintParams, runesEstimateMintResult>;
|
|
758
|
+
|
|
759
|
+
interface RunesEstimateRbfOrderParams extends RBFOrderRequest {
|
|
744
760
|
network?: BitcoinNetworkType;
|
|
745
761
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
762
|
+
type RunesEstimateRbfOrder = MethodParamsAndResult<RunesEstimateRbfOrderParams, RBFOrderResponse>;
|
|
763
|
+
|
|
764
|
+
declare const runesEtchMethodName = "runes_etch";
|
|
765
|
+
declare const runesEtchParamsSchema: v.ObjectSchema<{
|
|
766
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
767
|
+
readonly divisibility: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
768
|
+
readonly symbol: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
769
|
+
readonly premine: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
770
|
+
readonly isMintable: v.BooleanSchema<undefined>;
|
|
771
|
+
readonly delegateInscriptionId: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
772
|
+
readonly destinationAddress: v.StringSchema<undefined>;
|
|
773
|
+
readonly refundAddress: v.StringSchema<undefined>;
|
|
774
|
+
readonly feeRate: v.NumberSchema<undefined>;
|
|
775
|
+
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
776
|
+
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
777
|
+
readonly terms: v.OptionalSchema<v.ObjectSchema<{
|
|
778
|
+
readonly amount: v.StringSchema<undefined>;
|
|
779
|
+
readonly cap: v.StringSchema<undefined>;
|
|
780
|
+
readonly heightStart: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
781
|
+
readonly heightEnd: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
782
|
+
readonly offsetStart: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
783
|
+
readonly offsetEnd: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
784
|
+
}, undefined>, never>;
|
|
785
|
+
readonly inscriptionDetails: v.OptionalSchema<v.ObjectSchema<{
|
|
786
|
+
readonly contentType: v.StringSchema<undefined>;
|
|
787
|
+
readonly contentBase64: v.StringSchema<undefined>;
|
|
788
|
+
}, undefined>, never>;
|
|
789
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, never>;
|
|
790
|
+
}, undefined>;
|
|
791
|
+
type RunesEtchParams = v.InferOutput<typeof runesEtchParamsSchema>;
|
|
792
|
+
declare const runesEtchResultSchema: v.ObjectSchema<{
|
|
793
|
+
readonly orderId: v.StringSchema<undefined>;
|
|
794
|
+
readonly fundTransactionId: v.StringSchema<undefined>;
|
|
795
|
+
readonly fundingAddress: v.StringSchema<undefined>;
|
|
796
|
+
}, undefined>;
|
|
797
|
+
type RunesEtchResult = v.InferOutput<typeof runesEtchResultSchema>;
|
|
798
|
+
declare const runesEtchRequestMessageSchema: v.ObjectSchema<{
|
|
799
|
+
readonly method: v.LiteralSchema<"runes_etch", undefined>;
|
|
800
|
+
readonly params: v.ObjectSchema<{
|
|
801
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
802
|
+
readonly divisibility: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
803
|
+
readonly symbol: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
804
|
+
readonly premine: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
805
|
+
readonly isMintable: v.BooleanSchema<undefined>;
|
|
806
|
+
readonly delegateInscriptionId: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
807
|
+
readonly destinationAddress: v.StringSchema<undefined>;
|
|
808
|
+
readonly refundAddress: v.StringSchema<undefined>;
|
|
809
|
+
readonly feeRate: v.NumberSchema<undefined>;
|
|
810
|
+
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
811
|
+
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
812
|
+
readonly terms: v.OptionalSchema<v.ObjectSchema<{
|
|
813
|
+
readonly amount: v.StringSchema<undefined>;
|
|
814
|
+
readonly cap: v.StringSchema<undefined>;
|
|
815
|
+
readonly heightStart: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
816
|
+
readonly heightEnd: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
817
|
+
readonly offsetStart: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
818
|
+
readonly offsetEnd: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
819
|
+
}, undefined>, never>;
|
|
820
|
+
readonly inscriptionDetails: v.OptionalSchema<v.ObjectSchema<{
|
|
821
|
+
readonly contentType: v.StringSchema<undefined>;
|
|
822
|
+
readonly contentBase64: v.StringSchema<undefined>;
|
|
823
|
+
}, undefined>, never>;
|
|
824
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, never>;
|
|
825
|
+
}, undefined>;
|
|
826
|
+
readonly id: v.StringSchema<undefined>;
|
|
827
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
828
|
+
}, undefined>;
|
|
829
|
+
type RunesEtchRequestMessage = v.InferOutput<typeof runesEtchRequestMessageSchema>;
|
|
830
|
+
type RunesEtch = MethodParamsAndResult<v.InferOutput<typeof runesEtchParamsSchema>, v.InferOutput<typeof runesEtchResultSchema>>;
|
|
831
|
+
|
|
832
|
+
declare const runesGetBalanceMethodName = "runes_getBalance";
|
|
833
|
+
declare const runesGetBalanceParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
834
|
+
type RunesGetBalanceParams = v.InferOutput<typeof runesGetBalanceParamsSchema>;
|
|
835
|
+
declare const runesGetBalanceResultSchema: v.ObjectSchema<{
|
|
756
836
|
readonly balances: v.ArraySchema<v.ObjectSchema<{
|
|
757
837
|
readonly runeName: v.StringSchema<undefined>;
|
|
758
838
|
readonly amount: v.StringSchema<undefined>;
|
|
@@ -761,25 +841,81 @@ declare const getRunesBalanceResultSchema: v.ObjectSchema<{
|
|
|
761
841
|
readonly inscriptionId: v.NullishSchema<v.StringSchema<undefined>, never>;
|
|
762
842
|
}, undefined>, undefined>;
|
|
763
843
|
}, undefined>;
|
|
764
|
-
type
|
|
765
|
-
declare const
|
|
844
|
+
type RunesGetBalanceResult = v.InferOutput<typeof runesGetBalanceResultSchema>;
|
|
845
|
+
declare const runesGetBalanceRequestMessageSchema: v.ObjectSchema<{
|
|
766
846
|
readonly method: v.LiteralSchema<"runes_getBalance", undefined>;
|
|
767
847
|
readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
768
848
|
readonly id: v.StringSchema<undefined>;
|
|
769
849
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
770
850
|
}, undefined>;
|
|
771
|
-
type
|
|
772
|
-
type
|
|
773
|
-
|
|
774
|
-
|
|
851
|
+
type runesGetBalanceRequestMessage = v.InferOutput<typeof runesGetBalanceRequestMessageSchema>;
|
|
852
|
+
type RunesGetBalance = MethodParamsAndResult<RunesGetBalanceParams, RunesGetBalanceResult>;
|
|
853
|
+
|
|
854
|
+
interface RunesGetOrderParams extends GetOrderRequest {
|
|
855
|
+
network?: BitcoinNetworkType;
|
|
856
|
+
}
|
|
857
|
+
type RunesGetOrder = MethodParamsAndResult<RunesGetOrderParams, GetOrderResponse>;
|
|
858
|
+
|
|
859
|
+
declare const runesMintMethodName = "runes_mint";
|
|
860
|
+
declare const runesMintParamsSchema: v.ObjectSchema<{
|
|
861
|
+
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
862
|
+
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
863
|
+
readonly destinationAddress: v.StringSchema<undefined>;
|
|
864
|
+
readonly feeRate: v.NumberSchema<undefined>;
|
|
865
|
+
readonly refundAddress: v.StringSchema<undefined>;
|
|
866
|
+
readonly repeats: v.NumberSchema<undefined>;
|
|
867
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
868
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, never>;
|
|
869
|
+
}, undefined>;
|
|
870
|
+
type RunesMintParams = v.InferOutput<typeof runesMintParamsSchema>;
|
|
871
|
+
declare const runesMintResultSchema: v.ObjectSchema<{
|
|
872
|
+
readonly orderId: v.StringSchema<undefined>;
|
|
873
|
+
readonly fundTransactionId: v.StringSchema<undefined>;
|
|
874
|
+
readonly fundingAddress: v.StringSchema<undefined>;
|
|
875
|
+
}, undefined>;
|
|
876
|
+
type RunesMintResult = v.InferOutput<typeof runesMintResultSchema>;
|
|
877
|
+
declare const runesMintRequestMessageSchema: v.ObjectSchema<{
|
|
878
|
+
readonly method: v.LiteralSchema<"runes_mint", undefined>;
|
|
879
|
+
readonly params: v.ObjectSchema<{
|
|
880
|
+
readonly appServiceFee: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
881
|
+
readonly appServiceFeeAddress: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
882
|
+
readonly destinationAddress: v.StringSchema<undefined>;
|
|
883
|
+
readonly feeRate: v.NumberSchema<undefined>;
|
|
884
|
+
readonly refundAddress: v.StringSchema<undefined>;
|
|
885
|
+
readonly repeats: v.NumberSchema<undefined>;
|
|
886
|
+
readonly runeName: v.StringSchema<undefined>;
|
|
887
|
+
readonly network: v.OptionalSchema<v.EnumSchema<typeof BitcoinNetworkType, undefined>, never>;
|
|
888
|
+
}, undefined>;
|
|
889
|
+
readonly id: v.StringSchema<undefined>;
|
|
890
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
891
|
+
}, undefined>;
|
|
892
|
+
type RunesMintRequestMessage = v.InferOutput<typeof runesMintRequestMessageSchema>;
|
|
893
|
+
type RunesMint = MethodParamsAndResult<v.InferOutput<typeof runesMintParamsSchema>, v.InferOutput<typeof runesMintResultSchema>>;
|
|
894
|
+
|
|
895
|
+
interface RunesRbfOrderParams extends RBFOrderRequest {
|
|
896
|
+
network?: BitcoinNetworkType;
|
|
897
|
+
}
|
|
898
|
+
interface RunesRbfOrderResult {
|
|
899
|
+
orderId: string;
|
|
900
|
+
fundRBFTransactionId: string;
|
|
901
|
+
fundingAddress: string;
|
|
902
|
+
}
|
|
903
|
+
type RunesRbfOrder = MethodParamsAndResult<RunesRbfOrderParams, RunesRbfOrderResult>;
|
|
904
|
+
|
|
905
|
+
declare const runesTransferMethodName = "runes_transfer";
|
|
906
|
+
declare const runesTransferParamsSchema: v.ObjectSchema<{
|
|
775
907
|
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
776
908
|
readonly runeName: v.StringSchema<undefined>;
|
|
777
909
|
readonly amount: v.StringSchema<undefined>;
|
|
778
910
|
readonly address: v.StringSchema<undefined>;
|
|
779
911
|
}, undefined>, undefined>;
|
|
780
912
|
}, undefined>;
|
|
781
|
-
type TransferRunesParams = v.InferOutput<typeof
|
|
782
|
-
declare const
|
|
913
|
+
type TransferRunesParams = v.InferOutput<typeof runesTransferParamsSchema>;
|
|
914
|
+
declare const runesTransferResultSchema: v.ObjectSchema<{
|
|
915
|
+
readonly txid: v.StringSchema<undefined>;
|
|
916
|
+
}, undefined>;
|
|
917
|
+
type RunesTransferResult = v.InferOutput<typeof runesTransferResultSchema>;
|
|
918
|
+
declare const runesTransferRequestMessageSchema: v.ObjectSchema<{
|
|
783
919
|
readonly method: v.LiteralSchema<"runes_transfer", undefined>;
|
|
784
920
|
readonly params: v.ObjectSchema<{
|
|
785
921
|
readonly recipients: v.ArraySchema<v.ObjectSchema<{
|
|
@@ -791,134 +927,24 @@ declare const transferRunesRequestSchema: v.ObjectSchema<{
|
|
|
791
927
|
readonly id: v.StringSchema<undefined>;
|
|
792
928
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
793
929
|
}, undefined>;
|
|
794
|
-
type
|
|
795
|
-
|
|
796
|
-
readonly txid: v.StringSchema<undefined>;
|
|
797
|
-
}, undefined>;
|
|
798
|
-
type TransferRunesResult = v.InferOutput<typeof TransferRunesResultSchema>;
|
|
799
|
-
type TransferRunes = MethodParamsAndResult<TransferRunesParams, TransferRunesResult>;
|
|
930
|
+
type RunesTransferRequestMessage = v.InferOutput<typeof runesTransferRequestMessageSchema>;
|
|
931
|
+
type RunesTransfer = MethodParamsAndResult<TransferRunesParams, RunesTransferResult>;
|
|
800
932
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
* When sending a transfer STX request to a wallet, users can generally
|
|
804
|
-
* choose from which accout they want to send the STX tokens from. In
|
|
805
|
-
* cases where applications want the transfer to be made from a specific
|
|
806
|
-
* account, they can provide the `pubkey` of the address they'd like the
|
|
807
|
-
* transfer to be made from. It is up to wallet providers to handle this
|
|
808
|
-
* field as they see fit.
|
|
809
|
-
*/
|
|
810
|
-
pubkey: string;
|
|
811
|
-
}
|
|
812
|
-
interface Address {
|
|
813
|
-
/**
|
|
814
|
-
* A Crockford base-32 encoded Stacks address.
|
|
815
|
-
*/
|
|
816
|
-
address: string;
|
|
817
|
-
}
|
|
818
|
-
interface PostConditions {
|
|
933
|
+
declare const stxCallContractMethodName = "stx_callContract";
|
|
934
|
+
declare const stxCallContractParamsSchema: v.ObjectSchema<{
|
|
819
935
|
/**
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
* A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
|
|
823
|
-
*
|
|
824
|
-
* ```js
|
|
825
|
-
* import { serializePostCondition } from '@stacks/transactions';
|
|
826
|
-
*
|
|
827
|
-
* const postCondition = somePostCondition;
|
|
828
|
-
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
829
|
-
* ```
|
|
830
|
-
*/
|
|
831
|
-
postConditions: Array<string>;
|
|
832
|
-
}
|
|
833
|
-
interface PostConditionMode {
|
|
834
|
-
/**
|
|
835
|
-
* The mode of the post conditions.
|
|
836
|
-
*/
|
|
837
|
-
postConditionMode: number;
|
|
838
|
-
}
|
|
839
|
-
interface ParameterFormatVersion {
|
|
840
|
-
/**
|
|
841
|
-
* Version of parameter format.
|
|
842
|
-
*/
|
|
843
|
-
version: string;
|
|
844
|
-
}
|
|
845
|
-
interface Recipient {
|
|
846
|
-
/**
|
|
847
|
-
* The recipeint's Crockford base-32 encoded Stacks address.
|
|
848
|
-
*/
|
|
849
|
-
recipient: string;
|
|
850
|
-
}
|
|
851
|
-
interface Amount {
|
|
852
|
-
/**
|
|
853
|
-
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
854
|
-
* parseable by `BigInt` is acceptable.
|
|
855
|
-
*
|
|
856
|
-
* Example,
|
|
857
|
-
*
|
|
858
|
-
* ```js
|
|
859
|
-
* const amount1 = 1234;
|
|
860
|
-
* const amount2 = 1234n;
|
|
861
|
-
* const amount3 = '1234';
|
|
862
|
-
* ```
|
|
863
|
-
*/
|
|
864
|
-
amount: number | string;
|
|
865
|
-
}
|
|
866
|
-
interface Memo {
|
|
867
|
-
/**
|
|
868
|
-
* A string representing the memo.
|
|
869
|
-
*/
|
|
870
|
-
memo: string;
|
|
871
|
-
}
|
|
872
|
-
interface TxId {
|
|
873
|
-
/**
|
|
874
|
-
* The ID of the transaction.
|
|
875
|
-
*/
|
|
876
|
-
txid: string;
|
|
877
|
-
}
|
|
878
|
-
interface Transaction {
|
|
879
|
-
/**
|
|
880
|
-
* A Stacks transaction as a hex-encoded string.
|
|
881
|
-
*/
|
|
882
|
-
transaction: string;
|
|
883
|
-
}
|
|
884
|
-
interface Message {
|
|
885
|
-
/**
|
|
886
|
-
* Message payload to be signed.
|
|
887
|
-
*/
|
|
888
|
-
message: string;
|
|
889
|
-
}
|
|
890
|
-
interface Signature {
|
|
891
|
-
/**
|
|
892
|
-
* Signature of the message.
|
|
893
|
-
*/
|
|
894
|
-
signature: string;
|
|
895
|
-
}
|
|
896
|
-
interface PublicKey {
|
|
897
|
-
/**
|
|
898
|
-
* Public key as hex-encoded string.
|
|
899
|
-
*/
|
|
900
|
-
publicKey: string;
|
|
901
|
-
}
|
|
902
|
-
interface Domain {
|
|
903
|
-
/**
|
|
904
|
-
* The domain to be signed.
|
|
905
|
-
*/
|
|
906
|
-
domain: string;
|
|
907
|
-
}
|
|
908
|
-
interface CallContractParams {
|
|
909
|
-
/**
|
|
910
|
-
* The contract's Crockford base-32 encoded Stacks address and name.
|
|
936
|
+
* The contract principal.
|
|
911
937
|
*
|
|
912
938
|
* E.g. `"SPKE...GD5C.my-contract"`
|
|
913
939
|
*/
|
|
914
|
-
contract:
|
|
940
|
+
readonly contract: v.StringSchema<undefined>;
|
|
915
941
|
/**
|
|
916
942
|
* The name of the function to call.
|
|
917
943
|
*
|
|
918
944
|
* Note: spec changes ongoing,
|
|
919
945
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
920
946
|
*/
|
|
921
|
-
functionName:
|
|
947
|
+
readonly functionName: v.StringSchema<undefined>;
|
|
922
948
|
/**
|
|
923
949
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
924
950
|
* strings of Clarity values.
|
|
@@ -933,42 +959,131 @@ interface CallContractParams {
|
|
|
933
959
|
* const hexArgs = functionArgs.map(cvToString);
|
|
934
960
|
* ```
|
|
935
961
|
*/
|
|
936
|
-
arguments
|
|
937
|
-
}
|
|
938
|
-
type
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
962
|
+
readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
963
|
+
}, undefined>;
|
|
964
|
+
type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
|
|
965
|
+
declare const stxCallContractResultSchema: v.ObjectSchema<{
|
|
966
|
+
/**
|
|
967
|
+
* The ID of the transaction.
|
|
968
|
+
*/
|
|
969
|
+
readonly txid: v.StringSchema<undefined>;
|
|
970
|
+
/**
|
|
971
|
+
* A Stacks transaction as a hex-encoded string.
|
|
972
|
+
*/
|
|
973
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
974
|
+
}, undefined>;
|
|
975
|
+
type StxCallContractResult = v.InferOutput<typeof stxCallContractResultSchema>;
|
|
976
|
+
declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
|
|
977
|
+
readonly method: v.LiteralSchema<"stx_callContract", undefined>;
|
|
978
|
+
readonly params: v.ObjectSchema<{
|
|
979
|
+
/**
|
|
980
|
+
* The contract principal.
|
|
981
|
+
*
|
|
982
|
+
* E.g. `"SPKE...GD5C.my-contract"`
|
|
983
|
+
*/
|
|
984
|
+
readonly contract: v.StringSchema<undefined>;
|
|
985
|
+
/**
|
|
986
|
+
* The name of the function to call.
|
|
987
|
+
*
|
|
988
|
+
* Note: spec changes ongoing,
|
|
989
|
+
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
990
|
+
*/
|
|
991
|
+
readonly functionName: v.StringSchema<undefined>;
|
|
992
|
+
/**
|
|
993
|
+
* The function's arguments. The arguments are expected to be hex-encoded
|
|
994
|
+
* strings of Clarity values.
|
|
995
|
+
*
|
|
996
|
+
* To convert Clarity values to their hex representation, the `cvToString`
|
|
997
|
+
* helper from the `@stacks/transactions` package may be helpful.
|
|
998
|
+
*
|
|
999
|
+
* ```js
|
|
1000
|
+
* import { cvToString } from '@stacks/transactions';
|
|
1001
|
+
*
|
|
1002
|
+
* const functionArgs = [someClarityValue1, someClarityValue2];
|
|
1003
|
+
* const hexArgs = functionArgs.map(cvToString);
|
|
1004
|
+
* ```
|
|
1005
|
+
*/
|
|
1006
|
+
readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
1007
|
+
}, undefined>;
|
|
1008
|
+
readonly id: v.StringSchema<undefined>;
|
|
1009
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1010
|
+
}, undefined>;
|
|
1011
|
+
type StxCallContractRequestMessage = v.InferOutput<typeof stxCallContractRequestMessageSchema>;
|
|
1012
|
+
type StxCallContract = MethodParamsAndResult<StxCallContractParams, StxCallContractResult>;
|
|
1013
|
+
|
|
1014
|
+
declare const stxDeployContractMethodName = "stx_deployContract";
|
|
1015
|
+
declare const stxDeployContractParamsSchema: v.ObjectSchema<{
|
|
950
1016
|
/**
|
|
951
1017
|
* Name of the contract.
|
|
952
1018
|
*/
|
|
953
|
-
name:
|
|
1019
|
+
readonly name: v.StringSchema<undefined>;
|
|
954
1020
|
/**
|
|
955
|
-
* The code of the Clarity contract.
|
|
1021
|
+
* The source code of the Clarity contract.
|
|
956
1022
|
*/
|
|
957
|
-
clarityCode:
|
|
1023
|
+
readonly clarityCode: v.StringSchema<undefined>;
|
|
958
1024
|
/**
|
|
959
1025
|
* The version of the Clarity contract.
|
|
960
1026
|
*/
|
|
961
|
-
clarityVersion
|
|
962
|
-
}
|
|
963
|
-
type
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1027
|
+
readonly clarityVersion: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1028
|
+
}, undefined>;
|
|
1029
|
+
type StxDeployContractParams = v.InferOutput<typeof stxDeployContractParamsSchema>;
|
|
1030
|
+
declare const stxDeployContractResultSchema: v.ObjectSchema<{
|
|
1031
|
+
/**
|
|
1032
|
+
* The ID of the transaction.
|
|
1033
|
+
*/
|
|
1034
|
+
readonly txid: v.StringSchema<undefined>;
|
|
1035
|
+
/**
|
|
1036
|
+
* A Stacks transaction as a hex-encoded string.
|
|
1037
|
+
*/
|
|
1038
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
1039
|
+
}, undefined>;
|
|
1040
|
+
type StxDeployContractResult = v.InferOutput<typeof stxDeployContractResultSchema>;
|
|
1041
|
+
declare const stxDeployContractRequestMessageSchema: v.ObjectSchema<{
|
|
1042
|
+
readonly method: v.LiteralSchema<"stx_deployContract", undefined>;
|
|
1043
|
+
readonly params: v.ObjectSchema<{
|
|
1044
|
+
/**
|
|
1045
|
+
* Name of the contract.
|
|
1046
|
+
*/
|
|
1047
|
+
readonly name: v.StringSchema<undefined>;
|
|
1048
|
+
/**
|
|
1049
|
+
* The source code of the Clarity contract.
|
|
1050
|
+
*/
|
|
1051
|
+
readonly clarityCode: v.StringSchema<undefined>;
|
|
1052
|
+
/**
|
|
1053
|
+
* The version of the Clarity contract.
|
|
1054
|
+
*/
|
|
1055
|
+
readonly clarityVersion: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1056
|
+
}, undefined>;
|
|
1057
|
+
readonly id: v.StringSchema<undefined>;
|
|
1058
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1059
|
+
}, undefined>;
|
|
1060
|
+
type StxDeployContractRequestMessage = v.InferOutput<typeof stxDeployContractRequestMessageSchema>;
|
|
1061
|
+
type StxDeployContract = MethodParamsAndResult<StxDeployContractParams, StxDeployContractResult>;
|
|
1062
|
+
|
|
1063
|
+
declare const stxGetAccountsMethodName = "stx_getAccounts";
|
|
1064
|
+
declare const stxGetAccountsParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1065
|
+
type StxGetAccountsParams = v.InferOutput<typeof stxGetAccountsParamsSchema>;
|
|
1066
|
+
declare const stxGetAccountsResultSchema: v.ObjectSchema<{
|
|
1067
|
+
/**
|
|
1068
|
+
* The addresses generated for the given purposes.
|
|
1069
|
+
*/
|
|
1070
|
+
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1071
|
+
readonly address: v.StringSchema<undefined>;
|
|
1072
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1073
|
+
readonly gaiaHubUrl: v.StringSchema<undefined>;
|
|
1074
|
+
readonly gaiaAppKey: v.StringSchema<undefined>;
|
|
1075
|
+
}, undefined>, undefined>;
|
|
1076
|
+
}, undefined>;
|
|
1077
|
+
type StxGetAccountsResult = v.InferOutput<typeof stxGetAccountsResultSchema>;
|
|
1078
|
+
declare const stxGetAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
1079
|
+
readonly method: v.LiteralSchema<"stx_getAccounts", undefined>;
|
|
1080
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1081
|
+
readonly id: v.StringSchema<undefined>;
|
|
1082
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1083
|
+
}, undefined>;
|
|
1084
|
+
type StxGetAccountsRequestMessage = v.InferOutput<typeof stxGetAccountsRequestMessageSchema>;
|
|
1085
|
+
type StxGetAccounts = MethodParamsAndResult<StxGetAccountsParams, StxGetAccountsResult>;
|
|
1086
|
+
|
|
972
1087
|
declare const stxGetAddressesMethodName = "stx_getAddresses";
|
|
973
1088
|
declare const stxGetAddressesParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
974
1089
|
/**
|
|
@@ -1002,6 +1117,113 @@ declare const stxGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
|
1002
1117
|
}, undefined>;
|
|
1003
1118
|
type StxGetAddressesRequestMessage = v.InferOutput<typeof stxGetAddressesRequestMessageSchema>;
|
|
1004
1119
|
type StxGetAddresses = MethodParamsAndResult<v.InferOutput<typeof stxGetAddressesParamsSchema>, v.InferOutput<typeof stxGetAddressesResultSchema>>;
|
|
1120
|
+
|
|
1121
|
+
declare const stxSignMessageMethodName = "stx_signMessage";
|
|
1122
|
+
declare const stxSignMessageParamsSchema: v.ObjectSchema<{
|
|
1123
|
+
/**
|
|
1124
|
+
* The message to sign.
|
|
1125
|
+
*/
|
|
1126
|
+
readonly message: v.StringSchema<undefined>;
|
|
1127
|
+
/**
|
|
1128
|
+
* The public key to sign the message with.
|
|
1129
|
+
*/
|
|
1130
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1131
|
+
/**
|
|
1132
|
+
* The format version of the parameter.
|
|
1133
|
+
*/
|
|
1134
|
+
readonly parameterFormatVersion: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
1135
|
+
}, undefined>;
|
|
1136
|
+
type StxSignMessageParams = v.InferOutput<typeof stxSignMessageParamsSchema>;
|
|
1137
|
+
declare const stxSignMessageResultSchema: v.ObjectSchema<{
|
|
1138
|
+
/**
|
|
1139
|
+
* The signature of the message.
|
|
1140
|
+
*/
|
|
1141
|
+
readonly signature: v.StringSchema<undefined>;
|
|
1142
|
+
/**
|
|
1143
|
+
* The public key used to sign the message.
|
|
1144
|
+
*/
|
|
1145
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1146
|
+
}, undefined>;
|
|
1147
|
+
type StxSignMessageResult = v.InferOutput<typeof stxSignMessageResultSchema>;
|
|
1148
|
+
declare const stxSignMessageRequestMessageSchema: v.ObjectSchema<{
|
|
1149
|
+
readonly method: v.LiteralSchema<"stx_signMessage", undefined>;
|
|
1150
|
+
readonly params: v.ObjectSchema<{
|
|
1151
|
+
/**
|
|
1152
|
+
* The message to sign.
|
|
1153
|
+
*/
|
|
1154
|
+
readonly message: v.StringSchema<undefined>;
|
|
1155
|
+
/**
|
|
1156
|
+
* The public key to sign the message with.
|
|
1157
|
+
*/
|
|
1158
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1159
|
+
/**
|
|
1160
|
+
* The format version of the parameter.
|
|
1161
|
+
*/
|
|
1162
|
+
readonly parameterFormatVersion: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
1163
|
+
}, undefined>;
|
|
1164
|
+
readonly id: v.StringSchema<undefined>;
|
|
1165
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1166
|
+
}, undefined>;
|
|
1167
|
+
type StxSignMessageRequestMessage = v.InferOutput<typeof stxSignMessageRequestMessageSchema>;
|
|
1168
|
+
type StxSignMessage = MethodParamsAndResult<StxSignMessageParams, StxSignMessageResult>;
|
|
1169
|
+
|
|
1170
|
+
declare const stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
|
|
1171
|
+
declare const stxSignStructuredMessageParamsSchema: v.ObjectSchema<{
|
|
1172
|
+
/**
|
|
1173
|
+
* The domain to be signed.
|
|
1174
|
+
*/
|
|
1175
|
+
readonly domain: v.StringSchema<undefined>;
|
|
1176
|
+
/**
|
|
1177
|
+
* Message payload to be signed.
|
|
1178
|
+
*/
|
|
1179
|
+
readonly message: v.StringSchema<undefined>;
|
|
1180
|
+
/**
|
|
1181
|
+
* The format version of the parameter.
|
|
1182
|
+
*/
|
|
1183
|
+
readonly parameterFormatVersion: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
1184
|
+
/**
|
|
1185
|
+
* The public key to sign the message with.
|
|
1186
|
+
*/
|
|
1187
|
+
readonly publicKey: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1188
|
+
}, undefined>;
|
|
1189
|
+
type StxSignStructuredMessageParams = v.InferOutput<typeof stxSignStructuredMessageParamsSchema>;
|
|
1190
|
+
declare const stxSignStructuredMessageResultSchema: v.ObjectSchema<{
|
|
1191
|
+
/**
|
|
1192
|
+
* Signature of the message.
|
|
1193
|
+
*/
|
|
1194
|
+
readonly signature: v.StringSchema<undefined>;
|
|
1195
|
+
/**
|
|
1196
|
+
* Public key as hex-encoded string.
|
|
1197
|
+
*/
|
|
1198
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
1199
|
+
}, undefined>;
|
|
1200
|
+
type StxSignStructuredMessageResult = v.InferOutput<typeof stxSignStructuredMessageResultSchema>;
|
|
1201
|
+
declare const stxSignStructuredMessageRequestMessageSchema: v.ObjectSchema<{
|
|
1202
|
+
readonly method: v.LiteralSchema<"stx_signStructuredMessage", undefined>;
|
|
1203
|
+
readonly params: v.ObjectSchema<{
|
|
1204
|
+
/**
|
|
1205
|
+
* The domain to be signed.
|
|
1206
|
+
*/
|
|
1207
|
+
readonly domain: v.StringSchema<undefined>;
|
|
1208
|
+
/**
|
|
1209
|
+
* Message payload to be signed.
|
|
1210
|
+
*/
|
|
1211
|
+
readonly message: v.StringSchema<undefined>;
|
|
1212
|
+
/**
|
|
1213
|
+
* The format version of the parameter.
|
|
1214
|
+
*/
|
|
1215
|
+
readonly parameterFormatVersion: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
1216
|
+
/**
|
|
1217
|
+
* The public key to sign the message with.
|
|
1218
|
+
*/
|
|
1219
|
+
readonly publicKey: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1220
|
+
}, undefined>;
|
|
1221
|
+
readonly id: v.StringSchema<undefined>;
|
|
1222
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1223
|
+
}, undefined>;
|
|
1224
|
+
type StxSignStructuredMessageRequestMessage = v.InferOutput<typeof stxSignStructuredMessageRequestMessageSchema>;
|
|
1225
|
+
type StxSignStructuredMessage = MethodParamsAndResult<StxSignStructuredMessageParams, StxSignStructuredMessageResult>;
|
|
1226
|
+
|
|
1005
1227
|
declare const stxSignTransactionMethodName = "stx_signTransaction";
|
|
1006
1228
|
declare const stxSignTransactionParamsSchema: v.ObjectSchema<{
|
|
1007
1229
|
/**
|
|
@@ -1049,153 +1271,185 @@ declare const stxSignTransactionRequestMessageSchema: v.ObjectSchema<{
|
|
|
1049
1271
|
type StxSignTransactionRequestMessage = v.InferOutput<typeof stxSignTransactionRequestMessageSchema>;
|
|
1050
1272
|
type StxSignTransaction = MethodParamsAndResult<StxSignTransactionParams, StxSignTransactionResult>;
|
|
1051
1273
|
|
|
1274
|
+
declare const stxTransferStxMethodName = "stx_transferStx";
|
|
1275
|
+
declare const stxTransferStxParamsSchema: v.ObjectSchema<{
|
|
1276
|
+
/**
|
|
1277
|
+
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1278
|
+
* parseable by `BigInt` is acceptable.
|
|
1279
|
+
*
|
|
1280
|
+
* Example,
|
|
1281
|
+
*
|
|
1282
|
+
* ```js
|
|
1283
|
+
* const amount1 = 1234;
|
|
1284
|
+
* const amount2 = 1234n;
|
|
1285
|
+
* const amount3 = '1234';
|
|
1286
|
+
* ```
|
|
1287
|
+
*/
|
|
1288
|
+
readonly amount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1289
|
+
/**
|
|
1290
|
+
* The recipeint's principal.
|
|
1291
|
+
*/
|
|
1292
|
+
readonly recipient: v.StringSchema<undefined>;
|
|
1293
|
+
/**
|
|
1294
|
+
* A string representing the memo.
|
|
1295
|
+
*/
|
|
1296
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1297
|
+
/**
|
|
1298
|
+
* Version of parameter format.
|
|
1299
|
+
*/
|
|
1300
|
+
readonly version: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1301
|
+
/**
|
|
1302
|
+
* The mode of the post conditions.
|
|
1303
|
+
*/
|
|
1304
|
+
readonly postConditionMode: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
1305
|
+
/**
|
|
1306
|
+
* A hex-encoded string representing the post conditions.
|
|
1307
|
+
*
|
|
1308
|
+
* A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
|
|
1309
|
+
*
|
|
1310
|
+
* ```js
|
|
1311
|
+
* import { serializePostCondition } from '@stacks/transactions';
|
|
1312
|
+
*
|
|
1313
|
+
* const postCondition = somePostCondition;
|
|
1314
|
+
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1315
|
+
* ```
|
|
1316
|
+
*/
|
|
1317
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
1318
|
+
/**
|
|
1319
|
+
* The public key to sign the transaction with. The wallet may use any key
|
|
1320
|
+
* when not provided.
|
|
1321
|
+
*/
|
|
1322
|
+
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1323
|
+
}, undefined>;
|
|
1324
|
+
type StxTransferStxParams = v.InferOutput<typeof stxTransferStxParamsSchema>;
|
|
1325
|
+
declare const stxTransferStxResultSchema: v.ObjectSchema<{
|
|
1326
|
+
/**
|
|
1327
|
+
* The ID of the transaction.
|
|
1328
|
+
*/
|
|
1329
|
+
readonly txid: v.StringSchema<undefined>;
|
|
1330
|
+
/**
|
|
1331
|
+
* A Stacks transaction as a hex-encoded string.
|
|
1332
|
+
*/
|
|
1333
|
+
readonly transaction: v.StringSchema<undefined>;
|
|
1334
|
+
}, undefined>;
|
|
1335
|
+
type StxTransferStxResult = v.InferOutput<typeof stxTransferStxResultSchema>;
|
|
1336
|
+
declare const stxTransferStxRequestMessageSchema: v.ObjectSchema<{
|
|
1337
|
+
readonly method: v.LiteralSchema<"stx_transferStx", undefined>;
|
|
1338
|
+
readonly params: v.ObjectSchema<{
|
|
1339
|
+
/**
|
|
1340
|
+
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1341
|
+
* parseable by `BigInt` is acceptable.
|
|
1342
|
+
*
|
|
1343
|
+
* Example,
|
|
1344
|
+
*
|
|
1345
|
+
* ```js
|
|
1346
|
+
* const amount1 = 1234;
|
|
1347
|
+
* const amount2 = 1234n;
|
|
1348
|
+
* const amount3 = '1234';
|
|
1349
|
+
* ```
|
|
1350
|
+
*/
|
|
1351
|
+
readonly amount: v.UnionSchema<[v.NumberSchema<undefined>, v.StringSchema<undefined>], undefined>;
|
|
1352
|
+
/**
|
|
1353
|
+
* The recipeint's principal.
|
|
1354
|
+
*/
|
|
1355
|
+
readonly recipient: v.StringSchema<undefined>;
|
|
1356
|
+
/**
|
|
1357
|
+
* A string representing the memo.
|
|
1358
|
+
*/
|
|
1359
|
+
readonly memo: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1360
|
+
/**
|
|
1361
|
+
* Version of parameter format.
|
|
1362
|
+
*/
|
|
1363
|
+
readonly version: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1364
|
+
/**
|
|
1365
|
+
* The mode of the post conditions.
|
|
1366
|
+
*/
|
|
1367
|
+
readonly postConditionMode: v.OptionalSchema<v.NumberSchema<undefined>, never>;
|
|
1368
|
+
/**
|
|
1369
|
+
* A hex-encoded string representing the post conditions.
|
|
1370
|
+
*
|
|
1371
|
+
* A post condition may be converted to it's hex representation using the `serializePostCondition` helper from the `@stacks/transactions` package,
|
|
1372
|
+
*
|
|
1373
|
+
* ```js
|
|
1374
|
+
* import { serializePostCondition } from '@stacks/transactions';
|
|
1375
|
+
*
|
|
1376
|
+
* const postCondition = somePostCondition;
|
|
1377
|
+
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
1378
|
+
* ```
|
|
1379
|
+
*/
|
|
1380
|
+
readonly postConditions: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
|
|
1381
|
+
/**
|
|
1382
|
+
* The public key to sign the transaction with. The wallet may use any key
|
|
1383
|
+
* when not provided.
|
|
1384
|
+
*/
|
|
1385
|
+
readonly pubkey: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1386
|
+
}, undefined>;
|
|
1387
|
+
readonly id: v.StringSchema<undefined>;
|
|
1388
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1389
|
+
}, undefined>;
|
|
1390
|
+
type StxTransferStxRequestMessage = v.InferOutput<typeof stxTransferStxRequestMessageSchema>;
|
|
1391
|
+
type StxTransferStx = MethodParamsAndResult<StxTransferStxParams, StxTransferStxResult>;
|
|
1392
|
+
|
|
1393
|
+
declare const accountActionsSchema: v.ObjectSchema<{
|
|
1394
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1395
|
+
}, undefined>;
|
|
1396
|
+
declare const walletActionsSchema: v.ObjectSchema<{}, undefined>;
|
|
1397
|
+
declare const accountPermissionSchema: v.ObjectSchema<{
|
|
1398
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1399
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1400
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1401
|
+
readonly actions: v.ObjectSchema<{
|
|
1402
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1403
|
+
}, undefined>;
|
|
1404
|
+
}, undefined>;
|
|
1405
|
+
declare const walletPermissionSchema: v.ObjectSchema<{
|
|
1406
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1407
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1408
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1409
|
+
readonly actions: v.ObjectSchema<{}, undefined>;
|
|
1410
|
+
}, undefined>;
|
|
1052
1411
|
/**
|
|
1053
1412
|
* Permissions with the clientId field omitted and optional actions. Used for
|
|
1054
1413
|
* permission requests, since the wallet performs authentication based on the
|
|
1055
1414
|
* client's tab origin and should not rely on the client authenticating
|
|
1056
1415
|
* themselves.
|
|
1057
1416
|
*/
|
|
1058
|
-
declare const
|
|
1059
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1060
|
-
readonly read: v.BooleanSchema<undefined>;
|
|
1061
|
-
readonly autoSign: v.BooleanSchema<undefined>;
|
|
1062
|
-
readonly rename: v.BooleanSchema<undefined>;
|
|
1063
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1064
|
-
readonly entries: {
|
|
1065
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1066
|
-
readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1067
|
-
readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1068
|
-
};
|
|
1069
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1070
|
-
read?: boolean | undefined;
|
|
1071
|
-
autoSign?: boolean | undefined;
|
|
1072
|
-
rename?: boolean | undefined;
|
|
1073
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1074
|
-
readonly _types?: {
|
|
1075
|
-
readonly input: {
|
|
1076
|
-
read?: boolean | undefined;
|
|
1077
|
-
autoSign?: boolean | undefined;
|
|
1078
|
-
rename?: boolean | undefined;
|
|
1079
|
-
};
|
|
1080
|
-
readonly output: {
|
|
1081
|
-
read?: boolean | undefined;
|
|
1082
|
-
autoSign?: boolean | undefined;
|
|
1083
|
-
rename?: boolean | undefined;
|
|
1084
|
-
};
|
|
1085
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1086
|
-
} | undefined;
|
|
1087
|
-
};
|
|
1417
|
+
declare const PermissionRequestParams: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1088
1418
|
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1089
|
-
readonly resourceId: v.
|
|
1419
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1420
|
+
readonly actions: v.ObjectSchema<{
|
|
1421
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1422
|
+
}, undefined>;
|
|
1090
1423
|
}, undefined>, v.ObjectSchema<{
|
|
1091
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1092
|
-
readonly addPrivateKey: v.BooleanSchema<undefined>;
|
|
1093
|
-
readonly openPopup: v.BooleanSchema<undefined>;
|
|
1094
|
-
readonly openFullPage: v.BooleanSchema<undefined>;
|
|
1095
|
-
readonly readAllAccounts: v.BooleanSchema<undefined>;
|
|
1096
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1097
|
-
readonly entries: {
|
|
1098
|
-
readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1099
|
-
readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1100
|
-
readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1101
|
-
readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1102
|
-
};
|
|
1103
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1104
|
-
addPrivateKey?: boolean | undefined;
|
|
1105
|
-
openPopup?: boolean | undefined;
|
|
1106
|
-
openFullPage?: boolean | undefined;
|
|
1107
|
-
readAllAccounts?: boolean | undefined;
|
|
1108
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1109
|
-
readonly _types?: {
|
|
1110
|
-
readonly input: {
|
|
1111
|
-
addPrivateKey?: boolean | undefined;
|
|
1112
|
-
openPopup?: boolean | undefined;
|
|
1113
|
-
openFullPage?: boolean | undefined;
|
|
1114
|
-
readAllAccounts?: boolean | undefined;
|
|
1115
|
-
};
|
|
1116
|
-
readonly output: {
|
|
1117
|
-
addPrivateKey?: boolean | undefined;
|
|
1118
|
-
openPopup?: boolean | undefined;
|
|
1119
|
-
openFullPage?: boolean | undefined;
|
|
1120
|
-
readAllAccounts?: boolean | undefined;
|
|
1121
|
-
};
|
|
1122
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1123
|
-
} | undefined;
|
|
1124
|
-
};
|
|
1125
1424
|
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1126
|
-
readonly resourceId: v.
|
|
1425
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1426
|
+
readonly actions: v.ObjectSchema<{}, undefined>;
|
|
1127
1427
|
}, undefined>], undefined>;
|
|
1128
|
-
|
|
1428
|
+
declare const permission: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1429
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1430
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1431
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1432
|
+
readonly actions: v.ObjectSchema<{
|
|
1433
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1434
|
+
}, undefined>;
|
|
1435
|
+
}, undefined>, v.ObjectSchema<{
|
|
1436
|
+
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1437
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1438
|
+
readonly clientId: v.StringSchema<undefined>;
|
|
1439
|
+
readonly actions: v.ObjectSchema<{}, undefined>;
|
|
1440
|
+
}, undefined>], undefined>;
|
|
1441
|
+
type PermissionWithoutClientId = v.InferOutput<typeof PermissionRequestParams>;
|
|
1129
1442
|
declare const requestPermissionsMethodName = "wallet_requestPermissions";
|
|
1130
1443
|
declare const requestPermissionsParamsSchema: v.NullishSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1131
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1132
|
-
readonly read: v.BooleanSchema<undefined>;
|
|
1133
|
-
readonly autoSign: v.BooleanSchema<undefined>;
|
|
1134
|
-
readonly rename: v.BooleanSchema<undefined>;
|
|
1135
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1136
|
-
readonly entries: {
|
|
1137
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1138
|
-
readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1139
|
-
readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1140
|
-
};
|
|
1141
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1142
|
-
read?: boolean | undefined;
|
|
1143
|
-
autoSign?: boolean | undefined;
|
|
1144
|
-
rename?: boolean | undefined;
|
|
1145
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1146
|
-
readonly _types?: {
|
|
1147
|
-
readonly input: {
|
|
1148
|
-
read?: boolean | undefined;
|
|
1149
|
-
autoSign?: boolean | undefined;
|
|
1150
|
-
rename?: boolean | undefined;
|
|
1151
|
-
};
|
|
1152
|
-
readonly output: {
|
|
1153
|
-
read?: boolean | undefined;
|
|
1154
|
-
autoSign?: boolean | undefined;
|
|
1155
|
-
rename?: boolean | undefined;
|
|
1156
|
-
};
|
|
1157
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1158
|
-
} | undefined;
|
|
1159
|
-
};
|
|
1160
1444
|
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1161
|
-
readonly resourceId: v.
|
|
1445
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1446
|
+
readonly actions: v.ObjectSchema<{
|
|
1447
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1448
|
+
}, undefined>;
|
|
1162
1449
|
}, undefined>, v.ObjectSchema<{
|
|
1163
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1164
|
-
readonly addPrivateKey: v.BooleanSchema<undefined>;
|
|
1165
|
-
readonly openPopup: v.BooleanSchema<undefined>;
|
|
1166
|
-
readonly openFullPage: v.BooleanSchema<undefined>;
|
|
1167
|
-
readonly readAllAccounts: v.BooleanSchema<undefined>;
|
|
1168
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1169
|
-
readonly entries: {
|
|
1170
|
-
readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1171
|
-
readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1172
|
-
readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1173
|
-
readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1174
|
-
};
|
|
1175
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1176
|
-
addPrivateKey?: boolean | undefined;
|
|
1177
|
-
openPopup?: boolean | undefined;
|
|
1178
|
-
openFullPage?: boolean | undefined;
|
|
1179
|
-
readAllAccounts?: boolean | undefined;
|
|
1180
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1181
|
-
readonly _types?: {
|
|
1182
|
-
readonly input: {
|
|
1183
|
-
addPrivateKey?: boolean | undefined;
|
|
1184
|
-
openPopup?: boolean | undefined;
|
|
1185
|
-
openFullPage?: boolean | undefined;
|
|
1186
|
-
readAllAccounts?: boolean | undefined;
|
|
1187
|
-
};
|
|
1188
|
-
readonly output: {
|
|
1189
|
-
addPrivateKey?: boolean | undefined;
|
|
1190
|
-
openPopup?: boolean | undefined;
|
|
1191
|
-
openFullPage?: boolean | undefined;
|
|
1192
|
-
readAllAccounts?: boolean | undefined;
|
|
1193
|
-
};
|
|
1194
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1195
|
-
} | undefined;
|
|
1196
|
-
};
|
|
1197
1450
|
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1198
|
-
readonly resourceId: v.
|
|
1451
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1452
|
+
readonly actions: v.ObjectSchema<{}, undefined>;
|
|
1199
1453
|
}, undefined>], undefined>, undefined>, never>;
|
|
1200
1454
|
type RequestPermissionsParams = v.InferOutput<typeof requestPermissionsParamsSchema>;
|
|
1201
1455
|
declare const requestPermissionsResultSchema: v.LiteralSchema<true, undefined>;
|
|
@@ -1203,74 +1457,15 @@ type RequestPermissionsResult = v.InferOutput<typeof requestPermissionsResultSch
|
|
|
1203
1457
|
declare const requestPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
1204
1458
|
readonly method: v.LiteralSchema<"wallet_requestPermissions", undefined>;
|
|
1205
1459
|
readonly params: v.NullishSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1206
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1207
|
-
readonly read: v.BooleanSchema<undefined>;
|
|
1208
|
-
readonly autoSign: v.BooleanSchema<undefined>;
|
|
1209
|
-
readonly rename: v.BooleanSchema<undefined>;
|
|
1210
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1211
|
-
readonly entries: {
|
|
1212
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1213
|
-
readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1214
|
-
readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1215
|
-
};
|
|
1216
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1217
|
-
read?: boolean | undefined;
|
|
1218
|
-
autoSign?: boolean | undefined;
|
|
1219
|
-
rename?: boolean | undefined;
|
|
1220
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1221
|
-
readonly _types?: {
|
|
1222
|
-
readonly input: {
|
|
1223
|
-
read?: boolean | undefined;
|
|
1224
|
-
autoSign?: boolean | undefined;
|
|
1225
|
-
rename?: boolean | undefined;
|
|
1226
|
-
};
|
|
1227
|
-
readonly output: {
|
|
1228
|
-
read?: boolean | undefined;
|
|
1229
|
-
autoSign?: boolean | undefined;
|
|
1230
|
-
rename?: boolean | undefined;
|
|
1231
|
-
};
|
|
1232
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1233
|
-
} | undefined;
|
|
1234
|
-
};
|
|
1235
1460
|
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1236
|
-
readonly resourceId: v.
|
|
1461
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1462
|
+
readonly actions: v.ObjectSchema<{
|
|
1463
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1464
|
+
}, undefined>;
|
|
1237
1465
|
}, undefined>, v.ObjectSchema<{
|
|
1238
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1239
|
-
readonly addPrivateKey: v.BooleanSchema<undefined>;
|
|
1240
|
-
readonly openPopup: v.BooleanSchema<undefined>;
|
|
1241
|
-
readonly openFullPage: v.BooleanSchema<undefined>;
|
|
1242
|
-
readonly readAllAccounts: v.BooleanSchema<undefined>;
|
|
1243
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1244
|
-
readonly entries: {
|
|
1245
|
-
readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1246
|
-
readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1247
|
-
readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1248
|
-
readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1249
|
-
};
|
|
1250
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1251
|
-
addPrivateKey?: boolean | undefined;
|
|
1252
|
-
openPopup?: boolean | undefined;
|
|
1253
|
-
openFullPage?: boolean | undefined;
|
|
1254
|
-
readAllAccounts?: boolean | undefined;
|
|
1255
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1256
|
-
readonly _types?: {
|
|
1257
|
-
readonly input: {
|
|
1258
|
-
addPrivateKey?: boolean | undefined;
|
|
1259
|
-
openPopup?: boolean | undefined;
|
|
1260
|
-
openFullPage?: boolean | undefined;
|
|
1261
|
-
readAllAccounts?: boolean | undefined;
|
|
1262
|
-
};
|
|
1263
|
-
readonly output: {
|
|
1264
|
-
addPrivateKey?: boolean | undefined;
|
|
1265
|
-
openPopup?: boolean | undefined;
|
|
1266
|
-
openFullPage?: boolean | undefined;
|
|
1267
|
-
readAllAccounts?: boolean | undefined;
|
|
1268
|
-
};
|
|
1269
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1270
|
-
} | undefined;
|
|
1271
|
-
};
|
|
1272
1466
|
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1273
|
-
readonly resourceId: v.
|
|
1467
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1468
|
+
readonly actions: v.ObjectSchema<{}, undefined>;
|
|
1274
1469
|
}, undefined>], undefined>, undefined>, never>;
|
|
1275
1470
|
readonly id: v.StringSchema<undefined>;
|
|
1276
1471
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
@@ -1321,23 +1516,16 @@ declare const getCurrentPermissionsParamsSchema: v.NullishSchema<v.NullSchema<un
|
|
|
1321
1516
|
type GetCurrentPermissionsParams = v.InferOutput<typeof getCurrentPermissionsParamsSchema>;
|
|
1322
1517
|
declare const getCurrentPermissionsResultSchema: v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1323
1518
|
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1324
|
-
readonly resourceId: v.
|
|
1519
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1325
1520
|
readonly clientId: v.StringSchema<undefined>;
|
|
1326
1521
|
readonly actions: v.ObjectSchema<{
|
|
1327
|
-
readonly read: v.BooleanSchema<undefined>;
|
|
1328
|
-
readonly autoSign: v.BooleanSchema<undefined>;
|
|
1329
|
-
readonly rename: v.BooleanSchema<undefined>;
|
|
1522
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1330
1523
|
}, undefined>;
|
|
1331
1524
|
}, undefined>, v.ObjectSchema<{
|
|
1332
1525
|
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1333
|
-
readonly resourceId: v.
|
|
1526
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1334
1527
|
readonly clientId: v.StringSchema<undefined>;
|
|
1335
|
-
readonly actions: v.ObjectSchema<{
|
|
1336
|
-
readonly addPrivateKey: v.BooleanSchema<undefined>;
|
|
1337
|
-
readonly openPopup: v.BooleanSchema<undefined>;
|
|
1338
|
-
readonly openFullPage: v.BooleanSchema<undefined>;
|
|
1339
|
-
readonly readAllAccounts: v.BooleanSchema<undefined>;
|
|
1340
|
-
}, undefined>;
|
|
1528
|
+
readonly actions: v.ObjectSchema<{}, undefined>;
|
|
1341
1529
|
}, undefined>], undefined>, undefined>;
|
|
1342
1530
|
type GetCurrentPermissionsResult = v.InferOutput<typeof getCurrentPermissionsResultSchema>;
|
|
1343
1531
|
declare const getCurrentPermissionsRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1352,7 +1540,7 @@ declare const getAccountMethodName = "wallet_getAccount";
|
|
|
1352
1540
|
declare const getAccountParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1353
1541
|
type GetAccountParams = v.InferOutput<typeof getAccountParamsSchema>;
|
|
1354
1542
|
declare const getAccountResultSchema: v.ObjectSchema<{
|
|
1355
|
-
readonly id: v.
|
|
1543
|
+
readonly id: v.StringSchema<undefined>;
|
|
1356
1544
|
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1357
1545
|
readonly address: v.StringSchema<undefined>;
|
|
1358
1546
|
readonly publicKey: v.StringSchema<undefined>;
|
|
@@ -1370,107 +1558,25 @@ declare const getAccountRequestMessageSchema: v.ObjectSchema<{
|
|
|
1370
1558
|
}, undefined>;
|
|
1371
1559
|
type GetAccountRequestMessage = v.InferOutput<typeof getAccountRequestMessageSchema>;
|
|
1372
1560
|
type GetAccount = MethodParamsAndResult<GetAccountParams, GetAccountResult>;
|
|
1373
|
-
declare const registerClientMethodName = "wallet_registerClient";
|
|
1374
|
-
declare const registerClientParamsSchema: v.ObjectSchema<{
|
|
1375
|
-
readonly name: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1376
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1377
|
-
}, undefined>;
|
|
1378
|
-
type RegisterClientParams = v.InferOutput<typeof registerClientParamsSchema>;
|
|
1379
|
-
declare const registerClientResultSchema: v.ObjectSchema<{
|
|
1380
|
-
readonly id: v.StringSchema<undefined>;
|
|
1381
|
-
}, undefined>;
|
|
1382
|
-
type RegisterClientResult = v.InferOutput<typeof registerClientResultSchema>;
|
|
1383
|
-
declare const registerClientRequestMessageSchema: v.ObjectSchema<{
|
|
1384
|
-
readonly method: v.LiteralSchema<"wallet_registerClient", undefined>;
|
|
1385
|
-
readonly params: v.ObjectSchema<{
|
|
1386
|
-
readonly name: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1387
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1388
|
-
}, undefined>;
|
|
1389
|
-
readonly id: v.StringSchema<undefined>;
|
|
1390
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1391
|
-
}, undefined>;
|
|
1392
|
-
type RegisterClientRequestMessage = v.InferOutput<typeof registerClientRequestMessageSchema>;
|
|
1393
|
-
type RegisterClient = MethodParamsAndResult<RegisterClientParams, RegisterClientResult>;
|
|
1394
1561
|
declare const connectMethodName = "wallet_connect";
|
|
1395
1562
|
declare const connectParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1396
1563
|
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1397
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1398
|
-
readonly read: v.BooleanSchema<undefined>;
|
|
1399
|
-
readonly autoSign: v.BooleanSchema<undefined>;
|
|
1400
|
-
readonly rename: v.BooleanSchema<undefined>;
|
|
1401
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1402
|
-
readonly entries: {
|
|
1403
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1404
|
-
readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1405
|
-
readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1406
|
-
};
|
|
1407
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1408
|
-
read?: boolean | undefined;
|
|
1409
|
-
autoSign?: boolean | undefined;
|
|
1410
|
-
rename?: boolean | undefined;
|
|
1411
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1412
|
-
readonly _types?: {
|
|
1413
|
-
readonly input: {
|
|
1414
|
-
read?: boolean | undefined;
|
|
1415
|
-
autoSign?: boolean | undefined;
|
|
1416
|
-
rename?: boolean | undefined;
|
|
1417
|
-
};
|
|
1418
|
-
readonly output: {
|
|
1419
|
-
read?: boolean | undefined;
|
|
1420
|
-
autoSign?: boolean | undefined;
|
|
1421
|
-
rename?: boolean | undefined;
|
|
1422
|
-
};
|
|
1423
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1424
|
-
} | undefined;
|
|
1425
|
-
};
|
|
1426
1564
|
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1427
|
-
readonly resourceId: v.
|
|
1565
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1566
|
+
readonly actions: v.ObjectSchema<{
|
|
1567
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1568
|
+
}, undefined>;
|
|
1428
1569
|
}, undefined>, v.ObjectSchema<{
|
|
1429
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1430
|
-
readonly addPrivateKey: v.BooleanSchema<undefined>;
|
|
1431
|
-
readonly openPopup: v.BooleanSchema<undefined>;
|
|
1432
|
-
readonly openFullPage: v.BooleanSchema<undefined>;
|
|
1433
|
-
readonly readAllAccounts: v.BooleanSchema<undefined>;
|
|
1434
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1435
|
-
readonly entries: {
|
|
1436
|
-
readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1437
|
-
readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1438
|
-
readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1439
|
-
readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1440
|
-
};
|
|
1441
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1442
|
-
addPrivateKey?: boolean | undefined;
|
|
1443
|
-
openPopup?: boolean | undefined;
|
|
1444
|
-
openFullPage?: boolean | undefined;
|
|
1445
|
-
readAllAccounts?: boolean | undefined;
|
|
1446
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1447
|
-
readonly _types?: {
|
|
1448
|
-
readonly input: {
|
|
1449
|
-
addPrivateKey?: boolean | undefined;
|
|
1450
|
-
openPopup?: boolean | undefined;
|
|
1451
|
-
openFullPage?: boolean | undefined;
|
|
1452
|
-
readAllAccounts?: boolean | undefined;
|
|
1453
|
-
};
|
|
1454
|
-
readonly output: {
|
|
1455
|
-
addPrivateKey?: boolean | undefined;
|
|
1456
|
-
openPopup?: boolean | undefined;
|
|
1457
|
-
openFullPage?: boolean | undefined;
|
|
1458
|
-
readAllAccounts?: boolean | undefined;
|
|
1459
|
-
};
|
|
1460
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1461
|
-
} | undefined;
|
|
1462
|
-
};
|
|
1463
1570
|
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1464
|
-
readonly resourceId: v.
|
|
1571
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1572
|
+
readonly actions: v.ObjectSchema<{}, undefined>;
|
|
1465
1573
|
}, undefined>], undefined>, undefined>, never>;
|
|
1466
|
-
readonly
|
|
1467
|
-
|
|
1468
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1469
|
-
}, undefined>;
|
|
1574
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>, never>;
|
|
1575
|
+
readonly message: v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.MaxLengthAction<string, 80, "The message must not exceed 80 characters.">]>, never>;
|
|
1470
1576
|
}, undefined>, never>;
|
|
1471
1577
|
type ConnectParams = v.InferOutput<typeof connectParamsSchema>;
|
|
1472
1578
|
declare const connectResultSchema: v.ObjectSchema<{
|
|
1473
|
-
readonly id: v.
|
|
1579
|
+
readonly id: v.StringSchema<undefined>;
|
|
1474
1580
|
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
1475
1581
|
readonly address: v.StringSchema<undefined>;
|
|
1476
1582
|
readonly publicKey: v.StringSchema<undefined>;
|
|
@@ -1484,79 +1590,18 @@ declare const connectRequestMessageSchema: v.ObjectSchema<{
|
|
|
1484
1590
|
readonly method: v.LiteralSchema<"wallet_connect", undefined>;
|
|
1485
1591
|
readonly params: v.NullishSchema<v.ObjectSchema<{
|
|
1486
1592
|
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1487
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1488
|
-
readonly read: v.BooleanSchema<undefined>;
|
|
1489
|
-
readonly autoSign: v.BooleanSchema<undefined>;
|
|
1490
|
-
readonly rename: v.BooleanSchema<undefined>;
|
|
1491
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1492
|
-
readonly entries: {
|
|
1493
|
-
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1494
|
-
readonly autoSign: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1495
|
-
readonly rename: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1496
|
-
};
|
|
1497
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1498
|
-
read?: boolean | undefined;
|
|
1499
|
-
autoSign?: boolean | undefined;
|
|
1500
|
-
rename?: boolean | undefined;
|
|
1501
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1502
|
-
readonly _types?: {
|
|
1503
|
-
readonly input: {
|
|
1504
|
-
read?: boolean | undefined;
|
|
1505
|
-
autoSign?: boolean | undefined;
|
|
1506
|
-
rename?: boolean | undefined;
|
|
1507
|
-
};
|
|
1508
|
-
readonly output: {
|
|
1509
|
-
read?: boolean | undefined;
|
|
1510
|
-
autoSign?: boolean | undefined;
|
|
1511
|
-
rename?: boolean | undefined;
|
|
1512
|
-
};
|
|
1513
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1514
|
-
} | undefined;
|
|
1515
|
-
};
|
|
1516
1593
|
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1517
|
-
readonly resourceId: v.
|
|
1594
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1595
|
+
readonly actions: v.ObjectSchema<{
|
|
1596
|
+
readonly read: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1597
|
+
}, undefined>;
|
|
1518
1598
|
}, undefined>, v.ObjectSchema<{
|
|
1519
|
-
readonly actions: Omit<v.ObjectSchema<{
|
|
1520
|
-
readonly addPrivateKey: v.BooleanSchema<undefined>;
|
|
1521
|
-
readonly openPopup: v.BooleanSchema<undefined>;
|
|
1522
|
-
readonly openFullPage: v.BooleanSchema<undefined>;
|
|
1523
|
-
readonly readAllAccounts: v.BooleanSchema<undefined>;
|
|
1524
|
-
}, undefined>, "_types" | "_run" | "entries"> & {
|
|
1525
|
-
readonly entries: {
|
|
1526
|
-
readonly addPrivateKey: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1527
|
-
readonly openPopup: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1528
|
-
readonly openFullPage: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1529
|
-
readonly readAllAccounts: v.OptionalSchema<v.BooleanSchema<undefined>, never>;
|
|
1530
|
-
};
|
|
1531
|
-
readonly _run: (dataset: v.Dataset<unknown, never>, config: v.Config<v.BaseIssue<unknown>>) => v.Dataset<{
|
|
1532
|
-
addPrivateKey?: boolean | undefined;
|
|
1533
|
-
openPopup?: boolean | undefined;
|
|
1534
|
-
openFullPage?: boolean | undefined;
|
|
1535
|
-
readAllAccounts?: boolean | undefined;
|
|
1536
|
-
}, v.ObjectIssue | v.BooleanIssue>;
|
|
1537
|
-
readonly _types?: {
|
|
1538
|
-
readonly input: {
|
|
1539
|
-
addPrivateKey?: boolean | undefined;
|
|
1540
|
-
openPopup?: boolean | undefined;
|
|
1541
|
-
openFullPage?: boolean | undefined;
|
|
1542
|
-
readAllAccounts?: boolean | undefined;
|
|
1543
|
-
};
|
|
1544
|
-
readonly output: {
|
|
1545
|
-
addPrivateKey?: boolean | undefined;
|
|
1546
|
-
openPopup?: boolean | undefined;
|
|
1547
|
-
openFullPage?: boolean | undefined;
|
|
1548
|
-
readAllAccounts?: boolean | undefined;
|
|
1549
|
-
};
|
|
1550
|
-
readonly issue: v.ObjectIssue | v.BooleanIssue;
|
|
1551
|
-
} | undefined;
|
|
1552
|
-
};
|
|
1553
1599
|
readonly type: v.LiteralSchema<"wallet", undefined>;
|
|
1554
|
-
readonly resourceId: v.
|
|
1600
|
+
readonly resourceId: v.StringSchema<undefined>;
|
|
1601
|
+
readonly actions: v.ObjectSchema<{}, undefined>;
|
|
1555
1602
|
}, undefined>], undefined>, undefined>, never>;
|
|
1556
|
-
readonly
|
|
1557
|
-
|
|
1558
|
-
readonly description: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1559
|
-
}, undefined>;
|
|
1603
|
+
readonly addresses: v.OptionalSchema<v.ArraySchema<v.EnumSchema<typeof AddressPurpose, undefined>, undefined>, never>;
|
|
1604
|
+
readonly message: v.OptionalSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.MaxLengthAction<string, 80, "The message must not exceed 80 characters.">]>, never>;
|
|
1560
1605
|
}, undefined>, never>;
|
|
1561
1606
|
readonly id: v.StringSchema<undefined>;
|
|
1562
1607
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
@@ -1573,7 +1618,7 @@ interface StxRequests {
|
|
|
1573
1618
|
stx_deployContract: StxDeployContract;
|
|
1574
1619
|
stx_getAccounts: StxGetAccounts;
|
|
1575
1620
|
stx_getAddresses: StxGetAddresses;
|
|
1576
|
-
stx_signMessage:
|
|
1621
|
+
stx_signMessage: StxSignMessage;
|
|
1577
1622
|
stx_signStructuredMessage: StxSignStructuredMessage;
|
|
1578
1623
|
stx_signTransaction: StxSignTransaction;
|
|
1579
1624
|
stx_transferStx: StxTransferStx;
|
|
@@ -1590,15 +1635,15 @@ interface BtcRequests {
|
|
|
1590
1635
|
}
|
|
1591
1636
|
type BtcRequestMethod = keyof BtcRequests;
|
|
1592
1637
|
interface RunesRequests {
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
runes_etch:
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
runes_transfer:
|
|
1638
|
+
runes_estimateEtch: RunesEstimateEtch;
|
|
1639
|
+
runes_estimateMint: RunesEstimateMint;
|
|
1640
|
+
runes_estimateRbfOrder: RunesEstimateRbfOrder;
|
|
1641
|
+
runes_etch: RunesEtch;
|
|
1642
|
+
runes_getBalance: RunesGetBalance;
|
|
1643
|
+
runes_getOrder: RunesGetOrder;
|
|
1644
|
+
runes_mint: RunesMint;
|
|
1645
|
+
runes_rbfOrder: RunesRbfOrder;
|
|
1646
|
+
runes_transfer: RunesTransfer;
|
|
1602
1647
|
}
|
|
1603
1648
|
type RunesRequestMethod = keyof RunesRequests;
|
|
1604
1649
|
interface OrdinalsRequests {
|
|
@@ -1607,10 +1652,13 @@ interface OrdinalsRequests {
|
|
|
1607
1652
|
}
|
|
1608
1653
|
type OrdinalsRequestMethod = keyof OrdinalsRequests;
|
|
1609
1654
|
interface WalletRequests {
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1655
|
+
wallet_connect: Connect;
|
|
1656
|
+
wallet_disconnect: Disconnect;
|
|
1657
|
+
wallet_getAccount: GetAccount;
|
|
1613
1658
|
wallet_getCurrentPermissions: GetCurrentPermissions;
|
|
1659
|
+
wallet_getWalletType: GetWalletType;
|
|
1660
|
+
wallet_renouncePermissions: RenouncePermissions;
|
|
1661
|
+
wallet_requestPermissions: RequestPermissions;
|
|
1614
1662
|
}
|
|
1615
1663
|
type Requests = BtcRequests & StxRequests & RunesRequests & WalletRequests & OrdinalsRequests;
|
|
1616
1664
|
type Return<Method> = Method extends keyof Requests ? Requests[Method]['result'] : never;
|
|
@@ -1643,4 +1691,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
|
|
|
1643
1691
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
|
1644
1692
|
declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
|
|
1645
1693
|
|
|
1646
|
-
export { type AccountChangeEvent, type AddListener, type Address
|
|
1694
|
+
export { type AccountChangeEvent, type AddListener, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type Connect, type ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type GetAccount, type GetAccountParams, type GetAccountRequestMessage, type GetAccountResult, type GetAccounts, type GetAccountsParams, type GetAccountsRequestMessage, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesRequestMessage, type GetAddressesResult, type GetBalance, type GetBalanceParams, type GetBalanceRequestMessage, type GetBalanceResult, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetCurrentPermissionsParams, type GetCurrentPermissionsRequestMessage, type GetCurrentPermissionsResult, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetInscriptionsParams, type GetInscriptionsRequestMessage, type GetInscriptionsResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, PermissionRequestParams, type PermissionWithoutClientId, type Provider, type PsbtPayload, type Recipient, type RenouncePermissions, type RenouncePermissionsParams, type RenouncePermissionsRequestMessage, type RenouncePermissionsResult, type RequestOptions, type RequestPayload, type RequestPermissions, type RequestPermissionsParams, type RequestPermissionsRequestMessage, type RequestPermissionsResult, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesEstimateEtch, type RunesEstimateEtchParams, type RunesEstimateEtchResult, type RunesEstimateMint, type RunesEstimateRbfOrder, type RunesEtch, type RunesEtchParams, type RunesEtchRequestMessage, type RunesEtchResult, type RunesGetBalance, type RunesGetBalanceParams, type RunesGetBalanceResult, type RunesGetOrder, type RunesMint, type RunesMintParams, type RunesMintRequestMessage, type RunesMintResult, type RunesRbfOrder, type RunesRequestMethod, type RunesRequests, type RunesTransfer, type RunesTransferRequestMessage, type RunesTransferResult, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendInscriptionsParams, type SendInscriptionsRequestMessage, type SendInscriptionsResult, type SendTransfer, type SendTransferParams, type SendTransferRequestMessage, type SendTransferResult, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessageParams, type SignMessagePayload, type SignMessageRequestMessage, type SignMessageResponse, type SignMessageResult, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtRequestMessage, type SignPsbtResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxDeployContractParams, type StxDeployContractRequestMessage, type StxDeployContractResult, type StxGetAccounts, type StxGetAccountsParams, type StxGetAccountsRequestMessage, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignMessage, type StxSignMessageParams, type StxSignMessageRequestMessage, type StxSignMessageResult, type StxSignStructuredMessage, type StxSignStructuredMessageParams, type StxSignStructuredMessageRequestMessage, type StxSignStructuredMessageResult, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type StxTransferStxParams, type StxTransferStxRequestMessage, type StxTransferStxResult, type SupportedWallet, type TransferRunesParams, type WalletEvent, type WalletRequests, type WalletType, accountActionsSchema, accountChangeEventName, accountChangeSchema, accountPermissionSchema, addListener, addressSchema, connectMethodName, connectParamsSchema, connectRequestMessageSchema, connectResultSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectMethodName, disconnectParamsSchema, disconnectRequestMessageSchema, disconnectResultSchema, disconnectSchema, getAccountMethodName, getAccountParamsSchema, getAccountRequestMessageSchema, getAccountResultSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsRequestMessageSchema, getInscriptionsResultSchema, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permission, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, type runesEstimateMintParams, type runesEstimateMintResult, runesEtchMethodName, runesEtchParamsSchema, runesEtchRequestMessageSchema, runesEtchResultSchema, runesGetBalanceMethodName, runesGetBalanceParamsSchema, type runesGetBalanceRequestMessage, runesGetBalanceRequestMessageSchema, runesGetBalanceResultSchema, runesMintMethodName, runesMintParamsSchema, runesMintRequestMessageSchema, runesMintResultSchema, runesTransferMethodName, runesTransferParamsSchema, runesTransferRequestMessageSchema, runesTransferResultSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsRequestMessageSchema, sendInscriptionsResultSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxCallContractMethodName, stxCallContractParamsSchema, stxCallContractRequestMessageSchema, stxCallContractResultSchema, stxDeployContractMethodName, stxDeployContractParamsSchema, stxDeployContractRequestMessageSchema, stxDeployContractResultSchema, stxGetAccountsMethodName, stxGetAccountsParamsSchema, stxGetAccountsRequestMessageSchema, stxGetAccountsResultSchema, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignMessageMethodName, stxSignMessageParamsSchema, stxSignMessageRequestMessageSchema, stxSignMessageResultSchema, stxSignStructuredMessageMethodName, stxSignStructuredMessageParamsSchema, stxSignStructuredMessageRequestMessageSchema, stxSignStructuredMessageResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, stxTransferStxMethodName, stxTransferStxParamsSchema, stxTransferStxRequestMessageSchema, stxTransferStxResultSchema, walletActionsSchema, walletEventSchema, walletPermissionSchema, walletTypeSchema, walletTypes };
|