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