@sats-connect/core 0.5.7-919d21a → 0.5.7-a6b13fd
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 +64 -40
- package/dist/index.d.ts +64 -40
- package/dist/index.js +391 -388
- package/dist/index.mjs +391 -388
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
|
|
3
|
+
declare enum AddressPurpose {
|
|
4
|
+
Ordinals = "ordinals",
|
|
5
|
+
Payment = "payment",
|
|
6
|
+
Stacks = "stacks"
|
|
7
|
+
}
|
|
8
|
+
interface GetAddressPayload extends RequestPayload {
|
|
9
|
+
purposes: AddressPurpose[];
|
|
10
|
+
message: string;
|
|
11
|
+
}
|
|
12
|
+
declare enum AddressType {
|
|
13
|
+
p2pkh = "p2pkh",
|
|
14
|
+
p2sh = "p2sh",
|
|
15
|
+
p2wpkh = "p2wpkh",
|
|
16
|
+
p2wsh = "p2wsh",
|
|
17
|
+
p2tr = "p2tr",
|
|
18
|
+
stacks = "stacks"
|
|
19
|
+
}
|
|
20
|
+
declare const addressSchema: v.ObjectSchema<{
|
|
21
|
+
readonly address: v.StringSchema<undefined>;
|
|
22
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
23
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
24
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
25
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
type Address = v.InferOutput<typeof addressSchema>;
|
|
28
|
+
interface GetAddressResponse {
|
|
29
|
+
addresses: Address[];
|
|
30
|
+
}
|
|
31
|
+
type GetAddressOptions = RequestOptions<GetAddressPayload, GetAddressResponse>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Use `request()` instead
|
|
35
|
+
*/
|
|
36
|
+
declare const getAddress: (options: GetAddressOptions) => Promise<void>;
|
|
37
|
+
|
|
3
38
|
interface GetCapabilitiesPayload extends RequestPayload {
|
|
4
39
|
}
|
|
5
40
|
type GetCapabilitiesResponse = Capability[];
|
|
@@ -103,7 +138,7 @@ declare const networkChangeEventName = "networkChange";
|
|
|
103
138
|
declare const networkChangeSchema: v.ObjectSchema<{
|
|
104
139
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
105
140
|
readonly bitcoin: v.ObjectSchema<{
|
|
106
|
-
readonly name: v.
|
|
141
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
107
142
|
}, undefined>;
|
|
108
143
|
readonly stacks: v.ObjectSchema<{
|
|
109
144
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -120,7 +155,7 @@ declare const walletEventSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
|
120
155
|
}, undefined>, v.ObjectSchema<{
|
|
121
156
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
122
157
|
readonly bitcoin: v.ObjectSchema<{
|
|
123
|
-
readonly name: v.
|
|
158
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
124
159
|
}, undefined>;
|
|
125
160
|
readonly stacks: v.ObjectSchema<{
|
|
126
161
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -304,41 +339,6 @@ type RpcResult<Method extends keyof Requests> = {
|
|
|
304
339
|
status: 'error';
|
|
305
340
|
};
|
|
306
341
|
|
|
307
|
-
declare enum AddressPurpose {
|
|
308
|
-
Ordinals = "ordinals",
|
|
309
|
-
Payment = "payment",
|
|
310
|
-
Stacks = "stacks"
|
|
311
|
-
}
|
|
312
|
-
interface GetAddressPayload extends RequestPayload {
|
|
313
|
-
purposes: AddressPurpose[];
|
|
314
|
-
message: string;
|
|
315
|
-
}
|
|
316
|
-
declare enum AddressType {
|
|
317
|
-
p2pkh = "p2pkh",
|
|
318
|
-
p2sh = "p2sh",
|
|
319
|
-
p2wpkh = "p2wpkh",
|
|
320
|
-
p2wsh = "p2wsh",
|
|
321
|
-
p2tr = "p2tr",
|
|
322
|
-
stacks = "stacks"
|
|
323
|
-
}
|
|
324
|
-
declare const addressSchema: v.ObjectSchema<{
|
|
325
|
-
readonly address: v.StringSchema<undefined>;
|
|
326
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
327
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
328
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
329
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
330
|
-
}, undefined>;
|
|
331
|
-
type Address = v.InferOutput<typeof addressSchema>;
|
|
332
|
-
interface GetAddressResponse {
|
|
333
|
-
addresses: Address[];
|
|
334
|
-
}
|
|
335
|
-
type GetAddressOptions = RequestOptions<GetAddressPayload, GetAddressResponse>;
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* @deprecated Use `request()` instead
|
|
339
|
-
*/
|
|
340
|
-
declare const getAddress: (options: GetAddressOptions) => Promise<void>;
|
|
341
|
-
|
|
342
342
|
declare const getInfoMethodName = "getInfo";
|
|
343
343
|
declare const getInfoParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
344
344
|
type GetInfoParams = v.InferOutput<typeof getInfoParamsSchema>;
|
|
@@ -389,6 +389,14 @@ declare const getAddressesResultSchema: v.ObjectSchema<{
|
|
|
389
389
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
390
390
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
391
391
|
}, undefined>, undefined>;
|
|
392
|
+
readonly network: v.ObjectSchema<{
|
|
393
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
394
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
395
|
+
}, undefined>;
|
|
396
|
+
readonly stacks: v.ObjectSchema<{
|
|
397
|
+
readonly name: v.StringSchema<undefined>;
|
|
398
|
+
}, undefined>;
|
|
399
|
+
}, undefined>;
|
|
392
400
|
}, undefined>;
|
|
393
401
|
type GetAddressesResult = v.InferOutput<typeof getAddressesResultSchema>;
|
|
394
402
|
declare const getAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1085,6 +1093,14 @@ declare const stxGetAccountsResultSchema: v.ObjectSchema<{
|
|
|
1085
1093
|
readonly gaiaHubUrl: v.StringSchema<undefined>;
|
|
1086
1094
|
readonly gaiaAppKey: v.StringSchema<undefined>;
|
|
1087
1095
|
}, undefined>, undefined>;
|
|
1096
|
+
readonly network: v.ObjectSchema<{
|
|
1097
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1098
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1099
|
+
}, undefined>;
|
|
1100
|
+
readonly stacks: v.ObjectSchema<{
|
|
1101
|
+
readonly name: v.StringSchema<undefined>;
|
|
1102
|
+
}, undefined>;
|
|
1103
|
+
}, undefined>;
|
|
1088
1104
|
}, undefined>;
|
|
1089
1105
|
type StxGetAccountsResult = v.InferOutput<typeof stxGetAccountsResultSchema>;
|
|
1090
1106
|
declare const stxGetAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1115,6 +1131,14 @@ declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
|
1115
1131
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1116
1132
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1117
1133
|
}, undefined>, undefined>;
|
|
1134
|
+
readonly network: v.ObjectSchema<{
|
|
1135
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1136
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1137
|
+
}, undefined>;
|
|
1138
|
+
readonly stacks: v.ObjectSchema<{
|
|
1139
|
+
readonly name: v.StringSchema<undefined>;
|
|
1140
|
+
}, undefined>;
|
|
1141
|
+
}, undefined>;
|
|
1118
1142
|
}, undefined>;
|
|
1119
1143
|
type StxGetAddressesResult = v.InferOutput<typeof stxGetAddressesResultSchema>;
|
|
1120
1144
|
declare const stxGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1608,7 +1632,7 @@ declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, n
|
|
|
1608
1632
|
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1609
1633
|
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1610
1634
|
readonly bitcoin: v.ObjectSchema<{
|
|
1611
|
-
readonly name: v.
|
|
1635
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1612
1636
|
}, undefined>;
|
|
1613
1637
|
readonly stacks: v.ObjectSchema<{
|
|
1614
1638
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -1638,7 +1662,7 @@ declare const getAccountResultSchema: v.ObjectSchema<{
|
|
|
1638
1662
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1639
1663
|
readonly network: v.ObjectSchema<{
|
|
1640
1664
|
readonly bitcoin: v.ObjectSchema<{
|
|
1641
|
-
readonly name: v.
|
|
1665
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1642
1666
|
}, undefined>;
|
|
1643
1667
|
readonly stacks: v.ObjectSchema<{
|
|
1644
1668
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -1685,7 +1709,7 @@ declare const connectResultSchema: v.ObjectSchema<{
|
|
|
1685
1709
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1686
1710
|
readonly network: v.ObjectSchema<{
|
|
1687
1711
|
readonly bitcoin: v.ObjectSchema<{
|
|
1688
|
-
readonly name: v.
|
|
1712
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1689
1713
|
}, undefined>;
|
|
1690
1714
|
readonly stacks: v.ObjectSchema<{
|
|
1691
1715
|
readonly name: v.StringSchema<undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
|
|
3
|
+
declare enum AddressPurpose {
|
|
4
|
+
Ordinals = "ordinals",
|
|
5
|
+
Payment = "payment",
|
|
6
|
+
Stacks = "stacks"
|
|
7
|
+
}
|
|
8
|
+
interface GetAddressPayload extends RequestPayload {
|
|
9
|
+
purposes: AddressPurpose[];
|
|
10
|
+
message: string;
|
|
11
|
+
}
|
|
12
|
+
declare enum AddressType {
|
|
13
|
+
p2pkh = "p2pkh",
|
|
14
|
+
p2sh = "p2sh",
|
|
15
|
+
p2wpkh = "p2wpkh",
|
|
16
|
+
p2wsh = "p2wsh",
|
|
17
|
+
p2tr = "p2tr",
|
|
18
|
+
stacks = "stacks"
|
|
19
|
+
}
|
|
20
|
+
declare const addressSchema: v.ObjectSchema<{
|
|
21
|
+
readonly address: v.StringSchema<undefined>;
|
|
22
|
+
readonly publicKey: v.StringSchema<undefined>;
|
|
23
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
24
|
+
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
25
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
26
|
+
}, undefined>;
|
|
27
|
+
type Address = v.InferOutput<typeof addressSchema>;
|
|
28
|
+
interface GetAddressResponse {
|
|
29
|
+
addresses: Address[];
|
|
30
|
+
}
|
|
31
|
+
type GetAddressOptions = RequestOptions<GetAddressPayload, GetAddressResponse>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Use `request()` instead
|
|
35
|
+
*/
|
|
36
|
+
declare const getAddress: (options: GetAddressOptions) => Promise<void>;
|
|
37
|
+
|
|
3
38
|
interface GetCapabilitiesPayload extends RequestPayload {
|
|
4
39
|
}
|
|
5
40
|
type GetCapabilitiesResponse = Capability[];
|
|
@@ -103,7 +138,7 @@ declare const networkChangeEventName = "networkChange";
|
|
|
103
138
|
declare const networkChangeSchema: v.ObjectSchema<{
|
|
104
139
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
105
140
|
readonly bitcoin: v.ObjectSchema<{
|
|
106
|
-
readonly name: v.
|
|
141
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
107
142
|
}, undefined>;
|
|
108
143
|
readonly stacks: v.ObjectSchema<{
|
|
109
144
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -120,7 +155,7 @@ declare const walletEventSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
|
120
155
|
}, undefined>, v.ObjectSchema<{
|
|
121
156
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
122
157
|
readonly bitcoin: v.ObjectSchema<{
|
|
123
|
-
readonly name: v.
|
|
158
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
124
159
|
}, undefined>;
|
|
125
160
|
readonly stacks: v.ObjectSchema<{
|
|
126
161
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -304,41 +339,6 @@ type RpcResult<Method extends keyof Requests> = {
|
|
|
304
339
|
status: 'error';
|
|
305
340
|
};
|
|
306
341
|
|
|
307
|
-
declare enum AddressPurpose {
|
|
308
|
-
Ordinals = "ordinals",
|
|
309
|
-
Payment = "payment",
|
|
310
|
-
Stacks = "stacks"
|
|
311
|
-
}
|
|
312
|
-
interface GetAddressPayload extends RequestPayload {
|
|
313
|
-
purposes: AddressPurpose[];
|
|
314
|
-
message: string;
|
|
315
|
-
}
|
|
316
|
-
declare enum AddressType {
|
|
317
|
-
p2pkh = "p2pkh",
|
|
318
|
-
p2sh = "p2sh",
|
|
319
|
-
p2wpkh = "p2wpkh",
|
|
320
|
-
p2wsh = "p2wsh",
|
|
321
|
-
p2tr = "p2tr",
|
|
322
|
-
stacks = "stacks"
|
|
323
|
-
}
|
|
324
|
-
declare const addressSchema: v.ObjectSchema<{
|
|
325
|
-
readonly address: v.StringSchema<undefined>;
|
|
326
|
-
readonly publicKey: v.StringSchema<undefined>;
|
|
327
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
328
|
-
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
329
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
330
|
-
}, undefined>;
|
|
331
|
-
type Address = v.InferOutput<typeof addressSchema>;
|
|
332
|
-
interface GetAddressResponse {
|
|
333
|
-
addresses: Address[];
|
|
334
|
-
}
|
|
335
|
-
type GetAddressOptions = RequestOptions<GetAddressPayload, GetAddressResponse>;
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* @deprecated Use `request()` instead
|
|
339
|
-
*/
|
|
340
|
-
declare const getAddress: (options: GetAddressOptions) => Promise<void>;
|
|
341
|
-
|
|
342
342
|
declare const getInfoMethodName = "getInfo";
|
|
343
343
|
declare const getInfoParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
344
344
|
type GetInfoParams = v.InferOutput<typeof getInfoParamsSchema>;
|
|
@@ -389,6 +389,14 @@ declare const getAddressesResultSchema: v.ObjectSchema<{
|
|
|
389
389
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
390
390
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
391
391
|
}, undefined>, undefined>;
|
|
392
|
+
readonly network: v.ObjectSchema<{
|
|
393
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
394
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
395
|
+
}, undefined>;
|
|
396
|
+
readonly stacks: v.ObjectSchema<{
|
|
397
|
+
readonly name: v.StringSchema<undefined>;
|
|
398
|
+
}, undefined>;
|
|
399
|
+
}, undefined>;
|
|
392
400
|
}, undefined>;
|
|
393
401
|
type GetAddressesResult = v.InferOutput<typeof getAddressesResultSchema>;
|
|
394
402
|
declare const getAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1085,6 +1093,14 @@ declare const stxGetAccountsResultSchema: v.ObjectSchema<{
|
|
|
1085
1093
|
readonly gaiaHubUrl: v.StringSchema<undefined>;
|
|
1086
1094
|
readonly gaiaAppKey: v.StringSchema<undefined>;
|
|
1087
1095
|
}, undefined>, undefined>;
|
|
1096
|
+
readonly network: v.ObjectSchema<{
|
|
1097
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1098
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1099
|
+
}, undefined>;
|
|
1100
|
+
readonly stacks: v.ObjectSchema<{
|
|
1101
|
+
readonly name: v.StringSchema<undefined>;
|
|
1102
|
+
}, undefined>;
|
|
1103
|
+
}, undefined>;
|
|
1088
1104
|
}, undefined>;
|
|
1089
1105
|
type StxGetAccountsResult = v.InferOutput<typeof stxGetAccountsResultSchema>;
|
|
1090
1106
|
declare const stxGetAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1115,6 +1131,14 @@ declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
|
1115
1131
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1116
1132
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1117
1133
|
}, undefined>, undefined>;
|
|
1134
|
+
readonly network: v.ObjectSchema<{
|
|
1135
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1136
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1137
|
+
}, undefined>;
|
|
1138
|
+
readonly stacks: v.ObjectSchema<{
|
|
1139
|
+
readonly name: v.StringSchema<undefined>;
|
|
1140
|
+
}, undefined>;
|
|
1141
|
+
}, undefined>;
|
|
1118
1142
|
}, undefined>;
|
|
1119
1143
|
type StxGetAddressesResult = v.InferOutput<typeof stxGetAddressesResultSchema>;
|
|
1120
1144
|
declare const stxGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1608,7 +1632,7 @@ declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, n
|
|
|
1608
1632
|
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1609
1633
|
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1610
1634
|
readonly bitcoin: v.ObjectSchema<{
|
|
1611
|
-
readonly name: v.
|
|
1635
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1612
1636
|
}, undefined>;
|
|
1613
1637
|
readonly stacks: v.ObjectSchema<{
|
|
1614
1638
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -1638,7 +1662,7 @@ declare const getAccountResultSchema: v.ObjectSchema<{
|
|
|
1638
1662
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1639
1663
|
readonly network: v.ObjectSchema<{
|
|
1640
1664
|
readonly bitcoin: v.ObjectSchema<{
|
|
1641
|
-
readonly name: v.
|
|
1665
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1642
1666
|
}, undefined>;
|
|
1643
1667
|
readonly stacks: v.ObjectSchema<{
|
|
1644
1668
|
readonly name: v.StringSchema<undefined>;
|
|
@@ -1685,7 +1709,7 @@ declare const connectResultSchema: v.ObjectSchema<{
|
|
|
1685
1709
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1686
1710
|
readonly network: v.ObjectSchema<{
|
|
1687
1711
|
readonly bitcoin: v.ObjectSchema<{
|
|
1688
|
-
readonly name: v.
|
|
1712
|
+
readonly name: v.EnumSchema<typeof BitcoinNetworkType, undefined>;
|
|
1689
1713
|
}, undefined>;
|
|
1690
1714
|
readonly stacks: v.ObjectSchema<{
|
|
1691
1715
|
readonly name: v.StringSchema<undefined>;
|