@sats-connect/core 0.5.7-8d89b71 → 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 +59 -35
- package/dist/index.d.ts +59 -35
- package/dist/index.js +326 -321
- package/dist/index.mjs +326 -321
- 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[];
|
|
@@ -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<{
|
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[];
|
|
@@ -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<{
|