@sats-connect/core 0.4.0-9147908 → 0.4.0-97f6fb5
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 +75 -329
- package/dist/index.d.ts +75 -329
- package/dist/index.js +12 -17
- package/dist/index.mjs +9 -14
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -85,8 +85,8 @@ __export(src_exports, {
|
|
|
85
85
|
getInfoResultSchema: () => getInfoResultSchema,
|
|
86
86
|
getInscriptionsMethodName: () => getInscriptionsMethodName,
|
|
87
87
|
getInscriptionsParamsSchema: () => getInscriptionsParamsSchema,
|
|
88
|
+
getInscriptionsRequestMessageSchema: () => getInscriptionsRequestMessageSchema,
|
|
88
89
|
getInscriptionsResultSchema: () => getInscriptionsResultSchema,
|
|
89
|
-
getInscriptionsSchema: () => getInscriptionsSchema,
|
|
90
90
|
getProviderById: () => getProviderById,
|
|
91
91
|
getProviderOrThrow: () => getProviderOrThrow,
|
|
92
92
|
getProviders: () => getProviders,
|
|
@@ -127,13 +127,13 @@ __export(src_exports, {
|
|
|
127
127
|
runesMintResultSchema: () => runesMintResultSchema,
|
|
128
128
|
runesTransferMethodName: () => runesTransferMethodName,
|
|
129
129
|
runesTransferParamsSchema: () => runesTransferParamsSchema,
|
|
130
|
-
|
|
130
|
+
runesTransferRequestMessageSchema: () => runesTransferRequestMessageSchema,
|
|
131
131
|
runesTransferResultSchema: () => runesTransferResultSchema,
|
|
132
132
|
sendBtcTransaction: () => sendBtcTransaction,
|
|
133
133
|
sendInscriptionsMethodName: () => sendInscriptionsMethodName,
|
|
134
134
|
sendInscriptionsParamsSchema: () => sendInscriptionsParamsSchema,
|
|
135
|
+
sendInscriptionsRequestMessageSchema: () => sendInscriptionsRequestMessageSchema,
|
|
135
136
|
sendInscriptionsResultSchema: () => sendInscriptionsResultSchema,
|
|
136
|
-
sendInscriptionsSchema: () => sendInscriptionsSchema,
|
|
137
137
|
sendTransferMethodName: () => sendTransferMethodName,
|
|
138
138
|
sendTransferParamsSchema: () => sendTransferParamsSchema,
|
|
139
139
|
sendTransferRequestMessageSchema: () => sendTransferRequestMessageSchema,
|
|
@@ -237,10 +237,7 @@ function removeDefaultProvider() {
|
|
|
237
237
|
localStorage.removeItem("sats-connect_defaultProvider");
|
|
238
238
|
}
|
|
239
239
|
function getSupportedWallets() {
|
|
240
|
-
const
|
|
241
|
-
const { xverse, ...defaultProviders } = DefaultAdaptersInfo;
|
|
242
|
-
const allProviders = [...ambientProviders, ...Object.values(defaultProviders)];
|
|
243
|
-
const wallets = allProviders.map((provider) => {
|
|
240
|
+
const wallets = Object.values(DefaultAdaptersInfo).map((provider) => {
|
|
244
241
|
{
|
|
245
242
|
return {
|
|
246
243
|
...provider,
|
|
@@ -900,12 +897,10 @@ var v14 = __toESM(require("valibot"));
|
|
|
900
897
|
var import_xverse_core = require("@secretkeylabs/xverse-core");
|
|
901
898
|
var permissionTemplate = v14.variant("type", [
|
|
902
899
|
v14.object({
|
|
903
|
-
...v14.omit(import_xverse_core.permissions.resources.account.accountPermissionSchema, ["clientId"
|
|
904
|
-
actions: v14.partial(import_xverse_core.permissions.resources.account.accountActionsSchema)
|
|
900
|
+
...v14.omit(import_xverse_core.permissions.resources.account.accountPermissionSchema, ["clientId"]).entries
|
|
905
901
|
}),
|
|
906
902
|
v14.object({
|
|
907
|
-
...v14.omit(import_xverse_core.permissions.resources.wallet.walletPermissionSchema, ["clientId"]).entries
|
|
908
|
-
actions: v14.partial(import_xverse_core.permissions.resources.wallet.walletActionsSchema)
|
|
903
|
+
...v14.omit(import_xverse_core.permissions.resources.wallet.walletPermissionSchema, ["clientId"]).entries
|
|
909
904
|
})
|
|
910
905
|
]);
|
|
911
906
|
var requestPermissionsMethodName = "wallet_requestPermissions";
|
|
@@ -1105,7 +1100,7 @@ var runesTransferParamsSchema = v18.object({
|
|
|
1105
1100
|
var runesTransferResultSchema = v18.object({
|
|
1106
1101
|
txid: v18.string()
|
|
1107
1102
|
});
|
|
1108
|
-
var
|
|
1103
|
+
var runesTransferRequestMessageSchema = v18.object({
|
|
1109
1104
|
...rpcRequestMessageSchema.entries,
|
|
1110
1105
|
...v18.object({
|
|
1111
1106
|
method: v18.literal(runesTransferMethodName),
|
|
@@ -1141,7 +1136,7 @@ var getInscriptionsResultSchema = v19.object({
|
|
|
1141
1136
|
})
|
|
1142
1137
|
)
|
|
1143
1138
|
});
|
|
1144
|
-
var
|
|
1139
|
+
var getInscriptionsRequestMessageSchema = v19.object({
|
|
1145
1140
|
...rpcRequestMessageSchema.entries,
|
|
1146
1141
|
...v19.object({
|
|
1147
1142
|
method: v19.literal(getInscriptionsMethodName),
|
|
@@ -1161,7 +1156,7 @@ var sendInscriptionsParamsSchema = v19.object({
|
|
|
1161
1156
|
var sendInscriptionsResultSchema = v19.object({
|
|
1162
1157
|
txid: v19.string()
|
|
1163
1158
|
});
|
|
1164
|
-
var
|
|
1159
|
+
var sendInscriptionsRequestMessageSchema = v19.object({
|
|
1165
1160
|
...rpcRequestMessageSchema.entries,
|
|
1166
1161
|
...v19.object({
|
|
1167
1162
|
method: v19.literal(sendInscriptionsMethodName),
|
|
@@ -2187,8 +2182,8 @@ var signMultipleTransactions = async (options) => {
|
|
|
2187
2182
|
getInfoResultSchema,
|
|
2188
2183
|
getInscriptionsMethodName,
|
|
2189
2184
|
getInscriptionsParamsSchema,
|
|
2185
|
+
getInscriptionsRequestMessageSchema,
|
|
2190
2186
|
getInscriptionsResultSchema,
|
|
2191
|
-
getInscriptionsSchema,
|
|
2192
2187
|
getProviderById,
|
|
2193
2188
|
getProviderOrThrow,
|
|
2194
2189
|
getProviders,
|
|
@@ -2229,13 +2224,13 @@ var signMultipleTransactions = async (options) => {
|
|
|
2229
2224
|
runesMintResultSchema,
|
|
2230
2225
|
runesTransferMethodName,
|
|
2231
2226
|
runesTransferParamsSchema,
|
|
2232
|
-
|
|
2227
|
+
runesTransferRequestMessageSchema,
|
|
2233
2228
|
runesTransferResultSchema,
|
|
2234
2229
|
sendBtcTransaction,
|
|
2235
2230
|
sendInscriptionsMethodName,
|
|
2236
2231
|
sendInscriptionsParamsSchema,
|
|
2232
|
+
sendInscriptionsRequestMessageSchema,
|
|
2237
2233
|
sendInscriptionsResultSchema,
|
|
2238
|
-
sendInscriptionsSchema,
|
|
2239
2234
|
sendTransferMethodName,
|
|
2240
2235
|
sendTransferParamsSchema,
|
|
2241
2236
|
sendTransferRequestMessageSchema,
|
package/dist/index.mjs
CHANGED
|
@@ -47,10 +47,7 @@ function removeDefaultProvider() {
|
|
|
47
47
|
localStorage.removeItem("sats-connect_defaultProvider");
|
|
48
48
|
}
|
|
49
49
|
function getSupportedWallets() {
|
|
50
|
-
const
|
|
51
|
-
const { xverse, ...defaultProviders } = DefaultAdaptersInfo;
|
|
52
|
-
const allProviders = [...ambientProviders, ...Object.values(defaultProviders)];
|
|
53
|
-
const wallets = allProviders.map((provider) => {
|
|
50
|
+
const wallets = Object.values(DefaultAdaptersInfo).map((provider) => {
|
|
54
51
|
{
|
|
55
52
|
return {
|
|
56
53
|
...provider,
|
|
@@ -710,12 +707,10 @@ import * as v14 from "valibot";
|
|
|
710
707
|
import { permissions } from "@secretkeylabs/xverse-core";
|
|
711
708
|
var permissionTemplate = v14.variant("type", [
|
|
712
709
|
v14.object({
|
|
713
|
-
...v14.omit(permissions.resources.account.accountPermissionSchema, ["clientId"
|
|
714
|
-
actions: v14.partial(permissions.resources.account.accountActionsSchema)
|
|
710
|
+
...v14.omit(permissions.resources.account.accountPermissionSchema, ["clientId"]).entries
|
|
715
711
|
}),
|
|
716
712
|
v14.object({
|
|
717
|
-
...v14.omit(permissions.resources.wallet.walletPermissionSchema, ["clientId"]).entries
|
|
718
|
-
actions: v14.partial(permissions.resources.wallet.walletActionsSchema)
|
|
713
|
+
...v14.omit(permissions.resources.wallet.walletPermissionSchema, ["clientId"]).entries
|
|
719
714
|
})
|
|
720
715
|
]);
|
|
721
716
|
var requestPermissionsMethodName = "wallet_requestPermissions";
|
|
@@ -915,7 +910,7 @@ var runesTransferParamsSchema = v18.object({
|
|
|
915
910
|
var runesTransferResultSchema = v18.object({
|
|
916
911
|
txid: v18.string()
|
|
917
912
|
});
|
|
918
|
-
var
|
|
913
|
+
var runesTransferRequestMessageSchema = v18.object({
|
|
919
914
|
...rpcRequestMessageSchema.entries,
|
|
920
915
|
...v18.object({
|
|
921
916
|
method: v18.literal(runesTransferMethodName),
|
|
@@ -951,7 +946,7 @@ var getInscriptionsResultSchema = v19.object({
|
|
|
951
946
|
})
|
|
952
947
|
)
|
|
953
948
|
});
|
|
954
|
-
var
|
|
949
|
+
var getInscriptionsRequestMessageSchema = v19.object({
|
|
955
950
|
...rpcRequestMessageSchema.entries,
|
|
956
951
|
...v19.object({
|
|
957
952
|
method: v19.literal(getInscriptionsMethodName),
|
|
@@ -971,7 +966,7 @@ var sendInscriptionsParamsSchema = v19.object({
|
|
|
971
966
|
var sendInscriptionsResultSchema = v19.object({
|
|
972
967
|
txid: v19.string()
|
|
973
968
|
});
|
|
974
|
-
var
|
|
969
|
+
var sendInscriptionsRequestMessageSchema = v19.object({
|
|
975
970
|
...rpcRequestMessageSchema.entries,
|
|
976
971
|
...v19.object({
|
|
977
972
|
method: v19.literal(sendInscriptionsMethodName),
|
|
@@ -1996,8 +1991,8 @@ export {
|
|
|
1996
1991
|
getInfoResultSchema,
|
|
1997
1992
|
getInscriptionsMethodName,
|
|
1998
1993
|
getInscriptionsParamsSchema,
|
|
1994
|
+
getInscriptionsRequestMessageSchema,
|
|
1999
1995
|
getInscriptionsResultSchema,
|
|
2000
|
-
getInscriptionsSchema,
|
|
2001
1996
|
getProviderById,
|
|
2002
1997
|
getProviderOrThrow,
|
|
2003
1998
|
getProviders,
|
|
@@ -2038,13 +2033,13 @@ export {
|
|
|
2038
2033
|
runesMintResultSchema,
|
|
2039
2034
|
runesTransferMethodName,
|
|
2040
2035
|
runesTransferParamsSchema,
|
|
2041
|
-
|
|
2036
|
+
runesTransferRequestMessageSchema,
|
|
2042
2037
|
runesTransferResultSchema,
|
|
2043
2038
|
sendBtcTransaction,
|
|
2044
2039
|
sendInscriptionsMethodName,
|
|
2045
2040
|
sendInscriptionsParamsSchema,
|
|
2041
|
+
sendInscriptionsRequestMessageSchema,
|
|
2046
2042
|
sendInscriptionsResultSchema,
|
|
2047
|
-
sendInscriptionsSchema,
|
|
2048
2043
|
sendTransferMethodName,
|
|
2049
2044
|
sendTransferParamsSchema,
|
|
2050
2045
|
sendTransferRequestMessageSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sats-connect/core",
|
|
3
|
-
"version": "0.4.0-
|
|
3
|
+
"version": "0.4.0-97f6fb5",
|
|
4
4
|
"main": "dist/index.mjs",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.mts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
]
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@secretkeylabs/xverse-core": "24.
|
|
29
|
+
"@secretkeylabs/xverse-core": "24.2.0-55ca742",
|
|
30
30
|
"axios": "1.7.4",
|
|
31
31
|
"bitcoin-address-validation": "2.2.3",
|
|
32
32
|
"buffer": "6.0.3",
|