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