@sats-connect/core 0.15.0 → 0.16.0-1c86499
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +204 -135
- package/dist/index.d.ts +204 -135
- package/dist/index.js +880 -800
- package/dist/index.mjs +876 -800
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -179,6 +179,10 @@ __export(index_exports, {
|
|
|
179
179
|
signMessageParamsSchema: () => signMessageParamsSchema,
|
|
180
180
|
signMessageRequestMessageSchema: () => signMessageRequestMessageSchema,
|
|
181
181
|
signMessageResultSchema: () => signMessageResultSchema,
|
|
182
|
+
signMultipleMessagesMethodName: () => signMultipleMessagesMethodName,
|
|
183
|
+
signMultipleMessagesParamsSchema: () => signMultipleMessagesParamsSchema,
|
|
184
|
+
signMultipleMessagesRequestMessageSchema: () => signMultipleMessagesRequestMessageSchema,
|
|
185
|
+
signMultipleMessagesResultSchema: () => signMultipleMessagesResultSchema,
|
|
182
186
|
signMultipleTransactions: () => signMultipleTransactions,
|
|
183
187
|
signPsbtMethodName: () => signPsbtMethodName,
|
|
184
188
|
signPsbtParamsSchema: () => signPsbtParamsSchema,
|
|
@@ -286,7 +290,7 @@ __export(index_exports, {
|
|
|
286
290
|
module.exports = __toCommonJS(index_exports);
|
|
287
291
|
|
|
288
292
|
// src/request/index.ts
|
|
289
|
-
var
|
|
293
|
+
var v62 = __toESM(require("valibot"));
|
|
290
294
|
|
|
291
295
|
// src/provider/types.ts
|
|
292
296
|
var v4 = __toESM(require("valibot"));
|
|
@@ -529,973 +533,1045 @@ var sanitizeAddressPurposeRequest = (method, params) => {
|
|
|
529
533
|
return { method, params };
|
|
530
534
|
};
|
|
531
535
|
|
|
532
|
-
// src/request/types/btcMethods.ts
|
|
533
|
-
var
|
|
536
|
+
// src/request/types/btcMethods/common.ts
|
|
537
|
+
var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
538
|
+
MessageSigningProtocols2["ECDSA"] = "ECDSA";
|
|
539
|
+
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
540
|
+
return MessageSigningProtocols2;
|
|
541
|
+
})(MessageSigningProtocols || {});
|
|
534
542
|
|
|
535
|
-
// src/request/types/
|
|
543
|
+
// src/request/types/btcMethods/getAccounts.ts
|
|
536
544
|
var v5 = __toESM(require("valibot"));
|
|
537
|
-
var
|
|
538
|
-
var
|
|
545
|
+
var getAccountsMethodName = "getAccounts";
|
|
546
|
+
var getAccountsParamsSchema = v5.object({
|
|
547
|
+
/**
|
|
548
|
+
* The purposes for which to generate addresses. See
|
|
549
|
+
* {@linkcode AddressPurpose} for available purposes.
|
|
550
|
+
*/
|
|
551
|
+
purposes: v5.array(v5.enum(AddressPurpose)),
|
|
552
|
+
/**
|
|
553
|
+
* A message to be displayed to the user in the request prompt.
|
|
554
|
+
*/
|
|
555
|
+
message: v5.optional(v5.string())
|
|
556
|
+
});
|
|
557
|
+
var getAccountsResultSchema = v5.array(
|
|
539
558
|
v5.object({
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
559
|
+
...addressSchema.entries,
|
|
560
|
+
...v5.object({
|
|
561
|
+
walletType: walletTypeSchema
|
|
562
|
+
}).entries
|
|
563
|
+
})
|
|
564
|
+
);
|
|
565
|
+
var getAccountsRequestMessageSchema = v5.object({
|
|
566
|
+
...rpcRequestMessageSchema.entries,
|
|
567
|
+
...v5.object({
|
|
568
|
+
method: v5.literal(getAccountsMethodName),
|
|
569
|
+
params: getAccountsParamsSchema,
|
|
570
|
+
id: v5.string()
|
|
571
|
+
}).entries
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
// src/request/types/btcMethods/getAddresses.ts
|
|
575
|
+
var v21 = __toESM(require("valibot"));
|
|
576
|
+
|
|
577
|
+
// src/request/types/walletMethods/addNetwork.ts
|
|
578
|
+
var v6 = __toESM(require("valibot"));
|
|
579
|
+
var addNetworkMethodName = "wallet_addNetwork";
|
|
580
|
+
var addNetworkParamsSchema = v6.variant("chain", [
|
|
581
|
+
v6.object({
|
|
582
|
+
chain: v6.literal("bitcoin"),
|
|
583
|
+
type: v6.enum(BitcoinNetworkType),
|
|
584
|
+
name: v6.string(),
|
|
585
|
+
rpcUrl: v6.string(),
|
|
586
|
+
rpcFallbackUrl: v6.optional(v6.string()),
|
|
587
|
+
indexerUrl: v6.optional(v6.string()),
|
|
588
|
+
blockExplorerUrl: v6.optional(v6.string()),
|
|
589
|
+
switch: v6.optional(v6.boolean())
|
|
548
590
|
}),
|
|
549
|
-
|
|
550
|
-
chain:
|
|
551
|
-
name:
|
|
552
|
-
type:
|
|
553
|
-
rpcUrl:
|
|
554
|
-
blockExplorerUrl:
|
|
555
|
-
switch:
|
|
591
|
+
v6.object({
|
|
592
|
+
chain: v6.literal("stacks"),
|
|
593
|
+
name: v6.string(),
|
|
594
|
+
type: v6.enum(StacksNetworkType),
|
|
595
|
+
rpcUrl: v6.string(),
|
|
596
|
+
blockExplorerUrl: v6.optional(v6.string()),
|
|
597
|
+
switch: v6.optional(v6.boolean())
|
|
556
598
|
}),
|
|
557
|
-
|
|
558
|
-
chain:
|
|
559
|
-
name:
|
|
560
|
-
type:
|
|
561
|
-
rpcUrl:
|
|
562
|
-
blockExplorerUrl:
|
|
563
|
-
switch:
|
|
599
|
+
v6.object({
|
|
600
|
+
chain: v6.literal("starknet"),
|
|
601
|
+
name: v6.string(),
|
|
602
|
+
type: v6.enum(StarknetNetworkType),
|
|
603
|
+
rpcUrl: v6.string(),
|
|
604
|
+
blockExplorerUrl: v6.optional(v6.string()),
|
|
605
|
+
switch: v6.optional(v6.boolean())
|
|
564
606
|
})
|
|
565
607
|
]);
|
|
566
|
-
var addNetworkRequestMessageSchema =
|
|
608
|
+
var addNetworkRequestMessageSchema = v6.object({
|
|
567
609
|
...rpcRequestMessageSchema.entries,
|
|
568
|
-
...
|
|
569
|
-
method:
|
|
610
|
+
...v6.object({
|
|
611
|
+
method: v6.literal(addNetworkMethodName),
|
|
570
612
|
params: addNetworkParamsSchema,
|
|
571
|
-
id:
|
|
613
|
+
id: v6.string()
|
|
572
614
|
}).entries
|
|
573
615
|
});
|
|
574
|
-
var addNetworkResultSchema =
|
|
575
|
-
id:
|
|
616
|
+
var addNetworkResultSchema = v6.object({
|
|
617
|
+
id: v6.string()
|
|
576
618
|
});
|
|
577
619
|
|
|
578
620
|
// src/request/types/walletMethods/changeNetwork.ts
|
|
579
|
-
var
|
|
621
|
+
var v7 = __toESM(require("valibot"));
|
|
580
622
|
var changeNetworkMethodName = "wallet_changeNetwork";
|
|
581
|
-
var changeNetworkParamsSchema =
|
|
582
|
-
name:
|
|
623
|
+
var changeNetworkParamsSchema = v7.object({
|
|
624
|
+
name: v7.enum(BitcoinNetworkType)
|
|
583
625
|
});
|
|
584
|
-
var changeNetworkResultSchema =
|
|
585
|
-
var changeNetworkRequestMessageSchema =
|
|
626
|
+
var changeNetworkResultSchema = v7.nullish(v7.null());
|
|
627
|
+
var changeNetworkRequestMessageSchema = v7.object({
|
|
586
628
|
...rpcRequestMessageSchema.entries,
|
|
587
|
-
...
|
|
588
|
-
method:
|
|
629
|
+
...v7.object({
|
|
630
|
+
method: v7.literal(changeNetworkMethodName),
|
|
589
631
|
params: changeNetworkParamsSchema,
|
|
590
|
-
id:
|
|
632
|
+
id: v7.string()
|
|
591
633
|
}).entries
|
|
592
634
|
});
|
|
593
635
|
|
|
594
636
|
// src/request/types/walletMethods/changeNetworkById.ts
|
|
595
|
-
var
|
|
637
|
+
var v8 = __toESM(require("valibot"));
|
|
596
638
|
var changeNetworkByIdMethodName = "wallet_changeNetworkById";
|
|
597
|
-
var changeNetworkByIdParamsSchema =
|
|
598
|
-
id:
|
|
639
|
+
var changeNetworkByIdParamsSchema = v8.object({
|
|
640
|
+
id: v8.string()
|
|
599
641
|
});
|
|
600
|
-
var changeNetworkByIdResultSchema =
|
|
601
|
-
var changeNetworkByIdRequestMessageSchema =
|
|
642
|
+
var changeNetworkByIdResultSchema = v8.nullish(v8.null());
|
|
643
|
+
var changeNetworkByIdRequestMessageSchema = v8.object({
|
|
602
644
|
...rpcRequestMessageSchema.entries,
|
|
603
|
-
...
|
|
604
|
-
method:
|
|
645
|
+
...v8.object({
|
|
646
|
+
method: v8.literal(changeNetworkByIdMethodName),
|
|
605
647
|
params: changeNetworkByIdParamsSchema,
|
|
606
|
-
id:
|
|
648
|
+
id: v8.string()
|
|
607
649
|
}).entries
|
|
608
650
|
});
|
|
609
651
|
|
|
610
652
|
// src/request/types/walletMethods/common.ts
|
|
611
|
-
var
|
|
612
|
-
var accountActionsSchema =
|
|
613
|
-
read:
|
|
653
|
+
var v9 = __toESM(require("valibot"));
|
|
654
|
+
var accountActionsSchema = v9.object({
|
|
655
|
+
read: v9.optional(v9.boolean())
|
|
614
656
|
});
|
|
615
|
-
var walletActionsSchema =
|
|
616
|
-
readNetwork:
|
|
657
|
+
var walletActionsSchema = v9.object({
|
|
658
|
+
readNetwork: v9.optional(v9.boolean())
|
|
617
659
|
});
|
|
618
|
-
var accountPermissionSchema =
|
|
619
|
-
type:
|
|
620
|
-
resourceId:
|
|
621
|
-
clientId:
|
|
660
|
+
var accountPermissionSchema = v9.object({
|
|
661
|
+
type: v9.literal("account"),
|
|
662
|
+
resourceId: v9.string(),
|
|
663
|
+
clientId: v9.string(),
|
|
622
664
|
actions: accountActionsSchema
|
|
623
665
|
});
|
|
624
|
-
var walletPermissionSchema =
|
|
625
|
-
type:
|
|
626
|
-
resourceId:
|
|
627
|
-
clientId:
|
|
666
|
+
var walletPermissionSchema = v9.object({
|
|
667
|
+
type: v9.literal("wallet"),
|
|
668
|
+
resourceId: v9.string(),
|
|
669
|
+
clientId: v9.string(),
|
|
628
670
|
actions: walletActionsSchema
|
|
629
671
|
});
|
|
630
|
-
var PermissionRequestParams =
|
|
631
|
-
|
|
632
|
-
...
|
|
672
|
+
var PermissionRequestParams = v9.variant("type", [
|
|
673
|
+
v9.object({
|
|
674
|
+
...v9.omit(accountPermissionSchema, ["clientId"]).entries
|
|
633
675
|
}),
|
|
634
|
-
|
|
635
|
-
...
|
|
676
|
+
v9.object({
|
|
677
|
+
...v9.omit(walletPermissionSchema, ["clientId"]).entries
|
|
636
678
|
})
|
|
637
679
|
]);
|
|
638
|
-
var permission =
|
|
680
|
+
var permission = v9.variant("type", [accountPermissionSchema, walletPermissionSchema]);
|
|
639
681
|
|
|
640
682
|
// src/request/types/walletMethods/connect.ts
|
|
641
|
-
var
|
|
683
|
+
var v11 = __toESM(require("valibot"));
|
|
642
684
|
|
|
643
685
|
// src/request/types/walletMethods/getNetwork.ts
|
|
644
|
-
var
|
|
686
|
+
var v10 = __toESM(require("valibot"));
|
|
645
687
|
var getNetworkMethodName = "wallet_getNetwork";
|
|
646
|
-
var getNetworkParamsSchema =
|
|
647
|
-
var getNetworkResultSchema =
|
|
648
|
-
bitcoin:
|
|
649
|
-
name:
|
|
688
|
+
var getNetworkParamsSchema = v10.nullish(v10.null());
|
|
689
|
+
var getNetworkResultSchema = v10.object({
|
|
690
|
+
bitcoin: v10.object({
|
|
691
|
+
name: v10.enum(BitcoinNetworkType)
|
|
650
692
|
}),
|
|
651
|
-
stacks:
|
|
652
|
-
name:
|
|
693
|
+
stacks: v10.object({
|
|
694
|
+
name: v10.enum(StacksNetworkType)
|
|
653
695
|
}),
|
|
654
|
-
spark:
|
|
655
|
-
name:
|
|
696
|
+
spark: v10.object({
|
|
697
|
+
name: v10.enum(SparkNetworkType)
|
|
656
698
|
})
|
|
657
699
|
});
|
|
658
|
-
var getNetworkRequestMessageSchema =
|
|
700
|
+
var getNetworkRequestMessageSchema = v10.object({
|
|
659
701
|
...rpcRequestMessageSchema.entries,
|
|
660
|
-
...
|
|
661
|
-
method:
|
|
702
|
+
...v10.object({
|
|
703
|
+
method: v10.literal(getNetworkMethodName),
|
|
662
704
|
params: getNetworkParamsSchema,
|
|
663
|
-
id:
|
|
705
|
+
id: v10.string()
|
|
664
706
|
}).entries
|
|
665
707
|
});
|
|
666
708
|
|
|
667
709
|
// src/request/types/walletMethods/connect.ts
|
|
668
710
|
var connectMethodName = "wallet_connect";
|
|
669
|
-
var connectParamsSchema =
|
|
670
|
-
|
|
671
|
-
permissions:
|
|
672
|
-
addresses:
|
|
673
|
-
message:
|
|
674
|
-
|
|
711
|
+
var connectParamsSchema = v11.nullish(
|
|
712
|
+
v11.object({
|
|
713
|
+
permissions: v11.optional(v11.array(PermissionRequestParams)),
|
|
714
|
+
addresses: v11.optional(v11.array(v11.enum(AddressPurpose))),
|
|
715
|
+
message: v11.optional(
|
|
716
|
+
v11.pipe(v11.string(), v11.maxLength(80, "The message must not exceed 80 characters."))
|
|
675
717
|
),
|
|
676
|
-
network:
|
|
718
|
+
network: v11.optional(v11.enum(BitcoinNetworkType))
|
|
677
719
|
})
|
|
678
720
|
);
|
|
679
|
-
var connectResultSchema =
|
|
680
|
-
id:
|
|
681
|
-
addresses:
|
|
721
|
+
var connectResultSchema = v11.object({
|
|
722
|
+
id: v11.string(),
|
|
723
|
+
addresses: v11.array(addressSchema),
|
|
682
724
|
walletType: walletTypeSchema,
|
|
683
725
|
network: getNetworkResultSchema
|
|
684
726
|
});
|
|
685
|
-
var connectRequestMessageSchema =
|
|
727
|
+
var connectRequestMessageSchema = v11.object({
|
|
686
728
|
...rpcRequestMessageSchema.entries,
|
|
687
|
-
...
|
|
688
|
-
method:
|
|
729
|
+
...v11.object({
|
|
730
|
+
method: v11.literal(connectMethodName),
|
|
689
731
|
params: connectParamsSchema,
|
|
690
|
-
id:
|
|
732
|
+
id: v11.string()
|
|
691
733
|
}).entries
|
|
692
734
|
});
|
|
693
735
|
|
|
694
736
|
// src/request/types/walletMethods/disconnect.ts
|
|
695
|
-
var
|
|
737
|
+
var v12 = __toESM(require("valibot"));
|
|
696
738
|
var disconnectMethodName = "wallet_disconnect";
|
|
697
|
-
var disconnectParamsSchema =
|
|
698
|
-
var disconnectResultSchema =
|
|
699
|
-
var disconnectRequestMessageSchema =
|
|
739
|
+
var disconnectParamsSchema = v12.nullish(v12.null());
|
|
740
|
+
var disconnectResultSchema = v12.nullish(v12.null());
|
|
741
|
+
var disconnectRequestMessageSchema = v12.object({
|
|
700
742
|
...rpcRequestMessageSchema.entries,
|
|
701
|
-
...
|
|
702
|
-
method:
|
|
743
|
+
...v12.object({
|
|
744
|
+
method: v12.literal(disconnectMethodName),
|
|
703
745
|
params: disconnectParamsSchema,
|
|
704
|
-
id:
|
|
746
|
+
id: v12.string()
|
|
705
747
|
}).entries
|
|
706
748
|
});
|
|
707
749
|
|
|
708
750
|
// src/request/types/walletMethods/getAccount.ts
|
|
709
|
-
var
|
|
751
|
+
var v13 = __toESM(require("valibot"));
|
|
710
752
|
var getAccountMethodName = "wallet_getAccount";
|
|
711
|
-
var getAccountParamsSchema =
|
|
712
|
-
var getAccountResultSchema =
|
|
713
|
-
id:
|
|
714
|
-
addresses:
|
|
753
|
+
var getAccountParamsSchema = v13.nullish(v13.null());
|
|
754
|
+
var getAccountResultSchema = v13.object({
|
|
755
|
+
id: v13.string(),
|
|
756
|
+
addresses: v13.array(addressSchema),
|
|
715
757
|
walletType: walletTypeSchema,
|
|
716
758
|
network: getNetworkResultSchema
|
|
717
759
|
});
|
|
718
|
-
var getAccountRequestMessageSchema =
|
|
760
|
+
var getAccountRequestMessageSchema = v13.object({
|
|
719
761
|
...rpcRequestMessageSchema.entries,
|
|
720
|
-
...
|
|
721
|
-
method:
|
|
762
|
+
...v13.object({
|
|
763
|
+
method: v13.literal(getAccountMethodName),
|
|
722
764
|
params: getAccountParamsSchema,
|
|
723
|
-
id:
|
|
765
|
+
id: v13.string()
|
|
724
766
|
}).entries
|
|
725
767
|
});
|
|
726
768
|
|
|
727
769
|
// src/request/types/walletMethods/getCurrentPermissions.ts
|
|
728
|
-
var
|
|
770
|
+
var v14 = __toESM(require("valibot"));
|
|
729
771
|
var getCurrentPermissionsMethodName = "wallet_getCurrentPermissions";
|
|
730
|
-
var getCurrentPermissionsParamsSchema =
|
|
731
|
-
var getCurrentPermissionsResultSchema =
|
|
732
|
-
var getCurrentPermissionsRequestMessageSchema =
|
|
772
|
+
var getCurrentPermissionsParamsSchema = v14.nullish(v14.null());
|
|
773
|
+
var getCurrentPermissionsResultSchema = v14.array(permission);
|
|
774
|
+
var getCurrentPermissionsRequestMessageSchema = v14.object({
|
|
733
775
|
...rpcRequestMessageSchema.entries,
|
|
734
|
-
...
|
|
735
|
-
method:
|
|
776
|
+
...v14.object({
|
|
777
|
+
method: v14.literal(getCurrentPermissionsMethodName),
|
|
736
778
|
params: getCurrentPermissionsParamsSchema,
|
|
737
|
-
id:
|
|
779
|
+
id: v14.string()
|
|
738
780
|
}).entries
|
|
739
781
|
});
|
|
740
782
|
|
|
741
783
|
// src/request/types/walletMethods/getWalletType.ts
|
|
742
|
-
var
|
|
784
|
+
var v15 = __toESM(require("valibot"));
|
|
743
785
|
var getWalletTypeMethodName = "wallet_getWalletType";
|
|
744
|
-
var getWalletTypeParamsSchema =
|
|
786
|
+
var getWalletTypeParamsSchema = v15.nullish(v15.null());
|
|
745
787
|
var getWalletTypeResultSchema = walletTypeSchema;
|
|
746
|
-
var getWalletTypeRequestMessageSchema =
|
|
788
|
+
var getWalletTypeRequestMessageSchema = v15.object({
|
|
747
789
|
...rpcRequestMessageSchema.entries,
|
|
748
|
-
...
|
|
749
|
-
method:
|
|
790
|
+
...v15.object({
|
|
791
|
+
method: v15.literal(getWalletTypeMethodName),
|
|
750
792
|
params: getWalletTypeParamsSchema,
|
|
751
|
-
id:
|
|
793
|
+
id: v15.string()
|
|
752
794
|
}).entries
|
|
753
795
|
});
|
|
754
796
|
|
|
755
797
|
// src/request/types/walletMethods/openBridge.ts
|
|
756
|
-
var
|
|
798
|
+
var v16 = __toESM(require("valibot"));
|
|
757
799
|
var openBridgeMethodName = "wallet_openBridge";
|
|
758
|
-
var openBridgeParamsSchema =
|
|
759
|
-
fromAsset:
|
|
760
|
-
toAsset:
|
|
800
|
+
var openBridgeParamsSchema = v16.object({
|
|
801
|
+
fromAsset: v16.string(),
|
|
802
|
+
toAsset: v16.string()
|
|
761
803
|
});
|
|
762
|
-
var openBridgeResultSchema =
|
|
763
|
-
var openBridgeRequestMessageSchema =
|
|
804
|
+
var openBridgeResultSchema = v16.nullish(v16.null());
|
|
805
|
+
var openBridgeRequestMessageSchema = v16.object({
|
|
764
806
|
...rpcRequestMessageSchema.entries,
|
|
765
|
-
...
|
|
766
|
-
method:
|
|
807
|
+
...v16.object({
|
|
808
|
+
method: v16.literal(openBridgeMethodName),
|
|
767
809
|
params: openBridgeParamsSchema,
|
|
768
|
-
id:
|
|
810
|
+
id: v16.string()
|
|
769
811
|
}).entries
|
|
770
812
|
});
|
|
771
813
|
|
|
772
814
|
// src/request/types/walletMethods/openBuy.ts
|
|
773
|
-
var
|
|
815
|
+
var v17 = __toESM(require("valibot"));
|
|
774
816
|
var openBuyMethodName = "wallet_openBuy";
|
|
775
|
-
var openBuyParamsSchema =
|
|
776
|
-
asset:
|
|
817
|
+
var openBuyParamsSchema = v17.object({
|
|
818
|
+
asset: v17.string()
|
|
777
819
|
});
|
|
778
|
-
var openBuyResultSchema =
|
|
779
|
-
var openBuyRequestMessageSchema =
|
|
820
|
+
var openBuyResultSchema = v17.nullish(v17.null());
|
|
821
|
+
var openBuyRequestMessageSchema = v17.object({
|
|
780
822
|
...rpcRequestMessageSchema.entries,
|
|
781
|
-
...
|
|
782
|
-
method:
|
|
823
|
+
...v17.object({
|
|
824
|
+
method: v17.literal(openBuyMethodName),
|
|
783
825
|
params: openBuyParamsSchema,
|
|
784
|
-
id:
|
|
826
|
+
id: v17.string()
|
|
785
827
|
}).entries
|
|
786
828
|
});
|
|
787
829
|
|
|
788
830
|
// src/request/types/walletMethods/openReceive.ts
|
|
789
|
-
var
|
|
831
|
+
var v18 = __toESM(require("valibot"));
|
|
790
832
|
var openReceiveMethodName = "wallet_openReceive";
|
|
791
|
-
var openReceiveParamsSchema =
|
|
792
|
-
address:
|
|
833
|
+
var openReceiveParamsSchema = v18.object({
|
|
834
|
+
address: v18.string()
|
|
793
835
|
});
|
|
794
836
|
var openReceiveResultSchema = addressSchema;
|
|
795
|
-
var openReceiveRequestMessageSchema =
|
|
837
|
+
var openReceiveRequestMessageSchema = v18.object({
|
|
796
838
|
...rpcRequestMessageSchema.entries,
|
|
797
|
-
...
|
|
798
|
-
method:
|
|
839
|
+
...v18.object({
|
|
840
|
+
method: v18.literal(openReceiveMethodName),
|
|
799
841
|
params: openReceiveParamsSchema,
|
|
800
|
-
id:
|
|
842
|
+
id: v18.string()
|
|
801
843
|
}).entries
|
|
802
844
|
});
|
|
803
845
|
|
|
804
846
|
// src/request/types/walletMethods/renouncePermissions.ts
|
|
805
|
-
var
|
|
847
|
+
var v19 = __toESM(require("valibot"));
|
|
806
848
|
var renouncePermissionsMethodName = "wallet_renouncePermissions";
|
|
807
|
-
var renouncePermissionsParamsSchema =
|
|
808
|
-
var renouncePermissionsResultSchema =
|
|
809
|
-
var renouncePermissionsRequestMessageSchema =
|
|
849
|
+
var renouncePermissionsParamsSchema = v19.nullish(v19.null());
|
|
850
|
+
var renouncePermissionsResultSchema = v19.nullish(v19.null());
|
|
851
|
+
var renouncePermissionsRequestMessageSchema = v19.object({
|
|
810
852
|
...rpcRequestMessageSchema.entries,
|
|
811
|
-
...
|
|
812
|
-
method:
|
|
853
|
+
...v19.object({
|
|
854
|
+
method: v19.literal(renouncePermissionsMethodName),
|
|
813
855
|
params: renouncePermissionsParamsSchema,
|
|
814
|
-
id:
|
|
856
|
+
id: v19.string()
|
|
815
857
|
}).entries
|
|
816
858
|
});
|
|
817
859
|
|
|
818
860
|
// src/request/types/walletMethods/requestPermissions.ts
|
|
819
|
-
var
|
|
861
|
+
var v20 = __toESM(require("valibot"));
|
|
820
862
|
var requestPermissionsMethodName = "wallet_requestPermissions";
|
|
821
|
-
var requestPermissionsParamsSchema =
|
|
822
|
-
var requestPermissionsResultSchema =
|
|
823
|
-
var requestPermissionsRequestMessageSchema =
|
|
863
|
+
var requestPermissionsParamsSchema = v20.nullish(v20.array(PermissionRequestParams));
|
|
864
|
+
var requestPermissionsResultSchema = v20.literal(true);
|
|
865
|
+
var requestPermissionsRequestMessageSchema = v20.object({
|
|
824
866
|
...rpcRequestMessageSchema.entries,
|
|
825
|
-
...
|
|
826
|
-
method:
|
|
867
|
+
...v20.object({
|
|
868
|
+
method: v20.literal(requestPermissionsMethodName),
|
|
827
869
|
params: requestPermissionsParamsSchema,
|
|
828
|
-
id:
|
|
870
|
+
id: v20.string()
|
|
871
|
+
}).entries
|
|
872
|
+
});
|
|
873
|
+
|
|
874
|
+
// src/request/types/btcMethods/getAddresses.ts
|
|
875
|
+
var getAddressesMethodName = "getAddresses";
|
|
876
|
+
var getAddressesParamsSchema = v21.object({
|
|
877
|
+
/**
|
|
878
|
+
* The purposes for which to generate addresses. See
|
|
879
|
+
* {@linkcode AddressPurpose} for available purposes.
|
|
880
|
+
*/
|
|
881
|
+
purposes: v21.array(v21.enum(AddressPurpose)),
|
|
882
|
+
/**
|
|
883
|
+
* A message to be displayed to the user in the request prompt.
|
|
884
|
+
*/
|
|
885
|
+
message: v21.optional(v21.string())
|
|
886
|
+
});
|
|
887
|
+
var getAddressesResultSchema = v21.object({
|
|
888
|
+
/**
|
|
889
|
+
* The addresses generated for the given purposes.
|
|
890
|
+
*/
|
|
891
|
+
addresses: v21.array(addressSchema),
|
|
892
|
+
network: getNetworkResultSchema
|
|
893
|
+
});
|
|
894
|
+
var getAddressesRequestMessageSchema = v21.object({
|
|
895
|
+
...rpcRequestMessageSchema.entries,
|
|
896
|
+
...v21.object({
|
|
897
|
+
method: v21.literal(getAddressesMethodName),
|
|
898
|
+
params: getAddressesParamsSchema,
|
|
899
|
+
id: v21.string()
|
|
900
|
+
}).entries
|
|
901
|
+
});
|
|
902
|
+
|
|
903
|
+
// src/request/types/btcMethods/getBalance.ts
|
|
904
|
+
var v22 = __toESM(require("valibot"));
|
|
905
|
+
var getBalanceMethodName = "getBalance";
|
|
906
|
+
var getBalanceParamsSchema = v22.nullish(v22.null());
|
|
907
|
+
var getBalanceResultSchema = v22.object({
|
|
908
|
+
/**
|
|
909
|
+
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
910
|
+
* messages not supporting bigint
|
|
911
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
912
|
+
*/
|
|
913
|
+
confirmed: v22.string(),
|
|
914
|
+
/**
|
|
915
|
+
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
916
|
+
* messages not supporting bigint
|
|
917
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
918
|
+
*/
|
|
919
|
+
unconfirmed: v22.string(),
|
|
920
|
+
/**
|
|
921
|
+
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
922
|
+
* sats. Using a string due to chrome messages not supporting bigint
|
|
923
|
+
* (https://issues.chromium.org/issues/40116184).
|
|
924
|
+
*/
|
|
925
|
+
total: v22.string()
|
|
926
|
+
});
|
|
927
|
+
var getBalanceRequestMessageSchema = v22.object({
|
|
928
|
+
...rpcRequestMessageSchema.entries,
|
|
929
|
+
...v22.object({
|
|
930
|
+
method: v22.literal(getBalanceMethodName),
|
|
931
|
+
id: v22.string()
|
|
829
932
|
}).entries
|
|
830
933
|
});
|
|
831
934
|
|
|
832
|
-
// src/request/types/btcMethods.ts
|
|
935
|
+
// src/request/types/btcMethods/getInfo.ts
|
|
936
|
+
var v23 = __toESM(require("valibot"));
|
|
833
937
|
var ProviderPlatform = /* @__PURE__ */ ((ProviderPlatform2) => {
|
|
834
938
|
ProviderPlatform2["Web"] = "web";
|
|
835
939
|
ProviderPlatform2["Mobile"] = "mobile";
|
|
836
940
|
return ProviderPlatform2;
|
|
837
941
|
})(ProviderPlatform || {});
|
|
838
942
|
var getInfoMethodName = "getInfo";
|
|
839
|
-
var getInfoParamsSchema =
|
|
840
|
-
var getInfoResultSchema =
|
|
943
|
+
var getInfoParamsSchema = v23.nullish(v23.null());
|
|
944
|
+
var getInfoResultSchema = v23.object({
|
|
841
945
|
/**
|
|
842
946
|
* Version of the wallet.
|
|
843
947
|
*/
|
|
844
|
-
version:
|
|
948
|
+
version: v23.string(),
|
|
845
949
|
/**
|
|
846
950
|
* The platform the wallet is running on (web or mobile).
|
|
847
951
|
*/
|
|
848
|
-
platform:
|
|
952
|
+
platform: v23.optional(v23.enum(ProviderPlatform)),
|
|
849
953
|
/**
|
|
850
954
|
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
851
955
|
*/
|
|
852
|
-
methods:
|
|
956
|
+
methods: v23.optional(v23.array(v23.string())),
|
|
853
957
|
/**
|
|
854
958
|
* List of WBIP standards supported by the wallet. Not currently used.
|
|
855
959
|
*/
|
|
856
|
-
supports:
|
|
960
|
+
supports: v23.array(v23.string())
|
|
857
961
|
});
|
|
858
|
-
var getInfoRequestMessageSchema =
|
|
962
|
+
var getInfoRequestMessageSchema = v23.object({
|
|
859
963
|
...rpcRequestMessageSchema.entries,
|
|
860
|
-
...
|
|
861
|
-
method:
|
|
964
|
+
...v23.object({
|
|
965
|
+
method: v23.literal(getInfoMethodName),
|
|
862
966
|
params: getInfoParamsSchema,
|
|
863
|
-
id:
|
|
967
|
+
id: v23.string()
|
|
864
968
|
}).entries
|
|
865
969
|
});
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
*/
|
|
872
|
-
purposes: v20.array(v20.enum(AddressPurpose)),
|
|
970
|
+
|
|
971
|
+
// src/request/types/btcMethods/sendTransfer.ts
|
|
972
|
+
var v24 = __toESM(require("valibot"));
|
|
973
|
+
var sendTransferMethodName = "sendTransfer";
|
|
974
|
+
var sendTransferParamsSchema = v24.object({
|
|
873
975
|
/**
|
|
874
|
-
*
|
|
976
|
+
* Array of recipients to send to.
|
|
977
|
+
* The amount to send to each recipient is in satoshis.
|
|
875
978
|
*/
|
|
876
|
-
|
|
979
|
+
recipients: v24.array(
|
|
980
|
+
v24.object({
|
|
981
|
+
address: v24.string(),
|
|
982
|
+
amount: v24.number()
|
|
983
|
+
})
|
|
984
|
+
)
|
|
877
985
|
});
|
|
878
|
-
var
|
|
986
|
+
var sendTransferResultSchema = v24.object({
|
|
879
987
|
/**
|
|
880
|
-
* The
|
|
988
|
+
* The transaction id as a hex-encoded string.
|
|
881
989
|
*/
|
|
882
|
-
|
|
883
|
-
network: getNetworkResultSchema
|
|
990
|
+
txid: v24.string()
|
|
884
991
|
});
|
|
885
|
-
var
|
|
992
|
+
var sendTransferRequestMessageSchema = v24.object({
|
|
886
993
|
...rpcRequestMessageSchema.entries,
|
|
887
|
-
...
|
|
888
|
-
method:
|
|
889
|
-
params:
|
|
890
|
-
id:
|
|
994
|
+
...v24.object({
|
|
995
|
+
method: v24.literal(sendTransferMethodName),
|
|
996
|
+
params: sendTransferParamsSchema,
|
|
997
|
+
id: v24.string()
|
|
891
998
|
}).entries
|
|
892
999
|
});
|
|
1000
|
+
|
|
1001
|
+
// src/request/types/btcMethods/signMessage.ts
|
|
1002
|
+
var v25 = __toESM(require("valibot"));
|
|
893
1003
|
var signMessageMethodName = "signMessage";
|
|
894
|
-
var
|
|
895
|
-
MessageSigningProtocols2["ECDSA"] = "ECDSA";
|
|
896
|
-
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
897
|
-
return MessageSigningProtocols2;
|
|
898
|
-
})(MessageSigningProtocols || {});
|
|
899
|
-
var signMessageParamsSchema = v20.object({
|
|
1004
|
+
var signMessageParamsSchema = v25.object({
|
|
900
1005
|
/**
|
|
901
1006
|
* The address used for signing.
|
|
902
1007
|
**/
|
|
903
|
-
address:
|
|
1008
|
+
address: v25.string(),
|
|
904
1009
|
/**
|
|
905
1010
|
* The message to sign.
|
|
906
1011
|
**/
|
|
907
|
-
message:
|
|
1012
|
+
message: v25.string(),
|
|
908
1013
|
/**
|
|
909
1014
|
* The protocol to use for signing the message.
|
|
910
1015
|
*/
|
|
911
|
-
protocol:
|
|
1016
|
+
protocol: v25.optional(v25.enum(MessageSigningProtocols))
|
|
912
1017
|
});
|
|
913
|
-
var signMessageResultSchema =
|
|
1018
|
+
var signMessageResultSchema = v25.object({
|
|
914
1019
|
/**
|
|
915
1020
|
* The signature of the message.
|
|
916
1021
|
*/
|
|
917
|
-
signature:
|
|
1022
|
+
signature: v25.string(),
|
|
918
1023
|
/**
|
|
919
1024
|
* hash of the message.
|
|
920
1025
|
*/
|
|
921
|
-
messageHash:
|
|
1026
|
+
messageHash: v25.string(),
|
|
922
1027
|
/**
|
|
923
1028
|
* The address used for signing.
|
|
924
1029
|
*/
|
|
925
|
-
address:
|
|
1030
|
+
address: v25.string(),
|
|
926
1031
|
/**
|
|
927
1032
|
* The protocol to use for signing the message.
|
|
928
1033
|
*/
|
|
929
|
-
protocol:
|
|
1034
|
+
protocol: v25.enum(MessageSigningProtocols)
|
|
930
1035
|
});
|
|
931
|
-
var signMessageRequestMessageSchema =
|
|
1036
|
+
var signMessageRequestMessageSchema = v25.object({
|
|
932
1037
|
...rpcRequestMessageSchema.entries,
|
|
933
|
-
...
|
|
934
|
-
method:
|
|
1038
|
+
...v25.object({
|
|
1039
|
+
method: v25.literal(signMessageMethodName),
|
|
935
1040
|
params: signMessageParamsSchema,
|
|
936
|
-
id:
|
|
1041
|
+
id: v25.string()
|
|
937
1042
|
}).entries
|
|
938
1043
|
});
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
})
|
|
958
|
-
|
|
1044
|
+
|
|
1045
|
+
// src/request/types/btcMethods/signMultipleMessages.ts
|
|
1046
|
+
var v26 = __toESM(require("valibot"));
|
|
1047
|
+
var signMultipleMessagesMethodName = "signMultipleMessages";
|
|
1048
|
+
var signMultipleMessagesParamsSchema = v26.array(
|
|
1049
|
+
v26.object({
|
|
1050
|
+
/**
|
|
1051
|
+
* The address used for signing.
|
|
1052
|
+
**/
|
|
1053
|
+
address: v26.string(),
|
|
1054
|
+
/**
|
|
1055
|
+
* The message to sign.
|
|
1056
|
+
**/
|
|
1057
|
+
message: v26.string(),
|
|
1058
|
+
/**
|
|
1059
|
+
* The protocol to use for signing the message.
|
|
1060
|
+
*/
|
|
1061
|
+
protocol: v26.optional(v26.enum(MessageSigningProtocols))
|
|
1062
|
+
})
|
|
1063
|
+
);
|
|
1064
|
+
var signMultipleMessagesResultSchema = v26.array(
|
|
1065
|
+
v26.object({
|
|
1066
|
+
/**
|
|
1067
|
+
* The signature of the message.
|
|
1068
|
+
*/
|
|
1069
|
+
signature: v26.string(),
|
|
1070
|
+
/**
|
|
1071
|
+
* The original message which was signed.
|
|
1072
|
+
*/
|
|
1073
|
+
message: v26.string(),
|
|
1074
|
+
/**
|
|
1075
|
+
* Hash of the message.
|
|
1076
|
+
*/
|
|
1077
|
+
messageHash: v26.string(),
|
|
1078
|
+
/**
|
|
1079
|
+
* The address used for signing.
|
|
1080
|
+
*/
|
|
1081
|
+
address: v26.string(),
|
|
1082
|
+
/**
|
|
1083
|
+
* The protocol to use for signing the message.
|
|
1084
|
+
*/
|
|
1085
|
+
protocol: v26.enum(MessageSigningProtocols)
|
|
1086
|
+
})
|
|
1087
|
+
);
|
|
1088
|
+
var signMultipleMessagesRequestMessageSchema = v26.object({
|
|
959
1089
|
...rpcRequestMessageSchema.entries,
|
|
960
|
-
...
|
|
961
|
-
method:
|
|
962
|
-
params:
|
|
963
|
-
id:
|
|
1090
|
+
...v26.object({
|
|
1091
|
+
method: v26.literal(signMultipleMessagesMethodName),
|
|
1092
|
+
params: signMultipleMessagesParamsSchema,
|
|
1093
|
+
id: v26.string()
|
|
964
1094
|
}).entries
|
|
965
1095
|
});
|
|
1096
|
+
|
|
1097
|
+
// src/request/types/btcMethods/signPSBT.ts
|
|
1098
|
+
var v27 = __toESM(require("valibot"));
|
|
966
1099
|
var signPsbtMethodName = "signPsbt";
|
|
967
|
-
var signPsbtParamsSchema =
|
|
1100
|
+
var signPsbtParamsSchema = v27.object({
|
|
968
1101
|
/**
|
|
969
1102
|
* The base64 encoded PSBT to sign.
|
|
970
1103
|
*/
|
|
971
|
-
psbt:
|
|
1104
|
+
psbt: v27.string(),
|
|
972
1105
|
/**
|
|
973
1106
|
* The inputs to sign.
|
|
974
1107
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
975
1108
|
*/
|
|
976
|
-
signInputs:
|
|
1109
|
+
signInputs: v27.optional(v27.record(v27.string(), v27.array(v27.number()))),
|
|
977
1110
|
/**
|
|
978
1111
|
* Whether to broadcast the transaction after signing.
|
|
979
1112
|
**/
|
|
980
|
-
broadcast:
|
|
1113
|
+
broadcast: v27.optional(v27.boolean())
|
|
981
1114
|
});
|
|
982
|
-
var signPsbtResultSchema =
|
|
1115
|
+
var signPsbtResultSchema = v27.object({
|
|
983
1116
|
/**
|
|
984
1117
|
* The base64 encoded PSBT after signing.
|
|
985
1118
|
*/
|
|
986
|
-
psbt:
|
|
1119
|
+
psbt: v27.string(),
|
|
987
1120
|
/**
|
|
988
1121
|
* The transaction id as a hex-encoded string.
|
|
989
1122
|
* This is only returned if the transaction was broadcast.
|
|
990
1123
|
**/
|
|
991
|
-
txid:
|
|
1124
|
+
txid: v27.optional(v27.string())
|
|
992
1125
|
});
|
|
993
|
-
var signPsbtRequestMessageSchema =
|
|
1126
|
+
var signPsbtRequestMessageSchema = v27.object({
|
|
994
1127
|
...rpcRequestMessageSchema.entries,
|
|
995
|
-
...
|
|
996
|
-
method:
|
|
1128
|
+
...v27.object({
|
|
1129
|
+
method: v27.literal(signPsbtMethodName),
|
|
997
1130
|
params: signPsbtParamsSchema,
|
|
998
|
-
id:
|
|
999
|
-
}).entries
|
|
1000
|
-
});
|
|
1001
|
-
var getAccountsMethodName = "getAccounts";
|
|
1002
|
-
var getAccountsParamsSchema = v20.object({
|
|
1003
|
-
/**
|
|
1004
|
-
* The purposes for which to generate addresses. See
|
|
1005
|
-
* {@linkcode AddressPurpose} for available purposes.
|
|
1006
|
-
*/
|
|
1007
|
-
purposes: v20.array(v20.enum(AddressPurpose)),
|
|
1008
|
-
/**
|
|
1009
|
-
* A message to be displayed to the user in the request prompt.
|
|
1010
|
-
*/
|
|
1011
|
-
message: v20.optional(v20.string())
|
|
1012
|
-
});
|
|
1013
|
-
var getAccountsResultSchema = v20.array(
|
|
1014
|
-
v20.object({
|
|
1015
|
-
...addressSchema.entries,
|
|
1016
|
-
...v20.object({
|
|
1017
|
-
walletType: walletTypeSchema
|
|
1018
|
-
}).entries
|
|
1019
|
-
})
|
|
1020
|
-
);
|
|
1021
|
-
var getAccountsRequestMessageSchema = v20.object({
|
|
1022
|
-
...rpcRequestMessageSchema.entries,
|
|
1023
|
-
...v20.object({
|
|
1024
|
-
method: v20.literal(getAccountsMethodName),
|
|
1025
|
-
params: getAccountsParamsSchema,
|
|
1026
|
-
id: v20.string()
|
|
1027
|
-
}).entries
|
|
1028
|
-
});
|
|
1029
|
-
var getBalanceMethodName = "getBalance";
|
|
1030
|
-
var getBalanceParamsSchema = v20.nullish(v20.null());
|
|
1031
|
-
var getBalanceResultSchema = v20.object({
|
|
1032
|
-
/**
|
|
1033
|
-
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
1034
|
-
* messages not supporting bigint
|
|
1035
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
1036
|
-
*/
|
|
1037
|
-
confirmed: v20.string(),
|
|
1038
|
-
/**
|
|
1039
|
-
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
1040
|
-
* messages not supporting bigint
|
|
1041
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
1042
|
-
*/
|
|
1043
|
-
unconfirmed: v20.string(),
|
|
1044
|
-
/**
|
|
1045
|
-
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
1046
|
-
* sats. Using a string due to chrome messages not supporting bigint
|
|
1047
|
-
* (https://issues.chromium.org/issues/40116184).
|
|
1048
|
-
*/
|
|
1049
|
-
total: v20.string()
|
|
1050
|
-
});
|
|
1051
|
-
var getBalanceRequestMessageSchema = v20.object({
|
|
1052
|
-
...rpcRequestMessageSchema.entries,
|
|
1053
|
-
...v20.object({
|
|
1054
|
-
method: v20.literal(getBalanceMethodName),
|
|
1055
|
-
id: v20.string()
|
|
1131
|
+
id: v27.string()
|
|
1056
1132
|
}).entries
|
|
1057
1133
|
});
|
|
1058
1134
|
|
|
1059
1135
|
// src/request/types/ordinalsMethods.ts
|
|
1060
|
-
var
|
|
1136
|
+
var v28 = __toESM(require("valibot"));
|
|
1061
1137
|
var getInscriptionsMethodName = "ord_getInscriptions";
|
|
1062
|
-
var getInscriptionsParamsSchema =
|
|
1063
|
-
offset:
|
|
1064
|
-
limit:
|
|
1065
|
-
});
|
|
1066
|
-
var getInscriptionsResultSchema =
|
|
1067
|
-
total:
|
|
1068
|
-
limit:
|
|
1069
|
-
offset:
|
|
1070
|
-
inscriptions:
|
|
1071
|
-
|
|
1072
|
-
inscriptionId:
|
|
1073
|
-
inscriptionNumber:
|
|
1074
|
-
address:
|
|
1075
|
-
collectionName:
|
|
1076
|
-
postage:
|
|
1077
|
-
contentLength:
|
|
1078
|
-
contentType:
|
|
1079
|
-
timestamp:
|
|
1080
|
-
offset:
|
|
1081
|
-
genesisTransaction:
|
|
1082
|
-
output:
|
|
1138
|
+
var getInscriptionsParamsSchema = v28.object({
|
|
1139
|
+
offset: v28.number(),
|
|
1140
|
+
limit: v28.number()
|
|
1141
|
+
});
|
|
1142
|
+
var getInscriptionsResultSchema = v28.object({
|
|
1143
|
+
total: v28.number(),
|
|
1144
|
+
limit: v28.number(),
|
|
1145
|
+
offset: v28.number(),
|
|
1146
|
+
inscriptions: v28.array(
|
|
1147
|
+
v28.object({
|
|
1148
|
+
inscriptionId: v28.string(),
|
|
1149
|
+
inscriptionNumber: v28.string(),
|
|
1150
|
+
address: v28.string(),
|
|
1151
|
+
collectionName: v28.optional(v28.string()),
|
|
1152
|
+
postage: v28.string(),
|
|
1153
|
+
contentLength: v28.string(),
|
|
1154
|
+
contentType: v28.string(),
|
|
1155
|
+
timestamp: v28.number(),
|
|
1156
|
+
offset: v28.number(),
|
|
1157
|
+
genesisTransaction: v28.string(),
|
|
1158
|
+
output: v28.string()
|
|
1083
1159
|
})
|
|
1084
1160
|
)
|
|
1085
1161
|
});
|
|
1086
|
-
var getInscriptionsRequestMessageSchema =
|
|
1162
|
+
var getInscriptionsRequestMessageSchema = v28.object({
|
|
1087
1163
|
...rpcRequestMessageSchema.entries,
|
|
1088
|
-
...
|
|
1089
|
-
method:
|
|
1164
|
+
...v28.object({
|
|
1165
|
+
method: v28.literal(getInscriptionsMethodName),
|
|
1090
1166
|
params: getInscriptionsParamsSchema,
|
|
1091
|
-
id:
|
|
1167
|
+
id: v28.string()
|
|
1092
1168
|
}).entries
|
|
1093
1169
|
});
|
|
1094
1170
|
var sendInscriptionsMethodName = "ord_sendInscriptions";
|
|
1095
|
-
var sendInscriptionsParamsSchema =
|
|
1096
|
-
transfers:
|
|
1097
|
-
|
|
1098
|
-
address:
|
|
1099
|
-
inscriptionId:
|
|
1171
|
+
var sendInscriptionsParamsSchema = v28.object({
|
|
1172
|
+
transfers: v28.array(
|
|
1173
|
+
v28.object({
|
|
1174
|
+
address: v28.string(),
|
|
1175
|
+
inscriptionId: v28.string()
|
|
1100
1176
|
})
|
|
1101
1177
|
)
|
|
1102
1178
|
});
|
|
1103
|
-
var sendInscriptionsResultSchema =
|
|
1104
|
-
txid:
|
|
1179
|
+
var sendInscriptionsResultSchema = v28.object({
|
|
1180
|
+
txid: v28.string()
|
|
1105
1181
|
});
|
|
1106
|
-
var sendInscriptionsRequestMessageSchema =
|
|
1182
|
+
var sendInscriptionsRequestMessageSchema = v28.object({
|
|
1107
1183
|
...rpcRequestMessageSchema.entries,
|
|
1108
|
-
...
|
|
1109
|
-
method:
|
|
1184
|
+
...v28.object({
|
|
1185
|
+
method: v28.literal(sendInscriptionsMethodName),
|
|
1110
1186
|
params: sendInscriptionsParamsSchema,
|
|
1111
|
-
id:
|
|
1187
|
+
id: v28.string()
|
|
1112
1188
|
}).entries
|
|
1113
1189
|
});
|
|
1114
1190
|
|
|
1115
1191
|
// src/request/types/runesMethods/etch.ts
|
|
1116
|
-
var
|
|
1192
|
+
var v29 = __toESM(require("valibot"));
|
|
1117
1193
|
var runesEtchMethodName = "runes_etch";
|
|
1118
|
-
var etchTermsSchema =
|
|
1119
|
-
amount:
|
|
1120
|
-
cap:
|
|
1121
|
-
heightStart:
|
|
1122
|
-
heightEnd:
|
|
1123
|
-
offsetStart:
|
|
1124
|
-
offsetEnd:
|
|
1125
|
-
});
|
|
1126
|
-
var inscriptionDetailsSchema =
|
|
1127
|
-
contentType:
|
|
1128
|
-
contentBase64:
|
|
1129
|
-
});
|
|
1130
|
-
var runesEtchParamsSchema =
|
|
1131
|
-
runeName:
|
|
1132
|
-
divisibility:
|
|
1133
|
-
symbol:
|
|
1134
|
-
premine:
|
|
1135
|
-
isMintable:
|
|
1136
|
-
delegateInscriptionId:
|
|
1137
|
-
destinationAddress:
|
|
1138
|
-
refundAddress:
|
|
1139
|
-
feeRate:
|
|
1140
|
-
appServiceFee:
|
|
1141
|
-
appServiceFeeAddress:
|
|
1142
|
-
terms:
|
|
1143
|
-
inscriptionDetails:
|
|
1144
|
-
network:
|
|
1145
|
-
});
|
|
1146
|
-
var runesEtchResultSchema =
|
|
1147
|
-
orderId:
|
|
1148
|
-
fundTransactionId:
|
|
1149
|
-
fundingAddress:
|
|
1150
|
-
});
|
|
1151
|
-
var runesEtchRequestMessageSchema =
|
|
1194
|
+
var etchTermsSchema = v29.object({
|
|
1195
|
+
amount: v29.string(),
|
|
1196
|
+
cap: v29.string(),
|
|
1197
|
+
heightStart: v29.optional(v29.string()),
|
|
1198
|
+
heightEnd: v29.optional(v29.string()),
|
|
1199
|
+
offsetStart: v29.optional(v29.string()),
|
|
1200
|
+
offsetEnd: v29.optional(v29.string())
|
|
1201
|
+
});
|
|
1202
|
+
var inscriptionDetailsSchema = v29.object({
|
|
1203
|
+
contentType: v29.string(),
|
|
1204
|
+
contentBase64: v29.string()
|
|
1205
|
+
});
|
|
1206
|
+
var runesEtchParamsSchema = v29.object({
|
|
1207
|
+
runeName: v29.string(),
|
|
1208
|
+
divisibility: v29.optional(v29.number()),
|
|
1209
|
+
symbol: v29.optional(v29.string()),
|
|
1210
|
+
premine: v29.optional(v29.string()),
|
|
1211
|
+
isMintable: v29.boolean(),
|
|
1212
|
+
delegateInscriptionId: v29.optional(v29.string()),
|
|
1213
|
+
destinationAddress: v29.string(),
|
|
1214
|
+
refundAddress: v29.string(),
|
|
1215
|
+
feeRate: v29.number(),
|
|
1216
|
+
appServiceFee: v29.optional(v29.number()),
|
|
1217
|
+
appServiceFeeAddress: v29.optional(v29.string()),
|
|
1218
|
+
terms: v29.optional(etchTermsSchema),
|
|
1219
|
+
inscriptionDetails: v29.optional(inscriptionDetailsSchema),
|
|
1220
|
+
network: v29.optional(v29.enum(BitcoinNetworkType))
|
|
1221
|
+
});
|
|
1222
|
+
var runesEtchResultSchema = v29.object({
|
|
1223
|
+
orderId: v29.string(),
|
|
1224
|
+
fundTransactionId: v29.string(),
|
|
1225
|
+
fundingAddress: v29.string()
|
|
1226
|
+
});
|
|
1227
|
+
var runesEtchRequestMessageSchema = v29.object({
|
|
1152
1228
|
...rpcRequestMessageSchema.entries,
|
|
1153
|
-
...
|
|
1154
|
-
method:
|
|
1229
|
+
...v29.object({
|
|
1230
|
+
method: v29.literal(runesEtchMethodName),
|
|
1155
1231
|
params: runesEtchParamsSchema,
|
|
1156
|
-
id:
|
|
1232
|
+
id: v29.string()
|
|
1157
1233
|
}).entries
|
|
1158
1234
|
});
|
|
1159
1235
|
|
|
1160
1236
|
// src/request/types/runesMethods/getBalance.ts
|
|
1161
|
-
var
|
|
1237
|
+
var v30 = __toESM(require("valibot"));
|
|
1162
1238
|
var runesGetBalanceMethodName = "runes_getBalance";
|
|
1163
|
-
var runesGetBalanceParamsSchema =
|
|
1164
|
-
var runesGetBalanceResultSchema =
|
|
1165
|
-
balances:
|
|
1166
|
-
|
|
1167
|
-
runeName:
|
|
1168
|
-
amount:
|
|
1169
|
-
divisibility:
|
|
1170
|
-
symbol:
|
|
1171
|
-
inscriptionId:
|
|
1172
|
-
spendableBalance:
|
|
1239
|
+
var runesGetBalanceParamsSchema = v30.nullish(v30.null());
|
|
1240
|
+
var runesGetBalanceResultSchema = v30.object({
|
|
1241
|
+
balances: v30.array(
|
|
1242
|
+
v30.object({
|
|
1243
|
+
runeName: v30.string(),
|
|
1244
|
+
amount: v30.string(),
|
|
1245
|
+
divisibility: v30.number(),
|
|
1246
|
+
symbol: v30.string(),
|
|
1247
|
+
inscriptionId: v30.nullish(v30.string()),
|
|
1248
|
+
spendableBalance: v30.string()
|
|
1173
1249
|
})
|
|
1174
1250
|
)
|
|
1175
1251
|
});
|
|
1176
|
-
var runesGetBalanceRequestMessageSchema =
|
|
1252
|
+
var runesGetBalanceRequestMessageSchema = v30.object({
|
|
1177
1253
|
...rpcRequestMessageSchema.entries,
|
|
1178
|
-
...
|
|
1179
|
-
method:
|
|
1254
|
+
...v30.object({
|
|
1255
|
+
method: v30.literal(runesGetBalanceMethodName),
|
|
1180
1256
|
params: runesGetBalanceParamsSchema,
|
|
1181
|
-
id:
|
|
1257
|
+
id: v30.string()
|
|
1182
1258
|
}).entries
|
|
1183
1259
|
});
|
|
1184
1260
|
|
|
1185
1261
|
// src/request/types/runesMethods/mint.ts
|
|
1186
|
-
var
|
|
1262
|
+
var v31 = __toESM(require("valibot"));
|
|
1187
1263
|
var runesMintMethodName = "runes_mint";
|
|
1188
|
-
var runesMintParamsSchema =
|
|
1189
|
-
appServiceFee:
|
|
1190
|
-
appServiceFeeAddress:
|
|
1191
|
-
destinationAddress:
|
|
1192
|
-
feeRate:
|
|
1193
|
-
refundAddress:
|
|
1194
|
-
repeats:
|
|
1195
|
-
runeName:
|
|
1196
|
-
network:
|
|
1197
|
-
});
|
|
1198
|
-
var runesMintResultSchema =
|
|
1199
|
-
orderId:
|
|
1200
|
-
fundTransactionId:
|
|
1201
|
-
fundingAddress:
|
|
1202
|
-
});
|
|
1203
|
-
var runesMintRequestMessageSchema =
|
|
1264
|
+
var runesMintParamsSchema = v31.object({
|
|
1265
|
+
appServiceFee: v31.optional(v31.number()),
|
|
1266
|
+
appServiceFeeAddress: v31.optional(v31.string()),
|
|
1267
|
+
destinationAddress: v31.string(),
|
|
1268
|
+
feeRate: v31.number(),
|
|
1269
|
+
refundAddress: v31.string(),
|
|
1270
|
+
repeats: v31.number(),
|
|
1271
|
+
runeName: v31.string(),
|
|
1272
|
+
network: v31.optional(v31.enum(BitcoinNetworkType))
|
|
1273
|
+
});
|
|
1274
|
+
var runesMintResultSchema = v31.object({
|
|
1275
|
+
orderId: v31.string(),
|
|
1276
|
+
fundTransactionId: v31.string(),
|
|
1277
|
+
fundingAddress: v31.string()
|
|
1278
|
+
});
|
|
1279
|
+
var runesMintRequestMessageSchema = v31.object({
|
|
1204
1280
|
...rpcRequestMessageSchema.entries,
|
|
1205
|
-
...
|
|
1206
|
-
method:
|
|
1281
|
+
...v31.object({
|
|
1282
|
+
method: v31.literal(runesMintMethodName),
|
|
1207
1283
|
params: runesMintParamsSchema,
|
|
1208
|
-
id:
|
|
1284
|
+
id: v31.string()
|
|
1209
1285
|
}).entries
|
|
1210
1286
|
});
|
|
1211
1287
|
|
|
1212
1288
|
// src/request/types/runesMethods/transfer.ts
|
|
1213
|
-
var
|
|
1289
|
+
var v32 = __toESM(require("valibot"));
|
|
1214
1290
|
var runesTransferMethodName = "runes_transfer";
|
|
1215
|
-
var runesTransferParamsSchema =
|
|
1216
|
-
recipients:
|
|
1217
|
-
|
|
1218
|
-
runeName:
|
|
1219
|
-
amount:
|
|
1220
|
-
address:
|
|
1291
|
+
var runesTransferParamsSchema = v32.object({
|
|
1292
|
+
recipients: v32.array(
|
|
1293
|
+
v32.object({
|
|
1294
|
+
runeName: v32.string(),
|
|
1295
|
+
amount: v32.string(),
|
|
1296
|
+
address: v32.string()
|
|
1221
1297
|
})
|
|
1222
1298
|
)
|
|
1223
1299
|
});
|
|
1224
|
-
var runesTransferResultSchema =
|
|
1225
|
-
txid:
|
|
1300
|
+
var runesTransferResultSchema = v32.object({
|
|
1301
|
+
txid: v32.string()
|
|
1226
1302
|
});
|
|
1227
|
-
var runesTransferRequestMessageSchema =
|
|
1303
|
+
var runesTransferRequestMessageSchema = v32.object({
|
|
1228
1304
|
...rpcRequestMessageSchema.entries,
|
|
1229
|
-
...
|
|
1230
|
-
method:
|
|
1305
|
+
...v32.object({
|
|
1306
|
+
method: v32.literal(runesTransferMethodName),
|
|
1231
1307
|
params: runesTransferParamsSchema,
|
|
1232
|
-
id:
|
|
1308
|
+
id: v32.string()
|
|
1233
1309
|
}).entries
|
|
1234
1310
|
});
|
|
1235
1311
|
|
|
1236
1312
|
// src/request/types/sparkMethods/flashnetMethods/clawbackFunds.ts
|
|
1237
|
-
var
|
|
1313
|
+
var v33 = __toESM(require("valibot"));
|
|
1238
1314
|
var sparkFlashnetClawbackFundsMethodName = "spark_flashnet_clawbackFunds";
|
|
1239
|
-
var sparkFlashnetClawbackFundsParamsSchema =
|
|
1240
|
-
sparkTransferId:
|
|
1241
|
-
lpIdentityPublicKey:
|
|
1242
|
-
});
|
|
1243
|
-
var sparkFlashnetClawbackFundsResultSchema =
|
|
1244
|
-
requestId:
|
|
1245
|
-
accepted:
|
|
1246
|
-
internalRequestId:
|
|
1247
|
-
sparkStatusTrackingId:
|
|
1248
|
-
error:
|
|
1249
|
-
});
|
|
1250
|
-
var sparkFlashnetClawbackFundsRequestMessageSchema =
|
|
1315
|
+
var sparkFlashnetClawbackFundsParamsSchema = v33.object({
|
|
1316
|
+
sparkTransferId: v33.string(),
|
|
1317
|
+
lpIdentityPublicKey: v33.string()
|
|
1318
|
+
});
|
|
1319
|
+
var sparkFlashnetClawbackFundsResultSchema = v33.object({
|
|
1320
|
+
requestId: v33.string(),
|
|
1321
|
+
accepted: v33.boolean(),
|
|
1322
|
+
internalRequestId: v33.optional(v33.string()),
|
|
1323
|
+
sparkStatusTrackingId: v33.optional(v33.string()),
|
|
1324
|
+
error: v33.optional(v33.string())
|
|
1325
|
+
});
|
|
1326
|
+
var sparkFlashnetClawbackFundsRequestMessageSchema = v33.object({
|
|
1251
1327
|
...rpcRequestMessageSchema.entries,
|
|
1252
|
-
...
|
|
1253
|
-
method:
|
|
1328
|
+
...v33.object({
|
|
1329
|
+
method: v33.literal(sparkFlashnetClawbackFundsMethodName),
|
|
1254
1330
|
params: sparkFlashnetClawbackFundsParamsSchema,
|
|
1255
|
-
id:
|
|
1331
|
+
id: v33.string()
|
|
1256
1332
|
}).entries
|
|
1257
1333
|
});
|
|
1258
1334
|
|
|
1259
1335
|
// src/request/types/sparkMethods/flashnetMethods/executeRouteSwap.ts
|
|
1260
|
-
var
|
|
1336
|
+
var v34 = __toESM(require("valibot"));
|
|
1261
1337
|
var sparkFlashnetExecuteRouteSwapMethodName = "spark_flashnet_executeRouteSwap";
|
|
1262
|
-
var sparkFlashnetExecuteRouteSwapParamsSchema =
|
|
1263
|
-
hops:
|
|
1264
|
-
|
|
1265
|
-
poolId:
|
|
1266
|
-
assetInAddress:
|
|
1267
|
-
assetOutAddress:
|
|
1268
|
-
hopIntegratorFeeRateBps:
|
|
1338
|
+
var sparkFlashnetExecuteRouteSwapParamsSchema = v34.object({
|
|
1339
|
+
hops: v34.array(
|
|
1340
|
+
v34.object({
|
|
1341
|
+
poolId: v34.string(),
|
|
1342
|
+
assetInAddress: v34.string(),
|
|
1343
|
+
assetOutAddress: v34.string(),
|
|
1344
|
+
hopIntegratorFeeRateBps: v34.optional(v34.number())
|
|
1269
1345
|
})
|
|
1270
1346
|
),
|
|
1271
|
-
initialAssetAddress:
|
|
1272
|
-
inputAmount:
|
|
1273
|
-
maxRouteSlippageBps:
|
|
1274
|
-
minAmountOut:
|
|
1275
|
-
integratorFeeRateBps:
|
|
1276
|
-
integratorPublicKey:
|
|
1277
|
-
});
|
|
1278
|
-
var sparkFlashnetExecuteRouteSwapResultSchema =
|
|
1279
|
-
requestId:
|
|
1280
|
-
accepted:
|
|
1281
|
-
outputAmount:
|
|
1282
|
-
executionPrice:
|
|
1283
|
-
finalOutboundTransferId:
|
|
1284
|
-
error:
|
|
1285
|
-
});
|
|
1286
|
-
var sparkFlashnetExecuteRouteSwapRequestMessageSchema =
|
|
1347
|
+
initialAssetAddress: v34.string(),
|
|
1348
|
+
inputAmount: v34.string(),
|
|
1349
|
+
maxRouteSlippageBps: v34.string(),
|
|
1350
|
+
minAmountOut: v34.optional(v34.string()),
|
|
1351
|
+
integratorFeeRateBps: v34.optional(v34.number()),
|
|
1352
|
+
integratorPublicKey: v34.optional(v34.string())
|
|
1353
|
+
});
|
|
1354
|
+
var sparkFlashnetExecuteRouteSwapResultSchema = v34.object({
|
|
1355
|
+
requestId: v34.string(),
|
|
1356
|
+
accepted: v34.boolean(),
|
|
1357
|
+
outputAmount: v34.string(),
|
|
1358
|
+
executionPrice: v34.string(),
|
|
1359
|
+
finalOutboundTransferId: v34.string(),
|
|
1360
|
+
error: v34.optional(v34.string())
|
|
1361
|
+
});
|
|
1362
|
+
var sparkFlashnetExecuteRouteSwapRequestMessageSchema = v34.object({
|
|
1287
1363
|
...rpcRequestMessageSchema.entries,
|
|
1288
|
-
...
|
|
1289
|
-
method:
|
|
1364
|
+
...v34.object({
|
|
1365
|
+
method: v34.literal(sparkFlashnetExecuteRouteSwapMethodName),
|
|
1290
1366
|
params: sparkFlashnetExecuteRouteSwapParamsSchema,
|
|
1291
|
-
id:
|
|
1367
|
+
id: v34.string()
|
|
1292
1368
|
}).entries
|
|
1293
1369
|
});
|
|
1294
1370
|
|
|
1295
1371
|
// src/request/types/sparkMethods/flashnetMethods/executeSwap.ts
|
|
1296
|
-
var
|
|
1372
|
+
var v35 = __toESM(require("valibot"));
|
|
1297
1373
|
var sparkFlashnetExecuteSwapMethodName = "spark_flashnet_executeSwap";
|
|
1298
|
-
var sparkFlashnetExecuteSwapParamsSchema =
|
|
1299
|
-
poolId:
|
|
1300
|
-
assetInAddress:
|
|
1301
|
-
assetOutAddress:
|
|
1302
|
-
amountIn:
|
|
1303
|
-
maxSlippageBps:
|
|
1304
|
-
minAmountOut:
|
|
1305
|
-
integratorFeeRateBps:
|
|
1306
|
-
integratorPublicKey:
|
|
1307
|
-
});
|
|
1308
|
-
var sparkFlashnetExecuteSwapResultSchema =
|
|
1309
|
-
requestId:
|
|
1310
|
-
accepted:
|
|
1311
|
-
amountOut:
|
|
1312
|
-
feeAmount:
|
|
1313
|
-
executionPrice:
|
|
1314
|
-
assetOutAddress:
|
|
1315
|
-
assetInAddress:
|
|
1316
|
-
outboundTransferId:
|
|
1317
|
-
error:
|
|
1318
|
-
});
|
|
1319
|
-
var sparkFlashnetExecuteSwapRequestMessageSchema =
|
|
1374
|
+
var sparkFlashnetExecuteSwapParamsSchema = v35.object({
|
|
1375
|
+
poolId: v35.string(),
|
|
1376
|
+
assetInAddress: v35.string(),
|
|
1377
|
+
assetOutAddress: v35.string(),
|
|
1378
|
+
amountIn: v35.string(),
|
|
1379
|
+
maxSlippageBps: v35.number(),
|
|
1380
|
+
minAmountOut: v35.optional(v35.string()),
|
|
1381
|
+
integratorFeeRateBps: v35.optional(v35.number()),
|
|
1382
|
+
integratorPublicKey: v35.optional(v35.string())
|
|
1383
|
+
});
|
|
1384
|
+
var sparkFlashnetExecuteSwapResultSchema = v35.object({
|
|
1385
|
+
requestId: v35.string(),
|
|
1386
|
+
accepted: v35.boolean(),
|
|
1387
|
+
amountOut: v35.optional(v35.string()),
|
|
1388
|
+
feeAmount: v35.optional(v35.string()),
|
|
1389
|
+
executionPrice: v35.optional(v35.string()),
|
|
1390
|
+
assetOutAddress: v35.optional(v35.string()),
|
|
1391
|
+
assetInAddress: v35.optional(v35.string()),
|
|
1392
|
+
outboundTransferId: v35.optional(v35.string()),
|
|
1393
|
+
error: v35.optional(v35.string())
|
|
1394
|
+
});
|
|
1395
|
+
var sparkFlashnetExecuteSwapRequestMessageSchema = v35.object({
|
|
1320
1396
|
...rpcRequestMessageSchema.entries,
|
|
1321
|
-
...
|
|
1322
|
-
method:
|
|
1397
|
+
...v35.object({
|
|
1398
|
+
method: v35.literal(sparkFlashnetExecuteSwapMethodName),
|
|
1323
1399
|
params: sparkFlashnetExecuteSwapParamsSchema,
|
|
1324
|
-
id:
|
|
1400
|
+
id: v35.string()
|
|
1325
1401
|
}).entries
|
|
1326
1402
|
});
|
|
1327
1403
|
|
|
1328
1404
|
// src/request/types/sparkMethods/flashnetMethods/getClawbackEligibleTransfers.ts
|
|
1329
|
-
var
|
|
1405
|
+
var v36 = __toESM(require("valibot"));
|
|
1330
1406
|
var sparkGetClawbackEligibleTransfersMethodName = "spark_flashnet_getClawbackEligibleTransfers";
|
|
1331
|
-
var sparkGetClawbackEligibleTransfersParamsSchema =
|
|
1332
|
-
var sparkGetClawbackEligibleTransfersResultSchema =
|
|
1333
|
-
eligibleTransfers:
|
|
1334
|
-
|
|
1335
|
-
txId:
|
|
1336
|
-
createdAt:
|
|
1337
|
-
lpIdentityPublicKey:
|
|
1407
|
+
var sparkGetClawbackEligibleTransfersParamsSchema = v36.nullish(v36.null());
|
|
1408
|
+
var sparkGetClawbackEligibleTransfersResultSchema = v36.object({
|
|
1409
|
+
eligibleTransfers: v36.array(
|
|
1410
|
+
v36.object({
|
|
1411
|
+
txId: v36.string(),
|
|
1412
|
+
createdAt: v36.string(),
|
|
1413
|
+
lpIdentityPublicKey: v36.string()
|
|
1338
1414
|
})
|
|
1339
1415
|
)
|
|
1340
1416
|
});
|
|
1341
|
-
var sparkGetClawbackEligibleTransfersRequestMessageSchema =
|
|
1417
|
+
var sparkGetClawbackEligibleTransfersRequestMessageSchema = v36.object({
|
|
1342
1418
|
...rpcRequestMessageSchema.entries,
|
|
1343
|
-
...
|
|
1344
|
-
method:
|
|
1419
|
+
...v36.object({
|
|
1420
|
+
method: v36.literal(sparkGetClawbackEligibleTransfersMethodName),
|
|
1345
1421
|
params: sparkGetClawbackEligibleTransfersParamsSchema,
|
|
1346
|
-
id:
|
|
1422
|
+
id: v36.string()
|
|
1347
1423
|
}).entries
|
|
1348
1424
|
});
|
|
1349
1425
|
|
|
1350
1426
|
// src/request/types/sparkMethods/flashnetMethods/getJwt.ts
|
|
1351
|
-
var
|
|
1427
|
+
var v37 = __toESM(require("valibot"));
|
|
1352
1428
|
var sparkFlashnetGetJwtMethodName = "spark_flashnet_getJwt";
|
|
1353
|
-
var sparkFlashnetGetJwtParamsSchema =
|
|
1354
|
-
var sparkFlashnetGetJwtResultSchema =
|
|
1429
|
+
var sparkFlashnetGetJwtParamsSchema = v37.null();
|
|
1430
|
+
var sparkFlashnetGetJwtResultSchema = v37.object({
|
|
1355
1431
|
/**
|
|
1356
1432
|
* The JWT token for authenticated requests to the Flashnet API.
|
|
1357
1433
|
*/
|
|
1358
|
-
jwt:
|
|
1434
|
+
jwt: v37.string()
|
|
1359
1435
|
});
|
|
1360
|
-
var sparkFlashnetGetJwtRequestMessageSchema =
|
|
1436
|
+
var sparkFlashnetGetJwtRequestMessageSchema = v37.object({
|
|
1361
1437
|
...rpcRequestMessageSchema.entries,
|
|
1362
|
-
...
|
|
1363
|
-
method:
|
|
1438
|
+
...v37.object({
|
|
1439
|
+
method: v37.literal(sparkFlashnetGetJwtMethodName),
|
|
1364
1440
|
params: sparkFlashnetGetJwtParamsSchema,
|
|
1365
|
-
id:
|
|
1441
|
+
id: v37.string()
|
|
1366
1442
|
}).entries
|
|
1367
1443
|
});
|
|
1368
1444
|
|
|
1369
1445
|
// src/request/types/sparkMethods/flashnetMethods/intents/addLiquidity.ts
|
|
1370
|
-
var
|
|
1371
|
-
var sparkFlashnetAddLiquidityIntentSchema =
|
|
1372
|
-
type:
|
|
1373
|
-
data:
|
|
1374
|
-
userPublicKey:
|
|
1375
|
-
poolId:
|
|
1376
|
-
assetAAmount:
|
|
1377
|
-
assetBAmount:
|
|
1378
|
-
assetAMinAmountIn:
|
|
1379
|
-
assetBMinAmountIn:
|
|
1380
|
-
assetATransferId:
|
|
1381
|
-
assetBTransferId:
|
|
1382
|
-
nonce:
|
|
1446
|
+
var v38 = __toESM(require("valibot"));
|
|
1447
|
+
var sparkFlashnetAddLiquidityIntentSchema = v38.object({
|
|
1448
|
+
type: v38.literal("addLiquidity"),
|
|
1449
|
+
data: v38.object({
|
|
1450
|
+
userPublicKey: v38.string(),
|
|
1451
|
+
poolId: v38.string(),
|
|
1452
|
+
assetAAmount: v38.string(),
|
|
1453
|
+
assetBAmount: v38.string(),
|
|
1454
|
+
assetAMinAmountIn: v38.string(),
|
|
1455
|
+
assetBMinAmountIn: v38.string(),
|
|
1456
|
+
assetATransferId: v38.string(),
|
|
1457
|
+
assetBTransferId: v38.string(),
|
|
1458
|
+
nonce: v38.string()
|
|
1383
1459
|
})
|
|
1384
1460
|
});
|
|
1385
1461
|
|
|
1386
1462
|
// src/request/types/sparkMethods/flashnetMethods/intents/clawback.ts
|
|
1387
|
-
var
|
|
1388
|
-
var sparkFlashnetClawbackIntentSchema =
|
|
1389
|
-
type:
|
|
1390
|
-
data:
|
|
1391
|
-
senderPublicKey:
|
|
1392
|
-
sparkTransferId:
|
|
1393
|
-
lpIdentityPublicKey:
|
|
1394
|
-
nonce:
|
|
1463
|
+
var v39 = __toESM(require("valibot"));
|
|
1464
|
+
var sparkFlashnetClawbackIntentSchema = v39.object({
|
|
1465
|
+
type: v39.literal("clawback"),
|
|
1466
|
+
data: v39.object({
|
|
1467
|
+
senderPublicKey: v39.string(),
|
|
1468
|
+
sparkTransferId: v39.string(),
|
|
1469
|
+
lpIdentityPublicKey: v39.string(),
|
|
1470
|
+
nonce: v39.string()
|
|
1395
1471
|
})
|
|
1396
1472
|
});
|
|
1397
1473
|
|
|
1398
1474
|
// src/request/types/sparkMethods/flashnetMethods/intents/confirmInitialDeposit.ts
|
|
1399
|
-
var
|
|
1400
|
-
var sparkFlashnetConfirmInitialDepositIntentSchema =
|
|
1401
|
-
type:
|
|
1402
|
-
data:
|
|
1403
|
-
poolId:
|
|
1404
|
-
assetASparkTransferId:
|
|
1405
|
-
poolOwnerPublicKey:
|
|
1406
|
-
nonce:
|
|
1475
|
+
var v40 = __toESM(require("valibot"));
|
|
1476
|
+
var sparkFlashnetConfirmInitialDepositIntentSchema = v40.object({
|
|
1477
|
+
type: v40.literal("confirmInitialDeposit"),
|
|
1478
|
+
data: v40.object({
|
|
1479
|
+
poolId: v40.string(),
|
|
1480
|
+
assetASparkTransferId: v40.string(),
|
|
1481
|
+
poolOwnerPublicKey: v40.string(),
|
|
1482
|
+
nonce: v40.string()
|
|
1407
1483
|
})
|
|
1408
1484
|
});
|
|
1409
1485
|
|
|
1410
1486
|
// src/request/types/sparkMethods/flashnetMethods/intents/createConstantProductPool.ts
|
|
1411
|
-
var
|
|
1412
|
-
var sparkFlashnetCreateConstantProductPoolIntentSchema =
|
|
1413
|
-
type:
|
|
1414
|
-
data:
|
|
1415
|
-
poolOwnerPublicKey:
|
|
1416
|
-
assetAAddress:
|
|
1417
|
-
assetBAddress:
|
|
1418
|
-
lpFeeRateBps:
|
|
1419
|
-
totalHostFeeRateBps:
|
|
1420
|
-
nonce:
|
|
1487
|
+
var v41 = __toESM(require("valibot"));
|
|
1488
|
+
var sparkFlashnetCreateConstantProductPoolIntentSchema = v41.object({
|
|
1489
|
+
type: v41.literal("createConstantProductPool"),
|
|
1490
|
+
data: v41.object({
|
|
1491
|
+
poolOwnerPublicKey: v41.string(),
|
|
1492
|
+
assetAAddress: v41.string(),
|
|
1493
|
+
assetBAddress: v41.string(),
|
|
1494
|
+
lpFeeRateBps: v41.union([v41.number(), v41.string()]),
|
|
1495
|
+
totalHostFeeRateBps: v41.union([v41.number(), v41.string()]),
|
|
1496
|
+
nonce: v41.string()
|
|
1421
1497
|
})
|
|
1422
1498
|
});
|
|
1423
1499
|
|
|
1424
1500
|
// src/request/types/sparkMethods/flashnetMethods/intents/createSingleSidedPool.ts
|
|
1425
|
-
var
|
|
1426
|
-
var sparkFlashnetCreateSingleSidedPoolIntentSchema =
|
|
1427
|
-
type:
|
|
1428
|
-
data:
|
|
1429
|
-
assetAAddress:
|
|
1430
|
-
assetBAddress:
|
|
1431
|
-
assetAInitialReserve:
|
|
1432
|
-
virtualReserveA:
|
|
1433
|
-
virtualReserveB:
|
|
1434
|
-
threshold:
|
|
1435
|
-
lpFeeRateBps:
|
|
1436
|
-
totalHostFeeRateBps:
|
|
1437
|
-
poolOwnerPublicKey:
|
|
1438
|
-
nonce:
|
|
1501
|
+
var v42 = __toESM(require("valibot"));
|
|
1502
|
+
var sparkFlashnetCreateSingleSidedPoolIntentSchema = v42.object({
|
|
1503
|
+
type: v42.literal("createSingleSidedPool"),
|
|
1504
|
+
data: v42.object({
|
|
1505
|
+
assetAAddress: v42.string(),
|
|
1506
|
+
assetBAddress: v42.string(),
|
|
1507
|
+
assetAInitialReserve: v42.string(),
|
|
1508
|
+
virtualReserveA: v42.union([v42.number(), v42.string()]),
|
|
1509
|
+
virtualReserveB: v42.union([v42.number(), v42.string()]),
|
|
1510
|
+
threshold: v42.union([v42.number(), v42.string()]),
|
|
1511
|
+
lpFeeRateBps: v42.union([v42.number(), v42.string()]),
|
|
1512
|
+
totalHostFeeRateBps: v42.union([v42.number(), v42.string()]),
|
|
1513
|
+
poolOwnerPublicKey: v42.string(),
|
|
1514
|
+
nonce: v42.string()
|
|
1439
1515
|
})
|
|
1440
1516
|
});
|
|
1441
1517
|
|
|
1442
1518
|
// src/request/types/sparkMethods/flashnetMethods/intents/removeLiquidity.ts
|
|
1443
|
-
var
|
|
1444
|
-
var sparkFlashnetRemoveLiquidityIntentSchema =
|
|
1445
|
-
type:
|
|
1446
|
-
data:
|
|
1447
|
-
userPublicKey:
|
|
1448
|
-
poolId:
|
|
1449
|
-
lpTokensToRemove:
|
|
1450
|
-
nonce:
|
|
1519
|
+
var v43 = __toESM(require("valibot"));
|
|
1520
|
+
var sparkFlashnetRemoveLiquidityIntentSchema = v43.object({
|
|
1521
|
+
type: v43.literal("removeLiquidity"),
|
|
1522
|
+
data: v43.object({
|
|
1523
|
+
userPublicKey: v43.string(),
|
|
1524
|
+
poolId: v43.string(),
|
|
1525
|
+
lpTokensToRemove: v43.string(),
|
|
1526
|
+
nonce: v43.string()
|
|
1451
1527
|
})
|
|
1452
1528
|
});
|
|
1453
1529
|
|
|
1454
1530
|
// src/request/types/sparkMethods/flashnetMethods/intents/routeSwap.ts
|
|
1455
|
-
var
|
|
1456
|
-
var sparkFlashnetRouteSwapIntentSchema =
|
|
1457
|
-
type:
|
|
1458
|
-
data:
|
|
1459
|
-
userPublicKey:
|
|
1460
|
-
initialSparkTransferId:
|
|
1461
|
-
hops:
|
|
1462
|
-
|
|
1463
|
-
poolId:
|
|
1464
|
-
inputAssetAddress:
|
|
1465
|
-
outputAssetAddress:
|
|
1466
|
-
hopIntegratorFeeRateBps:
|
|
1531
|
+
var v44 = __toESM(require("valibot"));
|
|
1532
|
+
var sparkFlashnetRouteSwapIntentSchema = v44.object({
|
|
1533
|
+
type: v44.literal("executeRouteSwap"),
|
|
1534
|
+
data: v44.object({
|
|
1535
|
+
userPublicKey: v44.string(),
|
|
1536
|
+
initialSparkTransferId: v44.string(),
|
|
1537
|
+
hops: v44.array(
|
|
1538
|
+
v44.object({
|
|
1539
|
+
poolId: v44.string(),
|
|
1540
|
+
inputAssetAddress: v44.string(),
|
|
1541
|
+
outputAssetAddress: v44.string(),
|
|
1542
|
+
hopIntegratorFeeRateBps: v44.optional(v44.union([v44.number(), v44.string()]))
|
|
1467
1543
|
})
|
|
1468
1544
|
),
|
|
1469
|
-
inputAmount:
|
|
1470
|
-
maxRouteSlippageBps:
|
|
1471
|
-
minAmountOut:
|
|
1472
|
-
defaultIntegratorFeeRateBps:
|
|
1473
|
-
nonce:
|
|
1545
|
+
inputAmount: v44.string(),
|
|
1546
|
+
maxRouteSlippageBps: v44.union([v44.number(), v44.string()]),
|
|
1547
|
+
minAmountOut: v44.string(),
|
|
1548
|
+
defaultIntegratorFeeRateBps: v44.optional(v44.union([v44.number(), v44.string()])),
|
|
1549
|
+
nonce: v44.string()
|
|
1474
1550
|
})
|
|
1475
1551
|
});
|
|
1476
1552
|
|
|
1477
1553
|
// src/request/types/sparkMethods/flashnetMethods/intents/swap.ts
|
|
1478
|
-
var
|
|
1479
|
-
var sparkFlashnetSwapIntentSchema =
|
|
1480
|
-
type:
|
|
1481
|
-
data:
|
|
1482
|
-
userPublicKey:
|
|
1483
|
-
poolId:
|
|
1484
|
-
transferId:
|
|
1485
|
-
assetInAddress:
|
|
1486
|
-
assetOutAddress:
|
|
1487
|
-
amountIn:
|
|
1488
|
-
maxSlippageBps:
|
|
1489
|
-
minAmountOut:
|
|
1490
|
-
totalIntegratorFeeRateBps:
|
|
1491
|
-
nonce:
|
|
1554
|
+
var v45 = __toESM(require("valibot"));
|
|
1555
|
+
var sparkFlashnetSwapIntentSchema = v45.object({
|
|
1556
|
+
type: v45.literal("executeSwap"),
|
|
1557
|
+
data: v45.object({
|
|
1558
|
+
userPublicKey: v45.string(),
|
|
1559
|
+
poolId: v45.string(),
|
|
1560
|
+
transferId: v45.string(),
|
|
1561
|
+
assetInAddress: v45.string(),
|
|
1562
|
+
assetOutAddress: v45.string(),
|
|
1563
|
+
amountIn: v45.string(),
|
|
1564
|
+
maxSlippageBps: v45.union([v45.number(), v45.string()]),
|
|
1565
|
+
minAmountOut: v45.string(),
|
|
1566
|
+
totalIntegratorFeeRateBps: v45.optional(v45.union([v45.number(), v45.string()])),
|
|
1567
|
+
nonce: v45.string()
|
|
1492
1568
|
})
|
|
1493
1569
|
});
|
|
1494
1570
|
|
|
1495
1571
|
// src/request/types/sparkMethods/flashnetMethods/signIntent.ts
|
|
1496
|
-
var
|
|
1572
|
+
var v46 = __toESM(require("valibot"));
|
|
1497
1573
|
var sparkFlashnetSignIntentMethodName = "spark_flashnet_signIntent";
|
|
1498
|
-
var sparkFlashnetSignIntentParamsSchema =
|
|
1574
|
+
var sparkFlashnetSignIntentParamsSchema = v46.union([
|
|
1499
1575
|
sparkFlashnetSwapIntentSchema,
|
|
1500
1576
|
sparkFlashnetRouteSwapIntentSchema,
|
|
1501
1577
|
sparkFlashnetAddLiquidityIntentSchema,
|
|
@@ -1505,109 +1581,109 @@ var sparkFlashnetSignIntentParamsSchema = v39.union([
|
|
|
1505
1581
|
sparkFlashnetCreateSingleSidedPoolIntentSchema,
|
|
1506
1582
|
sparkFlashnetRemoveLiquidityIntentSchema
|
|
1507
1583
|
]);
|
|
1508
|
-
var sparkFlashnetSignIntentResultSchema =
|
|
1584
|
+
var sparkFlashnetSignIntentResultSchema = v46.object({
|
|
1509
1585
|
/**
|
|
1510
1586
|
* The signed intent as a hex string.
|
|
1511
1587
|
*/
|
|
1512
|
-
signature:
|
|
1588
|
+
signature: v46.string()
|
|
1513
1589
|
});
|
|
1514
|
-
var sparkFlashnetSignIntentRequestMessageSchema =
|
|
1590
|
+
var sparkFlashnetSignIntentRequestMessageSchema = v46.object({
|
|
1515
1591
|
...rpcRequestMessageSchema.entries,
|
|
1516
|
-
...
|
|
1517
|
-
method:
|
|
1592
|
+
...v46.object({
|
|
1593
|
+
method: v46.literal(sparkFlashnetSignIntentMethodName),
|
|
1518
1594
|
params: sparkFlashnetSignIntentParamsSchema,
|
|
1519
|
-
id:
|
|
1595
|
+
id: v46.string()
|
|
1520
1596
|
}).entries
|
|
1521
1597
|
});
|
|
1522
1598
|
|
|
1523
1599
|
// src/request/types/sparkMethods/flashnetMethods/signStructuredMessage.ts
|
|
1524
|
-
var
|
|
1600
|
+
var v47 = __toESM(require("valibot"));
|
|
1525
1601
|
var sparkFlashnetSignStructuredMessageMethodName = "spark_flashnet_signStructuredMessage";
|
|
1526
|
-
var sparkFlashnetSignStructuredMessageParamsSchema =
|
|
1527
|
-
message:
|
|
1602
|
+
var sparkFlashnetSignStructuredMessageParamsSchema = v47.object({
|
|
1603
|
+
message: v47.string()
|
|
1528
1604
|
});
|
|
1529
|
-
var sparkFlashnetSignStructuredMessageResultSchema =
|
|
1530
|
-
message:
|
|
1531
|
-
signature:
|
|
1605
|
+
var sparkFlashnetSignStructuredMessageResultSchema = v47.object({
|
|
1606
|
+
message: v47.string(),
|
|
1607
|
+
signature: v47.string()
|
|
1532
1608
|
});
|
|
1533
|
-
var sparkFlashnetSignStructuredMessageRequestMessageSchema =
|
|
1609
|
+
var sparkFlashnetSignStructuredMessageRequestMessageSchema = v47.object({
|
|
1534
1610
|
...rpcRequestMessageSchema.entries,
|
|
1535
|
-
...
|
|
1536
|
-
method:
|
|
1611
|
+
...v47.object({
|
|
1612
|
+
method: v47.literal(sparkFlashnetSignStructuredMessageMethodName),
|
|
1537
1613
|
params: sparkFlashnetSignStructuredMessageParamsSchema,
|
|
1538
|
-
id:
|
|
1614
|
+
id: v47.string()
|
|
1539
1615
|
}).entries
|
|
1540
1616
|
});
|
|
1541
1617
|
|
|
1542
1618
|
// src/request/types/sparkMethods/getAddresses.ts
|
|
1543
|
-
var
|
|
1619
|
+
var v48 = __toESM(require("valibot"));
|
|
1544
1620
|
var sparkGetAddressesMethodName = "spark_getAddresses";
|
|
1545
|
-
var sparkGetAddressesParamsSchema =
|
|
1546
|
-
|
|
1621
|
+
var sparkGetAddressesParamsSchema = v48.nullish(
|
|
1622
|
+
v48.object({
|
|
1547
1623
|
/**
|
|
1548
1624
|
* A message to be displayed to the user in the request prompt.
|
|
1549
1625
|
*/
|
|
1550
|
-
message:
|
|
1626
|
+
message: v48.optional(v48.string())
|
|
1551
1627
|
})
|
|
1552
1628
|
);
|
|
1553
|
-
var sparkGetAddressesResultSchema =
|
|
1629
|
+
var sparkGetAddressesResultSchema = v48.object({
|
|
1554
1630
|
/**
|
|
1555
1631
|
* The addresses generated for the given purposes.
|
|
1556
1632
|
*/
|
|
1557
|
-
addresses:
|
|
1633
|
+
addresses: v48.array(addressSchema),
|
|
1558
1634
|
network: getNetworkResultSchema
|
|
1559
1635
|
});
|
|
1560
|
-
var sparkGetAddressesRequestMessageSchema =
|
|
1636
|
+
var sparkGetAddressesRequestMessageSchema = v48.object({
|
|
1561
1637
|
...rpcRequestMessageSchema.entries,
|
|
1562
|
-
...
|
|
1563
|
-
method:
|
|
1638
|
+
...v48.object({
|
|
1639
|
+
method: v48.literal(sparkGetAddressesMethodName),
|
|
1564
1640
|
params: sparkGetAddressesParamsSchema,
|
|
1565
|
-
id:
|
|
1641
|
+
id: v48.string()
|
|
1566
1642
|
}).entries
|
|
1567
1643
|
});
|
|
1568
1644
|
|
|
1569
1645
|
// src/request/types/sparkMethods/getBalance.ts
|
|
1570
|
-
var
|
|
1646
|
+
var v49 = __toESM(require("valibot"));
|
|
1571
1647
|
var sparkGetBalanceMethodName = "spark_getBalance";
|
|
1572
|
-
var sparkGetBalanceParamsSchema =
|
|
1573
|
-
var sparkGetBalanceResultSchema =
|
|
1648
|
+
var sparkGetBalanceParamsSchema = v49.nullish(v49.null());
|
|
1649
|
+
var sparkGetBalanceResultSchema = v49.object({
|
|
1574
1650
|
/**
|
|
1575
1651
|
* The Spark Bitcoin address balance in sats in string form.
|
|
1576
1652
|
*/
|
|
1577
|
-
balance:
|
|
1578
|
-
tokenBalances:
|
|
1579
|
-
|
|
1653
|
+
balance: v49.string(),
|
|
1654
|
+
tokenBalances: v49.array(
|
|
1655
|
+
v49.object({
|
|
1580
1656
|
/* The address balance of the token in string form as it can overflow a js number */
|
|
1581
|
-
balance:
|
|
1582
|
-
tokenMetadata:
|
|
1583
|
-
tokenIdentifier:
|
|
1584
|
-
tokenName:
|
|
1585
|
-
tokenTicker:
|
|
1586
|
-
decimals:
|
|
1587
|
-
maxSupply:
|
|
1657
|
+
balance: v49.string(),
|
|
1658
|
+
tokenMetadata: v49.object({
|
|
1659
|
+
tokenIdentifier: v49.string(),
|
|
1660
|
+
tokenName: v49.string(),
|
|
1661
|
+
tokenTicker: v49.string(),
|
|
1662
|
+
decimals: v49.number(),
|
|
1663
|
+
maxSupply: v49.string()
|
|
1588
1664
|
})
|
|
1589
1665
|
})
|
|
1590
1666
|
)
|
|
1591
1667
|
});
|
|
1592
|
-
var sparkGetBalanceRequestMessageSchema =
|
|
1668
|
+
var sparkGetBalanceRequestMessageSchema = v49.object({
|
|
1593
1669
|
...rpcRequestMessageSchema.entries,
|
|
1594
|
-
...
|
|
1595
|
-
method:
|
|
1670
|
+
...v49.object({
|
|
1671
|
+
method: v49.literal(sparkGetBalanceMethodName),
|
|
1596
1672
|
params: sparkGetBalanceParamsSchema,
|
|
1597
|
-
id:
|
|
1673
|
+
id: v49.string()
|
|
1598
1674
|
}).entries
|
|
1599
1675
|
});
|
|
1600
1676
|
|
|
1601
1677
|
// src/request/types/sparkMethods/signMessage.ts
|
|
1602
|
-
var
|
|
1678
|
+
var v50 = __toESM(require("valibot"));
|
|
1603
1679
|
var sparkSignMessageMethodName = "spark_signMessage";
|
|
1604
|
-
var sparkSignMessageParamsSchema =
|
|
1680
|
+
var sparkSignMessageParamsSchema = v50.object({
|
|
1605
1681
|
/**
|
|
1606
1682
|
* The message to sign. The message should only consist of valid UTF-8 characters.
|
|
1607
1683
|
*/
|
|
1608
|
-
message:
|
|
1684
|
+
message: v50.string()
|
|
1609
1685
|
});
|
|
1610
|
-
var sparkSignMessageResultSchema =
|
|
1686
|
+
var sparkSignMessageResultSchema = v50.object({
|
|
1611
1687
|
/**
|
|
1612
1688
|
* The signature, encoded in base64, of the message hash.
|
|
1613
1689
|
*
|
|
@@ -1615,98 +1691,98 @@ var sparkSignMessageResultSchema = v43.object({
|
|
|
1615
1691
|
* and the resulting byte array is hashed with SHA256 before signing
|
|
1616
1692
|
* with the private key.
|
|
1617
1693
|
*/
|
|
1618
|
-
signature:
|
|
1694
|
+
signature: v50.string()
|
|
1619
1695
|
});
|
|
1620
|
-
var sparkSignMessageRequestMessageSchema =
|
|
1696
|
+
var sparkSignMessageRequestMessageSchema = v50.object({
|
|
1621
1697
|
...rpcRequestMessageSchema.entries,
|
|
1622
|
-
...
|
|
1623
|
-
method:
|
|
1698
|
+
...v50.object({
|
|
1699
|
+
method: v50.literal(sparkSignMessageMethodName),
|
|
1624
1700
|
params: sparkSignMessageParamsSchema,
|
|
1625
|
-
id:
|
|
1701
|
+
id: v50.string()
|
|
1626
1702
|
}).entries
|
|
1627
1703
|
});
|
|
1628
1704
|
|
|
1629
1705
|
// src/request/types/sparkMethods/transfer.ts
|
|
1630
|
-
var
|
|
1706
|
+
var v51 = __toESM(require("valibot"));
|
|
1631
1707
|
var sparkTransferMethodName = "spark_transfer";
|
|
1632
|
-
var sparkTransferParamsSchema =
|
|
1708
|
+
var sparkTransferParamsSchema = v51.object({
|
|
1633
1709
|
/**
|
|
1634
1710
|
* Amount of SATS to transfer as a string or number.
|
|
1635
1711
|
*/
|
|
1636
|
-
amountSats:
|
|
1712
|
+
amountSats: v51.union([v51.number(), v51.string()]),
|
|
1637
1713
|
/**
|
|
1638
1714
|
* The recipient's spark address.
|
|
1639
1715
|
*/
|
|
1640
|
-
receiverSparkAddress:
|
|
1716
|
+
receiverSparkAddress: v51.string()
|
|
1641
1717
|
});
|
|
1642
|
-
var sparkTransferResultSchema =
|
|
1718
|
+
var sparkTransferResultSchema = v51.object({
|
|
1643
1719
|
/**
|
|
1644
1720
|
* The ID of the transaction.
|
|
1645
1721
|
*/
|
|
1646
|
-
id:
|
|
1722
|
+
id: v51.string()
|
|
1647
1723
|
});
|
|
1648
|
-
var sparkTransferRequestMessageSchema =
|
|
1724
|
+
var sparkTransferRequestMessageSchema = v51.object({
|
|
1649
1725
|
...rpcRequestMessageSchema.entries,
|
|
1650
|
-
...
|
|
1651
|
-
method:
|
|
1726
|
+
...v51.object({
|
|
1727
|
+
method: v51.literal(sparkTransferMethodName),
|
|
1652
1728
|
params: sparkTransferParamsSchema,
|
|
1653
|
-
id:
|
|
1729
|
+
id: v51.string()
|
|
1654
1730
|
}).entries
|
|
1655
1731
|
});
|
|
1656
1732
|
|
|
1657
1733
|
// src/request/types/sparkMethods/transferToken.ts
|
|
1658
|
-
var
|
|
1734
|
+
var v52 = __toESM(require("valibot"));
|
|
1659
1735
|
var sparkTransferTokenMethodName = "spark_transferToken";
|
|
1660
|
-
var sparkTransferTokenParamsSchema =
|
|
1736
|
+
var sparkTransferTokenParamsSchema = v52.object({
|
|
1661
1737
|
/**
|
|
1662
1738
|
* Amount of units of the token to transfer as a string or number.
|
|
1663
1739
|
*/
|
|
1664
|
-
tokenAmount:
|
|
1740
|
+
tokenAmount: v52.union([v52.number(), v52.string()]),
|
|
1665
1741
|
/**
|
|
1666
1742
|
* The Bech32m token identifier.
|
|
1667
1743
|
*/
|
|
1668
|
-
tokenIdentifier:
|
|
1744
|
+
tokenIdentifier: v52.string(),
|
|
1669
1745
|
/**
|
|
1670
1746
|
* The recipient's spark address.
|
|
1671
1747
|
*/
|
|
1672
|
-
receiverSparkAddress:
|
|
1748
|
+
receiverSparkAddress: v52.string()
|
|
1673
1749
|
});
|
|
1674
|
-
var sparkTransferTokenResultSchema =
|
|
1750
|
+
var sparkTransferTokenResultSchema = v52.object({
|
|
1675
1751
|
/**
|
|
1676
1752
|
* The ID of the transaction.
|
|
1677
1753
|
*/
|
|
1678
|
-
id:
|
|
1754
|
+
id: v52.string()
|
|
1679
1755
|
});
|
|
1680
|
-
var sparkTransferTokenRequestMessageSchema =
|
|
1756
|
+
var sparkTransferTokenRequestMessageSchema = v52.object({
|
|
1681
1757
|
...rpcRequestMessageSchema.entries,
|
|
1682
|
-
...
|
|
1683
|
-
method:
|
|
1758
|
+
...v52.object({
|
|
1759
|
+
method: v52.literal(sparkTransferTokenMethodName),
|
|
1684
1760
|
params: sparkTransferTokenParamsSchema,
|
|
1685
|
-
id:
|
|
1761
|
+
id: v52.string()
|
|
1686
1762
|
}).entries
|
|
1687
1763
|
});
|
|
1688
1764
|
|
|
1689
1765
|
// src/request/types/stxMethods/callContract.ts
|
|
1690
|
-
var
|
|
1766
|
+
var v53 = __toESM(require("valibot"));
|
|
1691
1767
|
var stxCallContractMethodName = "stx_callContract";
|
|
1692
|
-
var stxCallContractParamsSchema =
|
|
1768
|
+
var stxCallContractParamsSchema = v53.object({
|
|
1693
1769
|
/**
|
|
1694
1770
|
* The contract principal.
|
|
1695
1771
|
*
|
|
1696
1772
|
* E.g. `"SPKE...GD5C.my-contract"`
|
|
1697
1773
|
*/
|
|
1698
|
-
contract:
|
|
1774
|
+
contract: v53.string(),
|
|
1699
1775
|
/**
|
|
1700
1776
|
* The name of the function to call.
|
|
1701
1777
|
*
|
|
1702
1778
|
* Note: spec changes ongoing,
|
|
1703
1779
|
* https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
|
|
1704
1780
|
*/
|
|
1705
|
-
functionName:
|
|
1781
|
+
functionName: v53.string(),
|
|
1706
1782
|
/**
|
|
1707
1783
|
* @deprecated in favor of `functionArgs` for @stacks/connect compatibility
|
|
1708
1784
|
*/
|
|
1709
|
-
arguments:
|
|
1785
|
+
arguments: v53.optional(v53.array(v53.string())),
|
|
1710
1786
|
/**
|
|
1711
1787
|
* The function's arguments. The arguments are expected to be hex-encoded
|
|
1712
1788
|
* strings of Clarity values.
|
|
@@ -1721,274 +1797,274 @@ var stxCallContractParamsSchema = v46.object({
|
|
|
1721
1797
|
* const hexArgs = functionArgs.map(cvToHex);
|
|
1722
1798
|
* ```
|
|
1723
1799
|
*/
|
|
1724
|
-
functionArgs:
|
|
1800
|
+
functionArgs: v53.optional(v53.array(v53.string())),
|
|
1725
1801
|
/**
|
|
1726
1802
|
* The post conditions to apply to the contract call.
|
|
1727
1803
|
*/
|
|
1728
|
-
postConditions:
|
|
1804
|
+
postConditions: v53.optional(v53.array(v53.string())),
|
|
1729
1805
|
/**
|
|
1730
1806
|
* The mode to apply to the post conditions.
|
|
1731
1807
|
*/
|
|
1732
|
-
postConditionMode:
|
|
1808
|
+
postConditionMode: v53.optional(v53.union([v53.literal("allow"), v53.literal("deny")]))
|
|
1733
1809
|
});
|
|
1734
|
-
var stxCallContractResultSchema =
|
|
1810
|
+
var stxCallContractResultSchema = v53.object({
|
|
1735
1811
|
/**
|
|
1736
1812
|
* The ID of the transaction.
|
|
1737
1813
|
*/
|
|
1738
|
-
txid:
|
|
1814
|
+
txid: v53.string(),
|
|
1739
1815
|
/**
|
|
1740
1816
|
* A Stacks transaction as a hex-encoded string.
|
|
1741
1817
|
*/
|
|
1742
|
-
transaction:
|
|
1818
|
+
transaction: v53.string()
|
|
1743
1819
|
});
|
|
1744
|
-
var stxCallContractRequestMessageSchema =
|
|
1820
|
+
var stxCallContractRequestMessageSchema = v53.object({
|
|
1745
1821
|
...rpcRequestMessageSchema.entries,
|
|
1746
|
-
...
|
|
1747
|
-
method:
|
|
1822
|
+
...v53.object({
|
|
1823
|
+
method: v53.literal(stxCallContractMethodName),
|
|
1748
1824
|
params: stxCallContractParamsSchema,
|
|
1749
|
-
id:
|
|
1825
|
+
id: v53.string()
|
|
1750
1826
|
}).entries
|
|
1751
1827
|
});
|
|
1752
1828
|
|
|
1753
1829
|
// src/request/types/stxMethods/deployContract.ts
|
|
1754
|
-
var
|
|
1830
|
+
var v54 = __toESM(require("valibot"));
|
|
1755
1831
|
var stxDeployContractMethodName = "stx_deployContract";
|
|
1756
|
-
var stxDeployContractParamsSchema =
|
|
1832
|
+
var stxDeployContractParamsSchema = v54.object({
|
|
1757
1833
|
/**
|
|
1758
1834
|
* Name of the contract.
|
|
1759
1835
|
*/
|
|
1760
|
-
name:
|
|
1836
|
+
name: v54.string(),
|
|
1761
1837
|
/**
|
|
1762
1838
|
* The source code of the Clarity contract.
|
|
1763
1839
|
*/
|
|
1764
|
-
clarityCode:
|
|
1840
|
+
clarityCode: v54.string(),
|
|
1765
1841
|
/**
|
|
1766
1842
|
* The version of the Clarity contract.
|
|
1767
1843
|
*/
|
|
1768
|
-
clarityVersion:
|
|
1844
|
+
clarityVersion: v54.optional(v54.number()),
|
|
1769
1845
|
/**
|
|
1770
1846
|
* The post conditions to apply to the contract call.
|
|
1771
1847
|
*/
|
|
1772
|
-
postConditions:
|
|
1848
|
+
postConditions: v54.optional(v54.array(v54.string())),
|
|
1773
1849
|
/**
|
|
1774
1850
|
* The mode to apply to the post conditions.
|
|
1775
1851
|
*/
|
|
1776
|
-
postConditionMode:
|
|
1852
|
+
postConditionMode: v54.optional(v54.union([v54.literal("allow"), v54.literal("deny")]))
|
|
1777
1853
|
});
|
|
1778
|
-
var stxDeployContractResultSchema =
|
|
1854
|
+
var stxDeployContractResultSchema = v54.object({
|
|
1779
1855
|
/**
|
|
1780
1856
|
* The ID of the transaction.
|
|
1781
1857
|
*/
|
|
1782
|
-
txid:
|
|
1858
|
+
txid: v54.string(),
|
|
1783
1859
|
/**
|
|
1784
1860
|
* A Stacks transaction as a hex-encoded string.
|
|
1785
1861
|
*/
|
|
1786
|
-
transaction:
|
|
1862
|
+
transaction: v54.string()
|
|
1787
1863
|
});
|
|
1788
|
-
var stxDeployContractRequestMessageSchema =
|
|
1864
|
+
var stxDeployContractRequestMessageSchema = v54.object({
|
|
1789
1865
|
...rpcRequestMessageSchema.entries,
|
|
1790
|
-
...
|
|
1791
|
-
method:
|
|
1866
|
+
...v54.object({
|
|
1867
|
+
method: v54.literal(stxDeployContractMethodName),
|
|
1792
1868
|
params: stxDeployContractParamsSchema,
|
|
1793
|
-
id:
|
|
1869
|
+
id: v54.string()
|
|
1794
1870
|
}).entries
|
|
1795
1871
|
});
|
|
1796
1872
|
|
|
1797
1873
|
// src/request/types/stxMethods/getAccounts.ts
|
|
1798
|
-
var
|
|
1874
|
+
var v55 = __toESM(require("valibot"));
|
|
1799
1875
|
var stxGetAccountsMethodName = "stx_getAccounts";
|
|
1800
|
-
var stxGetAccountsParamsSchema =
|
|
1801
|
-
var stxGetAccountsResultSchema =
|
|
1876
|
+
var stxGetAccountsParamsSchema = v55.nullish(v55.null());
|
|
1877
|
+
var stxGetAccountsResultSchema = v55.object({
|
|
1802
1878
|
/**
|
|
1803
1879
|
* The addresses generated for the given purposes.
|
|
1804
1880
|
*/
|
|
1805
|
-
addresses:
|
|
1806
|
-
|
|
1807
|
-
address:
|
|
1808
|
-
publicKey:
|
|
1809
|
-
gaiaHubUrl:
|
|
1810
|
-
gaiaAppKey:
|
|
1881
|
+
addresses: v55.array(
|
|
1882
|
+
v55.object({
|
|
1883
|
+
address: v55.string(),
|
|
1884
|
+
publicKey: v55.string(),
|
|
1885
|
+
gaiaHubUrl: v55.string(),
|
|
1886
|
+
gaiaAppKey: v55.string()
|
|
1811
1887
|
})
|
|
1812
1888
|
),
|
|
1813
1889
|
network: getNetworkResultSchema
|
|
1814
1890
|
});
|
|
1815
|
-
var stxGetAccountsRequestMessageSchema =
|
|
1891
|
+
var stxGetAccountsRequestMessageSchema = v55.object({
|
|
1816
1892
|
...rpcRequestMessageSchema.entries,
|
|
1817
|
-
...
|
|
1818
|
-
method:
|
|
1893
|
+
...v55.object({
|
|
1894
|
+
method: v55.literal(stxGetAccountsMethodName),
|
|
1819
1895
|
params: stxGetAccountsParamsSchema,
|
|
1820
|
-
id:
|
|
1896
|
+
id: v55.string()
|
|
1821
1897
|
}).entries
|
|
1822
1898
|
});
|
|
1823
1899
|
|
|
1824
1900
|
// src/request/types/stxMethods/getAddresses.ts
|
|
1825
|
-
var
|
|
1901
|
+
var v56 = __toESM(require("valibot"));
|
|
1826
1902
|
var stxGetAddressesMethodName = "stx_getAddresses";
|
|
1827
|
-
var stxGetAddressesParamsSchema =
|
|
1828
|
-
|
|
1903
|
+
var stxGetAddressesParamsSchema = v56.nullish(
|
|
1904
|
+
v56.object({
|
|
1829
1905
|
/**
|
|
1830
1906
|
* A message to be displayed to the user in the request prompt.
|
|
1831
1907
|
*/
|
|
1832
|
-
message:
|
|
1908
|
+
message: v56.optional(v56.string())
|
|
1833
1909
|
})
|
|
1834
1910
|
);
|
|
1835
|
-
var stxGetAddressesResultSchema =
|
|
1911
|
+
var stxGetAddressesResultSchema = v56.object({
|
|
1836
1912
|
/**
|
|
1837
1913
|
* The addresses generated for the given purposes.
|
|
1838
1914
|
*/
|
|
1839
|
-
addresses:
|
|
1915
|
+
addresses: v56.array(addressSchema),
|
|
1840
1916
|
network: getNetworkResultSchema
|
|
1841
1917
|
});
|
|
1842
|
-
var stxGetAddressesRequestMessageSchema =
|
|
1918
|
+
var stxGetAddressesRequestMessageSchema = v56.object({
|
|
1843
1919
|
...rpcRequestMessageSchema.entries,
|
|
1844
|
-
...
|
|
1845
|
-
method:
|
|
1920
|
+
...v56.object({
|
|
1921
|
+
method: v56.literal(stxGetAddressesMethodName),
|
|
1846
1922
|
params: stxGetAddressesParamsSchema,
|
|
1847
|
-
id:
|
|
1923
|
+
id: v56.string()
|
|
1848
1924
|
}).entries
|
|
1849
1925
|
});
|
|
1850
1926
|
|
|
1851
1927
|
// src/request/types/stxMethods/signMessage.ts
|
|
1852
|
-
var
|
|
1928
|
+
var v57 = __toESM(require("valibot"));
|
|
1853
1929
|
var stxSignMessageMethodName = "stx_signMessage";
|
|
1854
|
-
var stxSignMessageParamsSchema =
|
|
1930
|
+
var stxSignMessageParamsSchema = v57.object({
|
|
1855
1931
|
/**
|
|
1856
1932
|
* The message to sign.
|
|
1857
1933
|
*/
|
|
1858
|
-
message:
|
|
1934
|
+
message: v57.string()
|
|
1859
1935
|
});
|
|
1860
|
-
var stxSignMessageResultSchema =
|
|
1936
|
+
var stxSignMessageResultSchema = v57.object({
|
|
1861
1937
|
/**
|
|
1862
1938
|
* The signature of the message.
|
|
1863
1939
|
*/
|
|
1864
|
-
signature:
|
|
1940
|
+
signature: v57.string(),
|
|
1865
1941
|
/**
|
|
1866
1942
|
* The public key used to sign the message.
|
|
1867
1943
|
*/
|
|
1868
|
-
publicKey:
|
|
1944
|
+
publicKey: v57.string()
|
|
1869
1945
|
});
|
|
1870
|
-
var stxSignMessageRequestMessageSchema =
|
|
1946
|
+
var stxSignMessageRequestMessageSchema = v57.object({
|
|
1871
1947
|
...rpcRequestMessageSchema.entries,
|
|
1872
|
-
...
|
|
1873
|
-
method:
|
|
1948
|
+
...v57.object({
|
|
1949
|
+
method: v57.literal(stxSignMessageMethodName),
|
|
1874
1950
|
params: stxSignMessageParamsSchema,
|
|
1875
|
-
id:
|
|
1951
|
+
id: v57.string()
|
|
1876
1952
|
}).entries
|
|
1877
1953
|
});
|
|
1878
1954
|
|
|
1879
1955
|
// src/request/types/stxMethods/signStructuredMessage.ts
|
|
1880
|
-
var
|
|
1956
|
+
var v58 = __toESM(require("valibot"));
|
|
1881
1957
|
var stxSignStructuredMessageMethodName = "stx_signStructuredMessage";
|
|
1882
|
-
var stxSignStructuredMessageParamsSchema =
|
|
1958
|
+
var stxSignStructuredMessageParamsSchema = v58.object({
|
|
1883
1959
|
/**
|
|
1884
1960
|
* The domain to be signed.
|
|
1885
1961
|
*/
|
|
1886
|
-
domain:
|
|
1962
|
+
domain: v58.string(),
|
|
1887
1963
|
/**
|
|
1888
1964
|
* Message payload to be signed.
|
|
1889
1965
|
*/
|
|
1890
|
-
message:
|
|
1966
|
+
message: v58.string(),
|
|
1891
1967
|
/**
|
|
1892
1968
|
* The public key to sign the message with.
|
|
1893
1969
|
*/
|
|
1894
|
-
publicKey:
|
|
1970
|
+
publicKey: v58.optional(v58.string())
|
|
1895
1971
|
});
|
|
1896
|
-
var stxSignStructuredMessageResultSchema =
|
|
1972
|
+
var stxSignStructuredMessageResultSchema = v58.object({
|
|
1897
1973
|
/**
|
|
1898
1974
|
* Signature of the message.
|
|
1899
1975
|
*/
|
|
1900
|
-
signature:
|
|
1976
|
+
signature: v58.string(),
|
|
1901
1977
|
/**
|
|
1902
1978
|
* Public key as hex-encoded string.
|
|
1903
1979
|
*/
|
|
1904
|
-
publicKey:
|
|
1980
|
+
publicKey: v58.string()
|
|
1905
1981
|
});
|
|
1906
|
-
var stxSignStructuredMessageRequestMessageSchema =
|
|
1982
|
+
var stxSignStructuredMessageRequestMessageSchema = v58.object({
|
|
1907
1983
|
...rpcRequestMessageSchema.entries,
|
|
1908
|
-
...
|
|
1909
|
-
method:
|
|
1984
|
+
...v58.object({
|
|
1985
|
+
method: v58.literal(stxSignStructuredMessageMethodName),
|
|
1910
1986
|
params: stxSignStructuredMessageParamsSchema,
|
|
1911
|
-
id:
|
|
1987
|
+
id: v58.string()
|
|
1912
1988
|
}).entries
|
|
1913
1989
|
});
|
|
1914
1990
|
|
|
1915
1991
|
// src/request/types/stxMethods/signTransaction.ts
|
|
1916
|
-
var
|
|
1992
|
+
var v59 = __toESM(require("valibot"));
|
|
1917
1993
|
var stxSignTransactionMethodName = "stx_signTransaction";
|
|
1918
|
-
var stxSignTransactionParamsSchema =
|
|
1994
|
+
var stxSignTransactionParamsSchema = v59.object({
|
|
1919
1995
|
/**
|
|
1920
1996
|
* The transaction to sign as a hex-encoded string.
|
|
1921
1997
|
*/
|
|
1922
|
-
transaction:
|
|
1998
|
+
transaction: v59.string(),
|
|
1923
1999
|
/**
|
|
1924
2000
|
* The public key to sign the transaction with. The wallet may use any key
|
|
1925
2001
|
* when not provided.
|
|
1926
2002
|
*/
|
|
1927
|
-
pubkey:
|
|
2003
|
+
pubkey: v59.optional(v59.string()),
|
|
1928
2004
|
/**
|
|
1929
2005
|
* Whether to broadcast the transaction after signing. Defaults to `true`.
|
|
1930
2006
|
*/
|
|
1931
|
-
broadcast:
|
|
2007
|
+
broadcast: v59.optional(v59.boolean())
|
|
1932
2008
|
});
|
|
1933
|
-
var stxSignTransactionResultSchema =
|
|
2009
|
+
var stxSignTransactionResultSchema = v59.object({
|
|
1934
2010
|
/**
|
|
1935
2011
|
* The signed transaction as a hex-encoded string.
|
|
1936
2012
|
*/
|
|
1937
|
-
transaction:
|
|
2013
|
+
transaction: v59.string()
|
|
1938
2014
|
});
|
|
1939
|
-
var stxSignTransactionRequestMessageSchema =
|
|
2015
|
+
var stxSignTransactionRequestMessageSchema = v59.object({
|
|
1940
2016
|
...rpcRequestMessageSchema.entries,
|
|
1941
|
-
...
|
|
1942
|
-
method:
|
|
2017
|
+
...v59.object({
|
|
2018
|
+
method: v59.literal(stxSignTransactionMethodName),
|
|
1943
2019
|
params: stxSignTransactionParamsSchema,
|
|
1944
|
-
id:
|
|
2020
|
+
id: v59.string()
|
|
1945
2021
|
}).entries
|
|
1946
2022
|
});
|
|
1947
2023
|
|
|
1948
2024
|
// src/request/types/stxMethods/signTransactions.ts
|
|
1949
|
-
var
|
|
2025
|
+
var v60 = __toESM(require("valibot"));
|
|
1950
2026
|
var stxSignTransactionsMethodName = "stx_signTransactions";
|
|
1951
|
-
var stxSignTransactionsParamsSchema =
|
|
2027
|
+
var stxSignTransactionsParamsSchema = v60.object({
|
|
1952
2028
|
/**
|
|
1953
2029
|
* The transactions to sign as hex-encoded strings.
|
|
1954
2030
|
*/
|
|
1955
|
-
transactions:
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
2031
|
+
transactions: v60.pipe(
|
|
2032
|
+
v60.array(
|
|
2033
|
+
v60.pipe(
|
|
2034
|
+
v60.string(),
|
|
2035
|
+
v60.check((hex) => {
|
|
1960
2036
|
return true;
|
|
1961
2037
|
}, "Invalid hex-encoded Stacks transaction.")
|
|
1962
2038
|
)
|
|
1963
2039
|
),
|
|
1964
|
-
|
|
2040
|
+
v60.minLength(1)
|
|
1965
2041
|
),
|
|
1966
2042
|
/**
|
|
1967
2043
|
* Whether the signed transactions should be broadcast after signing. Defaults
|
|
1968
2044
|
* to `true`.
|
|
1969
2045
|
*/
|
|
1970
|
-
broadcast:
|
|
2046
|
+
broadcast: v60.optional(v60.boolean())
|
|
1971
2047
|
});
|
|
1972
|
-
var stxSignTransactionsResultSchema =
|
|
2048
|
+
var stxSignTransactionsResultSchema = v60.object({
|
|
1973
2049
|
/**
|
|
1974
2050
|
* The signed transactions as hex-encoded strings, in the same order as in the
|
|
1975
2051
|
* sign request.
|
|
1976
2052
|
*/
|
|
1977
|
-
transactions:
|
|
2053
|
+
transactions: v60.array(v60.string())
|
|
1978
2054
|
});
|
|
1979
|
-
var stxSignTransactionsRequestMessageSchema =
|
|
2055
|
+
var stxSignTransactionsRequestMessageSchema = v60.object({
|
|
1980
2056
|
...rpcRequestMessageSchema.entries,
|
|
1981
|
-
...
|
|
1982
|
-
method:
|
|
2057
|
+
...v60.object({
|
|
2058
|
+
method: v60.literal(stxSignTransactionsMethodName),
|
|
1983
2059
|
params: stxSignTransactionsParamsSchema,
|
|
1984
|
-
id:
|
|
2060
|
+
id: v60.string()
|
|
1985
2061
|
}).entries
|
|
1986
2062
|
});
|
|
1987
2063
|
|
|
1988
2064
|
// src/request/types/stxMethods/transferStx.ts
|
|
1989
|
-
var
|
|
2065
|
+
var v61 = __toESM(require("valibot"));
|
|
1990
2066
|
var stxTransferStxMethodName = "stx_transferStx";
|
|
1991
|
-
var stxTransferStxParamsSchema =
|
|
2067
|
+
var stxTransferStxParamsSchema = v61.object({
|
|
1992
2068
|
/**
|
|
1993
2069
|
* Amount of STX tokens to transfer in microstacks as a string. Anything
|
|
1994
2070
|
* parseable by `BigInt` is acceptable.
|
|
@@ -2001,23 +2077,23 @@ var stxTransferStxParamsSchema = v54.object({
|
|
|
2001
2077
|
* const amount3 = '1234';
|
|
2002
2078
|
* ```
|
|
2003
2079
|
*/
|
|
2004
|
-
amount:
|
|
2080
|
+
amount: v61.union([v61.number(), v61.string()]),
|
|
2005
2081
|
/**
|
|
2006
2082
|
* The recipient's principal.
|
|
2007
2083
|
*/
|
|
2008
|
-
recipient:
|
|
2084
|
+
recipient: v61.string(),
|
|
2009
2085
|
/**
|
|
2010
2086
|
* A string representing the memo.
|
|
2011
2087
|
*/
|
|
2012
|
-
memo:
|
|
2088
|
+
memo: v61.optional(v61.string()),
|
|
2013
2089
|
/**
|
|
2014
2090
|
* Version of parameter format.
|
|
2015
2091
|
*/
|
|
2016
|
-
version:
|
|
2092
|
+
version: v61.optional(v61.string()),
|
|
2017
2093
|
/**
|
|
2018
2094
|
* The mode of the post conditions.
|
|
2019
2095
|
*/
|
|
2020
|
-
postConditionMode:
|
|
2096
|
+
postConditionMode: v61.optional(v61.number()),
|
|
2021
2097
|
/**
|
|
2022
2098
|
* A hex-encoded string representing the post conditions.
|
|
2023
2099
|
*
|
|
@@ -2030,29 +2106,29 @@ var stxTransferStxParamsSchema = v54.object({
|
|
|
2030
2106
|
* const hexPostCondition = serializePostCondition(postCondition).toString('hex');
|
|
2031
2107
|
* ```
|
|
2032
2108
|
*/
|
|
2033
|
-
postConditions:
|
|
2109
|
+
postConditions: v61.optional(v61.array(v61.string())),
|
|
2034
2110
|
/**
|
|
2035
2111
|
* The public key to sign the transaction with. The wallet may use any key
|
|
2036
2112
|
* when not provided.
|
|
2037
2113
|
*/
|
|
2038
|
-
pubkey:
|
|
2114
|
+
pubkey: v61.optional(v61.string())
|
|
2039
2115
|
});
|
|
2040
|
-
var stxTransferStxResultSchema =
|
|
2116
|
+
var stxTransferStxResultSchema = v61.object({
|
|
2041
2117
|
/**
|
|
2042
2118
|
* The ID of the transaction.
|
|
2043
2119
|
*/
|
|
2044
|
-
txid:
|
|
2120
|
+
txid: v61.string(),
|
|
2045
2121
|
/**
|
|
2046
2122
|
* A Stacks transaction as a hex-encoded string.
|
|
2047
2123
|
*/
|
|
2048
|
-
transaction:
|
|
2124
|
+
transaction: v61.string()
|
|
2049
2125
|
});
|
|
2050
|
-
var stxTransferStxRequestMessageSchema =
|
|
2126
|
+
var stxTransferStxRequestMessageSchema = v61.object({
|
|
2051
2127
|
...rpcRequestMessageSchema.entries,
|
|
2052
|
-
...
|
|
2053
|
-
method:
|
|
2128
|
+
...v61.object({
|
|
2129
|
+
method: v61.literal(stxTransferStxMethodName),
|
|
2054
2130
|
params: stxTransferStxParamsSchema,
|
|
2055
|
-
id:
|
|
2131
|
+
id: v61.string()
|
|
2056
2132
|
}).entries
|
|
2057
2133
|
});
|
|
2058
2134
|
|
|
@@ -2060,13 +2136,13 @@ var stxTransferStxRequestMessageSchema = v54.object({
|
|
|
2060
2136
|
var cache = {};
|
|
2061
2137
|
var requestInternal = async (provider, method, params) => {
|
|
2062
2138
|
const response = await provider.request(method, params);
|
|
2063
|
-
if (
|
|
2139
|
+
if (v62.is(rpcErrorResponseMessageSchema, response)) {
|
|
2064
2140
|
return {
|
|
2065
2141
|
status: "error",
|
|
2066
2142
|
error: response.error
|
|
2067
2143
|
};
|
|
2068
2144
|
}
|
|
2069
|
-
if (
|
|
2145
|
+
if (v62.is(rpcSuccessResponseMessageSchema, response)) {
|
|
2070
2146
|
return {
|
|
2071
2147
|
status: "success",
|
|
2072
2148
|
result: response.result
|
|
@@ -3261,6 +3337,10 @@ var signMultipleTransactions = async (options) => {
|
|
|
3261
3337
|
signMessageParamsSchema,
|
|
3262
3338
|
signMessageRequestMessageSchema,
|
|
3263
3339
|
signMessageResultSchema,
|
|
3340
|
+
signMultipleMessagesMethodName,
|
|
3341
|
+
signMultipleMessagesParamsSchema,
|
|
3342
|
+
signMultipleMessagesRequestMessageSchema,
|
|
3343
|
+
signMultipleMessagesResultSchema,
|
|
3264
3344
|
signMultipleTransactions,
|
|
3265
3345
|
signPsbtMethodName,
|
|
3266
3346
|
signPsbtParamsSchema,
|