@sats-connect/core 0.17.2-ed6c4df → 0.17.3-360f8bb
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.cjs +80 -0
- package/dist/index.d.cts +495 -242
- package/dist/index.d.mts +495 -242
- package/dist/index.mjs +69 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1034,6 +1034,7 @@ const ordinalsMethods = {
|
|
|
1034
1034
|
};
|
|
1035
1035
|
const walletMethods = {
|
|
1036
1036
|
wallet_addNetwork: "wallet_addNetwork",
|
|
1037
|
+
wallet_open: "wallet_open",
|
|
1037
1038
|
wallet_addNetworkV2: "wallet_addNetworkV2",
|
|
1038
1039
|
wallet_changeNetwork: "wallet_changeNetwork",
|
|
1039
1040
|
wallet_connect: "wallet_connect",
|
|
@@ -1050,6 +1051,8 @@ const walletMethods = {
|
|
|
1050
1051
|
wallet_openReceive: "wallet_openReceive",
|
|
1051
1052
|
wallet_renouncePermissions: "wallet_renouncePermissions",
|
|
1052
1053
|
wallet_requestPermissions: "wallet_requestPermissions",
|
|
1054
|
+
wallet_sign: "wallet_sign",
|
|
1055
|
+
wallet_getEdDsaPublicKey: "wallet_getEdDsaPublicKey",
|
|
1053
1056
|
wallet_switchNetwork: "wallet_switchNetwork"
|
|
1054
1057
|
};
|
|
1055
1058
|
const methods = {
|
|
@@ -1440,6 +1443,22 @@ const walletGetCurrentPermissionsSuccessResponseSchema = createSuccessResponseSc
|
|
|
1440
1443
|
method: walletMethods.wallet_getCurrentPermissions
|
|
1441
1444
|
});
|
|
1442
1445
|
|
|
1446
|
+
//#endregion
|
|
1447
|
+
//#region src/request/rpc/objects/namespaces/wallet/methods/getEdDsaPublicKey/request.ts
|
|
1448
|
+
const walletGetEdDsaPublicKeyParamsSchema = valibot.object({});
|
|
1449
|
+
const walletGetEdDsaPublicKeyRequestSchema = createRequestSchema({
|
|
1450
|
+
paramsSchema: walletGetEdDsaPublicKeyParamsSchema,
|
|
1451
|
+
method: walletMethods.wallet_getEdDsaPublicKey
|
|
1452
|
+
});
|
|
1453
|
+
|
|
1454
|
+
//#endregion
|
|
1455
|
+
//#region src/request/rpc/objects/namespaces/wallet/methods/getEdDsaPublicKey/response.ts
|
|
1456
|
+
const walletGetEdDsaPublicKeyResultSchema = valibot.object({ publicKey: valibot.string() });
|
|
1457
|
+
const walletGetEdDsaPublicKeySuccessResponseSchema = createSuccessResponseSchema({
|
|
1458
|
+
resultSchema: walletGetEdDsaPublicKeyResultSchema,
|
|
1459
|
+
method: walletMethods.wallet_getEdDsaPublicKey
|
|
1460
|
+
});
|
|
1461
|
+
|
|
1443
1462
|
//#endregion
|
|
1444
1463
|
//#region src/request/rpc/objects/namespaces/wallet/methods/getWalletType/request.ts
|
|
1445
1464
|
const walletGetWalletTypeParamsSchema = valibot.nullish(valibot.null());
|
|
@@ -1456,6 +1475,22 @@ const walletGetWalletTypeSuccessResponseSchema = createSuccessResponseSchema({
|
|
|
1456
1475
|
method: walletMethods.wallet_getWalletType
|
|
1457
1476
|
});
|
|
1458
1477
|
|
|
1478
|
+
//#endregion
|
|
1479
|
+
//#region src/request/rpc/objects/namespaces/wallet/methods/open/request.ts
|
|
1480
|
+
const walletOpenParamsSchema = valibot.object({ path: valibot.optional(valibot.string()) });
|
|
1481
|
+
const walletOpenRequestSchema = createRequestSchema({
|
|
1482
|
+
paramsSchema: walletOpenParamsSchema,
|
|
1483
|
+
method: walletMethods.wallet_open
|
|
1484
|
+
});
|
|
1485
|
+
|
|
1486
|
+
//#endregion
|
|
1487
|
+
//#region src/request/rpc/objects/namespaces/wallet/methods/open/response.ts
|
|
1488
|
+
const walletOpenResultSchema = valibot.nullish(valibot.null());
|
|
1489
|
+
const walletOpenSuccessResponseSchema = createSuccessResponseSchema({
|
|
1490
|
+
resultSchema: walletOpenResultSchema,
|
|
1491
|
+
method: walletMethods.wallet_open
|
|
1492
|
+
});
|
|
1493
|
+
|
|
1459
1494
|
//#endregion
|
|
1460
1495
|
//#region src/request/rpc/objects/namespaces/wallet/methods/openBridge/request.ts
|
|
1461
1496
|
const walletOpenBridgeParamsSchema = valibot.object({
|
|
@@ -1539,6 +1574,33 @@ const walletRequestPermissionsSuccessResponseSchema = createSuccessResponseSchem
|
|
|
1539
1574
|
method: walletMethods.wallet_requestPermissions
|
|
1540
1575
|
});
|
|
1541
1576
|
|
|
1577
|
+
//#endregion
|
|
1578
|
+
//#region src/request/rpc/objects/namespaces/wallet/methods/sign/request.ts
|
|
1579
|
+
const ed25519SignParamsSchema = valibot.object({
|
|
1580
|
+
algorithm: valibot.literal("Ed25519"),
|
|
1581
|
+
payload: valibot.pipe(valibot.string(), valibot.hexadecimal())
|
|
1582
|
+
});
|
|
1583
|
+
const ed25519phSignParamsSchema = valibot.object({
|
|
1584
|
+
algorithm: valibot.literal("Ed25519ph"),
|
|
1585
|
+
payload: valibot.pipe(valibot.string(), valibot.hexadecimal())
|
|
1586
|
+
});
|
|
1587
|
+
const walletSignParamsSchema = valibot.variant("algorithm", [ed25519SignParamsSchema, ed25519phSignParamsSchema]);
|
|
1588
|
+
const walletSignRequestSchema = createRequestSchema({
|
|
1589
|
+
paramsSchema: walletSignParamsSchema,
|
|
1590
|
+
method: walletMethods.wallet_sign
|
|
1591
|
+
});
|
|
1592
|
+
|
|
1593
|
+
//#endregion
|
|
1594
|
+
//#region src/request/rpc/objects/namespaces/wallet/methods/sign/response.ts
|
|
1595
|
+
const walletSignResultSchema = valibot.object({
|
|
1596
|
+
signature: valibot.string(),
|
|
1597
|
+
publicKey: valibot.string()
|
|
1598
|
+
});
|
|
1599
|
+
const walletSignSuccessResponseSchema = createSuccessResponseSchema({
|
|
1600
|
+
resultSchema: walletSignResultSchema,
|
|
1601
|
+
method: walletMethods.wallet_sign
|
|
1602
|
+
});
|
|
1603
|
+
|
|
1542
1604
|
//#endregion
|
|
1543
1605
|
//#region src/request/rpc/objects/namespaces/wallet/methods/switchNetwork/request.ts
|
|
1544
1606
|
const walletSwitchNetworkParamsSchema = valibot.variant("selector", [valibot.object({
|
|
@@ -1573,11 +1635,14 @@ const walletRequestSchema = valibot.variant("method", [
|
|
|
1573
1635
|
walletGetNetworkRequestSchema,
|
|
1574
1636
|
walletGetNetworksRequestSchema,
|
|
1575
1637
|
walletGetWalletTypeRequestSchema,
|
|
1638
|
+
walletOpenRequestSchema,
|
|
1576
1639
|
walletOpenBridgeRequestSchema,
|
|
1577
1640
|
walletOpenBuyRequestSchema,
|
|
1578
1641
|
walletOpenReceiveRequestSchema,
|
|
1579
1642
|
walletRenouncePermissionsRequestSchema,
|
|
1580
1643
|
walletRequestPermissionsRequestSchema,
|
|
1644
|
+
walletSignRequestSchema,
|
|
1645
|
+
walletGetEdDsaPublicKeyRequestSchema,
|
|
1581
1646
|
walletSwitchNetworkRequestSchema
|
|
1582
1647
|
]);
|
|
1583
1648
|
const walletSuccessResponseSchema = valibot.variant("~sats-connect-method", [
|
|
@@ -1593,11 +1658,14 @@ const walletSuccessResponseSchema = valibot.variant("~sats-connect-method", [
|
|
|
1593
1658
|
walletGetNetworksSuccessResponseSchema,
|
|
1594
1659
|
walletGetNetworkSuccessResponseSchema,
|
|
1595
1660
|
walletGetWalletTypeSuccessResponseSchema,
|
|
1661
|
+
walletOpenSuccessResponseSchema,
|
|
1596
1662
|
walletOpenBridgeSuccessResponseSchema,
|
|
1597
1663
|
walletOpenBuySuccessResponseSchema,
|
|
1598
1664
|
walletOpenReceiveSuccessResponseSchema,
|
|
1599
1665
|
walletRenouncePermissionsSuccessResponseSchema,
|
|
1600
1666
|
walletRequestPermissionsSuccessResponseSchema,
|
|
1667
|
+
walletSignSuccessResponseSchema,
|
|
1668
|
+
walletGetEdDsaPublicKeySuccessResponseSchema,
|
|
1601
1669
|
walletSwitchNetworkSuccessResponseSchema
|
|
1602
1670
|
]);
|
|
1603
1671
|
|
|
@@ -3584,6 +3652,10 @@ exports.walletGetCurrentPermissionsParamsSchema = walletGetCurrentPermissionsPar
|
|
|
3584
3652
|
exports.walletGetCurrentPermissionsRequestSchema = walletGetCurrentPermissionsRequestSchema;
|
|
3585
3653
|
exports.walletGetCurrentPermissionsResultSchema = walletGetCurrentPermissionsResultSchema;
|
|
3586
3654
|
exports.walletGetCurrentPermissionsSuccessResponseSchema = walletGetCurrentPermissionsSuccessResponseSchema;
|
|
3655
|
+
exports.walletGetEdDsaPublicKeyParamsSchema = walletGetEdDsaPublicKeyParamsSchema;
|
|
3656
|
+
exports.walletGetEdDsaPublicKeyRequestSchema = walletGetEdDsaPublicKeyRequestSchema;
|
|
3657
|
+
exports.walletGetEdDsaPublicKeyResultSchema = walletGetEdDsaPublicKeyResultSchema;
|
|
3658
|
+
exports.walletGetEdDsaPublicKeySuccessResponseSchema = walletGetEdDsaPublicKeySuccessResponseSchema;
|
|
3587
3659
|
exports.walletGetNetworkParamsSchema = walletGetNetworkParamsSchema;
|
|
3588
3660
|
exports.walletGetNetworkRequestSchema = walletGetNetworkRequestSchema;
|
|
3589
3661
|
exports.walletGetNetworkResultSchema = walletGetNetworkResultSchema;
|
|
@@ -3605,10 +3677,14 @@ exports.walletOpenBuyParamsSchema = walletOpenBuyParamsSchema;
|
|
|
3605
3677
|
exports.walletOpenBuyRequestSchema = walletOpenBuyRequestSchema;
|
|
3606
3678
|
exports.walletOpenBuyResultSchema = walletOpenBuyResultSchema;
|
|
3607
3679
|
exports.walletOpenBuySuccessResponseSchema = walletOpenBuySuccessResponseSchema;
|
|
3680
|
+
exports.walletOpenParamsSchema = walletOpenParamsSchema;
|
|
3608
3681
|
exports.walletOpenReceiveParamsSchema = walletOpenReceiveParamsSchema;
|
|
3609
3682
|
exports.walletOpenReceiveRequestSchema = walletOpenReceiveRequestSchema;
|
|
3610
3683
|
exports.walletOpenReceiveResultSchema = walletOpenReceiveResultSchema;
|
|
3611
3684
|
exports.walletOpenReceiveSuccessResponseSchema = walletOpenReceiveSuccessResponseSchema;
|
|
3685
|
+
exports.walletOpenRequestSchema = walletOpenRequestSchema;
|
|
3686
|
+
exports.walletOpenResultSchema = walletOpenResultSchema;
|
|
3687
|
+
exports.walletOpenSuccessResponseSchema = walletOpenSuccessResponseSchema;
|
|
3612
3688
|
exports.walletRenouncePermissionsParamsSchema = walletRenouncePermissionsParamsSchema;
|
|
3613
3689
|
exports.walletRenouncePermissionsRequestSchema = walletRenouncePermissionsRequestSchema;
|
|
3614
3690
|
exports.walletRenouncePermissionsResultSchema = walletRenouncePermissionsResultSchema;
|
|
@@ -3618,6 +3694,10 @@ exports.walletRequestPermissionsRequestSchema = walletRequestPermissionsRequestS
|
|
|
3618
3694
|
exports.walletRequestPermissionsResultSchema = walletRequestPermissionsResultSchema;
|
|
3619
3695
|
exports.walletRequestPermissionsSuccessResponseSchema = walletRequestPermissionsSuccessResponseSchema;
|
|
3620
3696
|
exports.walletRequestSchema = walletRequestSchema;
|
|
3697
|
+
exports.walletSignParamsSchema = walletSignParamsSchema;
|
|
3698
|
+
exports.walletSignRequestSchema = walletSignRequestSchema;
|
|
3699
|
+
exports.walletSignResultSchema = walletSignResultSchema;
|
|
3700
|
+
exports.walletSignSuccessResponseSchema = walletSignSuccessResponseSchema;
|
|
3621
3701
|
exports.walletSuccessResponseSchema = walletSuccessResponseSchema;
|
|
3622
3702
|
exports.walletSwitchNetworkParamsSchema = walletSwitchNetworkParamsSchema;
|
|
3623
3703
|
exports.walletSwitchNetworkRequestSchema = walletSwitchNetworkRequestSchema;
|