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