@sats-connect/core 0.19.0-d1718be → 0.20.0-a7dd793
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 +6415 -433
- package/dist/index.mjs +282 -249
- package/package.json +11 -8
package/dist/index.mjs
CHANGED
|
@@ -1,184 +1,10 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { createUnsecuredToken } from "jsontokens";
|
|
3
2
|
import axios from "axios";
|
|
4
3
|
import { AddressType as AddressType$1, getAddressInfo } from "bitcoin-address-validation";
|
|
5
4
|
import { Buffer } from "buffer";
|
|
5
|
+
import { createUnsecuredToken } from "jsontokens";
|
|
6
6
|
import { match } from "ts-pattern";
|
|
7
7
|
|
|
8
|
-
//#region src/request/rpcSpec.ts
|
|
9
|
-
const specIdSchema = v.union([
|
|
10
|
-
v.string(),
|
|
11
|
-
v.number(),
|
|
12
|
-
v.null()
|
|
13
|
-
]);
|
|
14
|
-
const specRequestSchema = v.object({
|
|
15
|
-
jsonrpc: v.literal("2.0"),
|
|
16
|
-
method: v.string(),
|
|
17
|
-
params: v.optional(v.union([
|
|
18
|
-
v.array(v.unknown()),
|
|
19
|
-
v.looseObject({}),
|
|
20
|
-
v.null()
|
|
21
|
-
])),
|
|
22
|
-
id: v.optional(specIdSchema)
|
|
23
|
-
});
|
|
24
|
-
const specSuccessResponseSchema = v.object({
|
|
25
|
-
jsonrpc: v.literal("2.0"),
|
|
26
|
-
result: v.unknown(),
|
|
27
|
-
id: specIdSchema
|
|
28
|
-
});
|
|
29
|
-
const warningSchema = v.variant("code", [v.object({
|
|
30
|
-
code: v.literal("DEPRECATION_NOTICE"),
|
|
31
|
-
message: v.string(),
|
|
32
|
-
sunsetDate: v.pipe(v.string(), v.isoDate())
|
|
33
|
-
})]);
|
|
34
|
-
/**
|
|
35
|
-
* Extends the standard JSON RPC 2.0 with an additional field as a means of
|
|
36
|
-
* providing clients with extra data, such as deprecation warnings, without
|
|
37
|
-
* altering the main payloads.
|
|
38
|
-
*
|
|
39
|
-
* A JSON-RPC response must either be a result (success) or an error (failure).
|
|
40
|
-
* To provide additional data, conventions must be layered atop these two types.
|
|
41
|
-
* Having an additional property is the least disruptive approach, and is
|
|
42
|
-
* acceptable when clients are known to be able to handle such a structure,
|
|
43
|
-
* which they can since they're all part of Sats Connect.
|
|
44
|
-
*/
|
|
45
|
-
const specSuccessWithExtensionsResponseSchema = v.object({
|
|
46
|
-
...specSuccessResponseSchema.entries,
|
|
47
|
-
extensions: v.optional(v.object({ warnings: v.array(warningSchema) }))
|
|
48
|
-
});
|
|
49
|
-
const specErrorObjectSchema = v.object({
|
|
50
|
-
code: v.number(),
|
|
51
|
-
message: v.string(),
|
|
52
|
-
data: v.optional(v.unknown())
|
|
53
|
-
});
|
|
54
|
-
const specErrorResponseSchema = v.object({
|
|
55
|
-
jsonrpc: v.literal("2.0"),
|
|
56
|
-
error: specErrorObjectSchema,
|
|
57
|
-
id: specIdSchema
|
|
58
|
-
});
|
|
59
|
-
const specResponseSchema = v.union([specSuccessWithExtensionsResponseSchema, specErrorResponseSchema]);
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/request/shared.ts
|
|
63
|
-
const rpcIdSchema = v.string();
|
|
64
|
-
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region src/request/createSuccessResponseSchema.ts
|
|
67
|
-
function createSuccessResponseSchema({ method, resultSchema }) {
|
|
68
|
-
return v.object({
|
|
69
|
-
...specSuccessWithExtensionsResponseSchema.entries,
|
|
70
|
-
id: rpcIdSchema,
|
|
71
|
-
result: resultSchema,
|
|
72
|
-
"~sats-connect-method": v.literal(method)
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/request/methods.ts
|
|
78
|
-
const bitcoinMethods = {
|
|
79
|
-
getAccounts: "getAccounts",
|
|
80
|
-
getAddresses: "getAddresses",
|
|
81
|
-
bitcoin_getAddressesV2: "bitcoin_getAddressesV2",
|
|
82
|
-
getBalance: "getBalance",
|
|
83
|
-
bitcoin_getBalanceV2: "bitcoin_getBalanceV2",
|
|
84
|
-
getInfo: "getInfo",
|
|
85
|
-
sendTransfer: "sendTransfer",
|
|
86
|
-
bitcoin_sendTransferV2: "bitcoin_sendTransferV2",
|
|
87
|
-
signMessage: "signMessage",
|
|
88
|
-
bitcoin_signMessageV2: "bitcoin_signMessageV2",
|
|
89
|
-
signMultipleMessages: "signMultipleMessages",
|
|
90
|
-
bitcoin_signMultipleMessagesV2: "bitcoin_signMultipleMessagesV2",
|
|
91
|
-
signPsbt: "signPsbt",
|
|
92
|
-
bitcoin_signPsbtV2: "bitcoin_signPsbtV2"
|
|
93
|
-
};
|
|
94
|
-
const stacksMethods = {
|
|
95
|
-
stx_callContract: "stx_callContract",
|
|
96
|
-
stx_deployContract: "stx_deployContract",
|
|
97
|
-
stx_getAccounts: "stx_getAccounts",
|
|
98
|
-
stx_getAddresses: "stx_getAddresses",
|
|
99
|
-
stx_getNetworks: "stx_getNetworks",
|
|
100
|
-
stx_signMessage: "stx_signMessage",
|
|
101
|
-
stx_signStructuredMessage: "stx_signStructuredMessage",
|
|
102
|
-
stx_signTransaction: "stx_signTransaction",
|
|
103
|
-
stx_signTransactions: "stx_signTransactions",
|
|
104
|
-
stx_transferStx: "stx_transferStx"
|
|
105
|
-
};
|
|
106
|
-
const sparkMethods = {
|
|
107
|
-
spark_getAddresses: "spark_getAddresses",
|
|
108
|
-
spark_getAddressesV2: "spark_getAddressesV2",
|
|
109
|
-
spark_getBalance: "spark_getBalance",
|
|
110
|
-
spark_transfer: "spark_transfer",
|
|
111
|
-
spark_transferToken: "spark_transferToken",
|
|
112
|
-
spark_signMessage: "spark_signMessage",
|
|
113
|
-
spark_flashnet_getJwt: "spark_flashnet_getJwt",
|
|
114
|
-
spark_flashnet_signIntent: "spark_flashnet_signIntent",
|
|
115
|
-
spark_flashnet_signStructuredMessage: "spark_flashnet_signStructuredMessage",
|
|
116
|
-
spark_flashnet_executeSwap: "spark_flashnet_executeSwap",
|
|
117
|
-
spark_flashnet_executeRouteSwap: "spark_flashnet_executeRouteSwap",
|
|
118
|
-
spark_flashnet_clawbackFunds: "spark_flashnet_clawbackFunds",
|
|
119
|
-
spark_flashnet_getClawbackEligibleTransfers: "spark_flashnet_getClawbackEligibleTransfers"
|
|
120
|
-
};
|
|
121
|
-
const runesMethods = {
|
|
122
|
-
runes_estimateEtch: "runes_estimateEtch",
|
|
123
|
-
runes_estimateMint: "runes_estimateMint",
|
|
124
|
-
runes_estimateRbfOrder: "runes_estimateRbfOrder",
|
|
125
|
-
runes_etch: "runes_etch",
|
|
126
|
-
runes_getBalance: "runes_getBalance",
|
|
127
|
-
runes_getOrder: "runes_getOrder",
|
|
128
|
-
runes_mint: "runes_mint",
|
|
129
|
-
runes_rbfOrder: "runes_rbfOrder",
|
|
130
|
-
runes_transfer: "runes_transfer"
|
|
131
|
-
};
|
|
132
|
-
const ordinalsMethods = {
|
|
133
|
-
ord_getInscriptions: "ord_getInscriptions",
|
|
134
|
-
ord_sendInscriptions: "ord_sendInscriptions"
|
|
135
|
-
};
|
|
136
|
-
const walletMethods = {
|
|
137
|
-
wallet_addNetwork: "wallet_addNetwork",
|
|
138
|
-
wallet_open: "wallet_open",
|
|
139
|
-
wallet_addNetworkV2: "wallet_addNetworkV2",
|
|
140
|
-
wallet_changeNetwork: "wallet_changeNetwork",
|
|
141
|
-
wallet_connect: "wallet_connect",
|
|
142
|
-
wallet_connectV2: "wallet_connectV2",
|
|
143
|
-
wallet_disconnect: "wallet_disconnect",
|
|
144
|
-
wallet_getAccount: "wallet_getAccount",
|
|
145
|
-
wallet_getAccountV2: "wallet_getAccountV2",
|
|
146
|
-
wallet_getCurrentPermissions: "wallet_getCurrentPermissions",
|
|
147
|
-
wallet_getNetwork: "wallet_getNetwork",
|
|
148
|
-
wallet_getNetworks: "wallet_getNetworks",
|
|
149
|
-
wallet_getWalletType: "wallet_getWalletType",
|
|
150
|
-
wallet_openBridge: "wallet_openBridge",
|
|
151
|
-
wallet_openBuy: "wallet_openBuy",
|
|
152
|
-
wallet_openReceive: "wallet_openReceive",
|
|
153
|
-
wallet_renouncePermissions: "wallet_renouncePermissions",
|
|
154
|
-
wallet_requestPermissions: "wallet_requestPermissions",
|
|
155
|
-
wallet_switchNetwork: "wallet_switchNetwork"
|
|
156
|
-
};
|
|
157
|
-
const methods = {
|
|
158
|
-
...bitcoinMethods,
|
|
159
|
-
...stacksMethods,
|
|
160
|
-
...sparkMethods,
|
|
161
|
-
...runesMethods,
|
|
162
|
-
...ordinalsMethods,
|
|
163
|
-
...walletMethods
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region src/request/rpc/objects/namespaces/stacks/methods/getNetworks/response.ts
|
|
168
|
-
const stacksGetNetworksResultSchema = v.object({
|
|
169
|
-
active: v.string(),
|
|
170
|
-
networks: v.array(v.object({
|
|
171
|
-
id: v.string(),
|
|
172
|
-
chainId: v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(4294967295)),
|
|
173
|
-
transactionVersion: v.picklist([0, 128])
|
|
174
|
-
}))
|
|
175
|
-
});
|
|
176
|
-
const stacksGetNetworksSuccessResponseSchema = createSuccessResponseSchema({
|
|
177
|
-
method: stacksMethods.stx_getNetworks,
|
|
178
|
-
resultSchema: stacksGetNetworksResultSchema
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
//#endregion
|
|
182
8
|
//#region src/request/rpc/objects/namespaces/wallet/shared/networks.ts
|
|
183
9
|
const networkConfigurationChains = {
|
|
184
10
|
bitcoin: "bitcoin",
|
|
@@ -236,8 +62,7 @@ const stacksNetworkConfigurationSchema = v.object({
|
|
|
236
62
|
chain: v.literal(networkConfigurationChains.stacks),
|
|
237
63
|
mode: stacksChainModeSchema,
|
|
238
64
|
stacksApiUrl: v.pipe(v.string(), v.url()),
|
|
239
|
-
xverseApiUrl: v.pipe(v.string(), v.url())
|
|
240
|
-
chainId: v.optional(v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(4294967295)))
|
|
65
|
+
xverseApiUrl: v.pipe(v.string(), v.url())
|
|
241
66
|
});
|
|
242
67
|
const starknetChainMode = {
|
|
243
68
|
mainnet: "mainnet",
|
|
@@ -283,9 +108,18 @@ const allResolvedNetworksSchema = v.object({
|
|
|
283
108
|
const walletTypes = [
|
|
284
109
|
"software",
|
|
285
110
|
"ledger",
|
|
286
|
-
"keystone"
|
|
111
|
+
"keystone",
|
|
112
|
+
"multisig"
|
|
287
113
|
];
|
|
288
114
|
const walletTypeSchema = v.picklist(walletTypes);
|
|
115
|
+
/**
|
|
116
|
+
* Signer set of a Stacks multisig (vault) address.
|
|
117
|
+
*/
|
|
118
|
+
const stacksMultisigSchema = v.object({
|
|
119
|
+
hashMode: v.literal("P2SHNonSequential"),
|
|
120
|
+
threshold: v.pipe(v.number(), v.integer(), v.minValue(1)),
|
|
121
|
+
publicKeys: v.pipe(v.array(v.pipe(v.string(), v.regex(/^0[23][0-9a-f]{64}$/))), v.minLength(1))
|
|
122
|
+
});
|
|
289
123
|
|
|
290
124
|
//#endregion
|
|
291
125
|
//#region src/addresses/types.ts
|
|
@@ -308,32 +142,56 @@ let AddressType = /* @__PURE__ */ function(AddressType$2) {
|
|
|
308
142
|
AddressType$2["spark"] = "spark";
|
|
309
143
|
return AddressType$2;
|
|
310
144
|
}({});
|
|
311
|
-
const
|
|
145
|
+
const hexSchema = v.pipe(v.string(), v.regex(/^(?:[0-9a-f]{2})+$/, "Expected lowercase, even-length hex without a 0x prefix"));
|
|
146
|
+
const tapInternalKeySchema = v.pipe(hexSchema, v.length(64, "Expected a 32-byte x-only key"));
|
|
147
|
+
const controlBlockSchema = v.pipe(hexSchema, v.check((controlBlock) => controlBlock.length >= 66 && controlBlock.length <= 8258 && (controlBlock.length - 66) % 64 === 0, "Expected a 33+32n byte BIP341 control block"));
|
|
148
|
+
const tapLeafScriptSchema = v.pipe(v.object({
|
|
149
|
+
script: hexSchema,
|
|
150
|
+
controlBlock: controlBlockSchema
|
|
151
|
+
}), v.check(({ script, controlBlock }) => Number.parseInt(script.slice(-2), 16) === (Number.parseInt(controlBlock.slice(0, 2), 16) & 254), "Tapleaf version does not match the control block"));
|
|
152
|
+
const unlockDefinitionSchema = v.variant("type", [
|
|
153
|
+
v.object({ type: v.literal("p2wpkh") }),
|
|
154
|
+
v.object({
|
|
155
|
+
type: v.literal("p2sh-p2wpkh"),
|
|
156
|
+
redeemScript: hexSchema
|
|
157
|
+
}),
|
|
158
|
+
v.object({
|
|
159
|
+
type: v.literal("p2tr-key-path"),
|
|
160
|
+
tapInternalKey: tapInternalKeySchema
|
|
161
|
+
}),
|
|
162
|
+
v.object({
|
|
163
|
+
type: v.literal("p2wsh"),
|
|
164
|
+
witnessScript: hexSchema
|
|
165
|
+
}),
|
|
166
|
+
v.object({
|
|
167
|
+
type: v.literal("p2tr-script-path"),
|
|
168
|
+
tapLeafScript: v.pipe(v.array(tapLeafScriptSchema), v.minLength(1))
|
|
169
|
+
})
|
|
170
|
+
]);
|
|
171
|
+
/**
|
|
172
|
+
* Address fields without the cross-field checks; spread `.entries` to extend it, but validate
|
|
173
|
+
* wallet responses with `addressSchema`.
|
|
174
|
+
*/
|
|
175
|
+
const addressObjectSchema = v.object({
|
|
312
176
|
address: v.string(),
|
|
313
177
|
publicKey: v.string(),
|
|
314
178
|
purpose: v.enum(AddressPurpose),
|
|
315
179
|
addressType: v.enum(AddressType),
|
|
316
|
-
walletType: walletTypeSchema
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const request$1 = createUnsecuredToken(options.payload);
|
|
330
|
-
const response = await provider.connect(request$1);
|
|
331
|
-
options.onFinish?.(response);
|
|
332
|
-
} catch (error) {
|
|
333
|
-
console.error("[Connect] Error during address request", error);
|
|
334
|
-
options.onCancel?.();
|
|
180
|
+
walletType: walletTypeSchema,
|
|
181
|
+
scriptPubKey: v.optional(hexSchema),
|
|
182
|
+
unlockDefinition: v.optional(unlockDefinitionSchema),
|
|
183
|
+
stacksMultisig: v.optional(stacksMultisigSchema)
|
|
184
|
+
});
|
|
185
|
+
const addressSchema = v.pipe(addressObjectSchema, v.check(({ scriptPubKey, unlockDefinition }) => scriptPubKey === void 0 === (unlockDefinition === void 0), "scriptPubKey and unlockDefinition must both be present or both be absent"), v.check(({ addressType, unlockDefinition }) => {
|
|
186
|
+
if (!unlockDefinition) return true;
|
|
187
|
+
switch (unlockDefinition.type) {
|
|
188
|
+
case "p2wpkh": return addressType === AddressType.p2wpkh;
|
|
189
|
+
case "p2sh-p2wpkh": return addressType === AddressType.p2sh;
|
|
190
|
+
case "p2tr-key-path":
|
|
191
|
+
case "p2tr-script-path": return addressType === AddressType.p2tr;
|
|
192
|
+
case "p2wsh": return addressType === AddressType.p2wsh;
|
|
335
193
|
}
|
|
336
|
-
};
|
|
194
|
+
}, "unlockDefinition type does not match addressType"), v.check(({ purpose, addressType, walletType, stacksMultisig }) => !stacksMultisig || purpose === AddressPurpose.Stacks && addressType === AddressType.stacks && walletType === "multisig", "stacksMultisig is only valid on multisig Stacks addresses"));
|
|
337
195
|
|
|
338
196
|
//#endregion
|
|
339
197
|
//#region src/types.ts
|
|
@@ -429,27 +287,10 @@ const networkChangeV2Schema = v.object({
|
|
|
429
287
|
});
|
|
430
288
|
const disconnectEventName = "disconnect";
|
|
431
289
|
const disconnectSchema = v.object({ type: v.literal(disconnectEventName) });
|
|
432
|
-
const stacksNetworkChangeSchema = v.object({
|
|
433
|
-
type: v.literal("stx_networkChange"),
|
|
434
|
-
result: stacksGetNetworksResultSchema
|
|
435
|
-
});
|
|
436
|
-
/** SIP-030 accounts are a bare array, not the legacy multi-chain addresses envelope. */
|
|
437
|
-
const stacksAccountChangeResultSchema = v.array(v.object({
|
|
438
|
-
address: v.string(),
|
|
439
|
-
publicKey: v.string(),
|
|
440
|
-
gaiaHubUrl: v.string(),
|
|
441
|
-
gaiaAppKey: v.string()
|
|
442
|
-
}));
|
|
443
|
-
const stacksAccountChangeSchema = v.object({
|
|
444
|
-
type: v.literal("stx_accountChange"),
|
|
445
|
-
result: stacksAccountChangeResultSchema
|
|
446
|
-
});
|
|
447
290
|
const walletEventSchema = v.variant("type", [
|
|
448
291
|
accountChangeSchema,
|
|
449
292
|
networkChangeSchema,
|
|
450
|
-
disconnectSchema
|
|
451
|
-
stacksNetworkChangeSchema,
|
|
452
|
-
stacksAccountChangeSchema
|
|
293
|
+
disconnectSchema
|
|
453
294
|
]);
|
|
454
295
|
|
|
455
296
|
//#endregion
|
|
@@ -831,8 +672,6 @@ var SatsConnectAdapter = class {
|
|
|
831
672
|
default: return this.requestInternal(method, params);
|
|
832
673
|
}
|
|
833
674
|
}
|
|
834
|
-
/** Optional: existing third-party adapters do not have to implement SIP events. */
|
|
835
|
-
listen;
|
|
836
675
|
};
|
|
837
676
|
|
|
838
677
|
//#endregion
|
|
@@ -869,6 +708,25 @@ let ProviderPlatform = /* @__PURE__ */ function(ProviderPlatform$1) {
|
|
|
869
708
|
return ProviderPlatform$1;
|
|
870
709
|
}({});
|
|
871
710
|
|
|
711
|
+
//#endregion
|
|
712
|
+
//#region src/addresses/index.ts
|
|
713
|
+
/**
|
|
714
|
+
* @deprecated Use `request()` instead
|
|
715
|
+
*/
|
|
716
|
+
const getAddress = async (options) => {
|
|
717
|
+
const provider = await getProviderOrThrow(options.getProvider);
|
|
718
|
+
const { purposes } = options.payload;
|
|
719
|
+
if (!purposes) throw new Error("Address purposes are required");
|
|
720
|
+
try {
|
|
721
|
+
const request$1 = createUnsecuredToken(options.payload);
|
|
722
|
+
const response = await provider.connect(request$1);
|
|
723
|
+
options.onFinish?.(response);
|
|
724
|
+
} catch (error) {
|
|
725
|
+
console.error("[Connect] Error during address request", error);
|
|
726
|
+
options.onCancel?.();
|
|
727
|
+
}
|
|
728
|
+
};
|
|
729
|
+
|
|
872
730
|
//#endregion
|
|
873
731
|
//#region src/adapters/unisat.ts
|
|
874
732
|
function convertSignInputsToInputType(signInputs) {
|
|
@@ -1025,6 +883,60 @@ var UnisatAdapter = class extends SatsConnectAdapter {
|
|
|
1025
883
|
};
|
|
1026
884
|
};
|
|
1027
885
|
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region src/request/rpcSpec.ts
|
|
888
|
+
const specIdSchema = v.union([
|
|
889
|
+
v.string(),
|
|
890
|
+
v.number(),
|
|
891
|
+
v.null()
|
|
892
|
+
]);
|
|
893
|
+
const specRequestSchema = v.object({
|
|
894
|
+
jsonrpc: v.literal("2.0"),
|
|
895
|
+
method: v.string(),
|
|
896
|
+
params: v.optional(v.union([
|
|
897
|
+
v.array(v.unknown()),
|
|
898
|
+
v.looseObject({}),
|
|
899
|
+
v.null()
|
|
900
|
+
])),
|
|
901
|
+
id: v.optional(specIdSchema)
|
|
902
|
+
});
|
|
903
|
+
const specSuccessResponseSchema = v.object({
|
|
904
|
+
jsonrpc: v.literal("2.0"),
|
|
905
|
+
result: v.unknown(),
|
|
906
|
+
id: specIdSchema
|
|
907
|
+
});
|
|
908
|
+
const warningSchema = v.variant("code", [v.object({
|
|
909
|
+
code: v.literal("DEPRECATION_NOTICE"),
|
|
910
|
+
message: v.string(),
|
|
911
|
+
sunsetDate: v.pipe(v.string(), v.isoDate())
|
|
912
|
+
})]);
|
|
913
|
+
/**
|
|
914
|
+
* Extends the standard JSON RPC 2.0 with an additional field as a means of
|
|
915
|
+
* providing clients with extra data, such as deprecation warnings, without
|
|
916
|
+
* altering the main payloads.
|
|
917
|
+
*
|
|
918
|
+
* A JSON-RPC response must either be a result (success) or an error (failure).
|
|
919
|
+
* To provide additional data, conventions must be layered atop these two types.
|
|
920
|
+
* Having an additional property is the least disruptive approach, and is
|
|
921
|
+
* acceptable when clients are known to be able to handle such a structure,
|
|
922
|
+
* which they can since they're all part of Sats Connect.
|
|
923
|
+
*/
|
|
924
|
+
const specSuccessWithExtensionsResponseSchema = v.object({
|
|
925
|
+
...specSuccessResponseSchema.entries,
|
|
926
|
+
extensions: v.optional(v.object({ warnings: v.array(warningSchema) }))
|
|
927
|
+
});
|
|
928
|
+
const specErrorObjectSchema = v.object({
|
|
929
|
+
code: v.number(),
|
|
930
|
+
message: v.string(),
|
|
931
|
+
data: v.optional(v.unknown())
|
|
932
|
+
});
|
|
933
|
+
const specErrorResponseSchema = v.object({
|
|
934
|
+
jsonrpc: v.literal("2.0"),
|
|
935
|
+
error: specErrorObjectSchema,
|
|
936
|
+
id: specIdSchema
|
|
937
|
+
});
|
|
938
|
+
const specResponseSchema = v.union([specSuccessWithExtensionsResponseSchema, specErrorResponseSchema]);
|
|
939
|
+
|
|
1028
940
|
//#endregion
|
|
1029
941
|
//#region src/request/sanitizeRequest.ts
|
|
1030
942
|
const sanitizeRequest = (method, params, providerInfo) => {
|
|
@@ -1085,6 +997,95 @@ const sanitizeAddressPurposeRequest = (method, params) => {
|
|
|
1085
997
|
};
|
|
1086
998
|
};
|
|
1087
999
|
|
|
1000
|
+
//#endregion
|
|
1001
|
+
//#region src/request/methods.ts
|
|
1002
|
+
const bitcoinMethods = {
|
|
1003
|
+
getAccounts: "getAccounts",
|
|
1004
|
+
getAddresses: "getAddresses",
|
|
1005
|
+
bitcoin_getAddressesV2: "bitcoin_getAddressesV2",
|
|
1006
|
+
getBalance: "getBalance",
|
|
1007
|
+
bitcoin_getBalanceV2: "bitcoin_getBalanceV2",
|
|
1008
|
+
getInfo: "getInfo",
|
|
1009
|
+
sendTransfer: "sendTransfer",
|
|
1010
|
+
bitcoin_sendTransferV2: "bitcoin_sendTransferV2",
|
|
1011
|
+
signMessage: "signMessage",
|
|
1012
|
+
bitcoin_signMessageV2: "bitcoin_signMessageV2",
|
|
1013
|
+
signMultipleMessages: "signMultipleMessages",
|
|
1014
|
+
bitcoin_signMultipleMessagesV2: "bitcoin_signMultipleMessagesV2",
|
|
1015
|
+
signPsbt: "signPsbt",
|
|
1016
|
+
bitcoin_signPsbtV2: "bitcoin_signPsbtV2"
|
|
1017
|
+
};
|
|
1018
|
+
const stacksMethods = {
|
|
1019
|
+
stx_callContract: "stx_callContract",
|
|
1020
|
+
stx_deployContract: "stx_deployContract",
|
|
1021
|
+
stx_getAccounts: "stx_getAccounts",
|
|
1022
|
+
stx_getAddresses: "stx_getAddresses",
|
|
1023
|
+
stx_signMessage: "stx_signMessage",
|
|
1024
|
+
stx_signStructuredMessage: "stx_signStructuredMessage",
|
|
1025
|
+
stx_signTransaction: "stx_signTransaction",
|
|
1026
|
+
stx_signTransactions: "stx_signTransactions",
|
|
1027
|
+
stx_transferStx: "stx_transferStx"
|
|
1028
|
+
};
|
|
1029
|
+
const sparkMethods = {
|
|
1030
|
+
spark_getAddresses: "spark_getAddresses",
|
|
1031
|
+
spark_getAddressesV2: "spark_getAddressesV2",
|
|
1032
|
+
spark_getBalance: "spark_getBalance",
|
|
1033
|
+
spark_transfer: "spark_transfer",
|
|
1034
|
+
spark_transferToken: "spark_transferToken",
|
|
1035
|
+
spark_signMessage: "spark_signMessage",
|
|
1036
|
+
spark_flashnet_getJwt: "spark_flashnet_getJwt",
|
|
1037
|
+
spark_flashnet_signIntent: "spark_flashnet_signIntent",
|
|
1038
|
+
spark_flashnet_signStructuredMessage: "spark_flashnet_signStructuredMessage",
|
|
1039
|
+
spark_flashnet_executeSwap: "spark_flashnet_executeSwap",
|
|
1040
|
+
spark_flashnet_executeRouteSwap: "spark_flashnet_executeRouteSwap",
|
|
1041
|
+
spark_flashnet_clawbackFunds: "spark_flashnet_clawbackFunds",
|
|
1042
|
+
spark_flashnet_getClawbackEligibleTransfers: "spark_flashnet_getClawbackEligibleTransfers"
|
|
1043
|
+
};
|
|
1044
|
+
const runesMethods = {
|
|
1045
|
+
runes_estimateEtch: "runes_estimateEtch",
|
|
1046
|
+
runes_estimateMint: "runes_estimateMint",
|
|
1047
|
+
runes_estimateRbfOrder: "runes_estimateRbfOrder",
|
|
1048
|
+
runes_etch: "runes_etch",
|
|
1049
|
+
runes_getBalance: "runes_getBalance",
|
|
1050
|
+
runes_getOrder: "runes_getOrder",
|
|
1051
|
+
runes_mint: "runes_mint",
|
|
1052
|
+
runes_rbfOrder: "runes_rbfOrder",
|
|
1053
|
+
runes_transfer: "runes_transfer"
|
|
1054
|
+
};
|
|
1055
|
+
const ordinalsMethods = {
|
|
1056
|
+
ord_getInscriptions: "ord_getInscriptions",
|
|
1057
|
+
ord_sendInscriptions: "ord_sendInscriptions"
|
|
1058
|
+
};
|
|
1059
|
+
const walletMethods = {
|
|
1060
|
+
wallet_addNetwork: "wallet_addNetwork",
|
|
1061
|
+
wallet_open: "wallet_open",
|
|
1062
|
+
wallet_addNetworkV2: "wallet_addNetworkV2",
|
|
1063
|
+
wallet_changeNetwork: "wallet_changeNetwork",
|
|
1064
|
+
wallet_connect: "wallet_connect",
|
|
1065
|
+
wallet_connectV2: "wallet_connectV2",
|
|
1066
|
+
wallet_disconnect: "wallet_disconnect",
|
|
1067
|
+
wallet_getAccount: "wallet_getAccount",
|
|
1068
|
+
wallet_getAccountV2: "wallet_getAccountV2",
|
|
1069
|
+
wallet_getCurrentPermissions: "wallet_getCurrentPermissions",
|
|
1070
|
+
wallet_getNetwork: "wallet_getNetwork",
|
|
1071
|
+
wallet_getNetworks: "wallet_getNetworks",
|
|
1072
|
+
wallet_getWalletType: "wallet_getWalletType",
|
|
1073
|
+
wallet_openBridge: "wallet_openBridge",
|
|
1074
|
+
wallet_openBuy: "wallet_openBuy",
|
|
1075
|
+
wallet_openReceive: "wallet_openReceive",
|
|
1076
|
+
wallet_renouncePermissions: "wallet_renouncePermissions",
|
|
1077
|
+
wallet_requestPermissions: "wallet_requestPermissions",
|
|
1078
|
+
wallet_switchNetwork: "wallet_switchNetwork"
|
|
1079
|
+
};
|
|
1080
|
+
const methods = {
|
|
1081
|
+
...bitcoinMethods,
|
|
1082
|
+
...stacksMethods,
|
|
1083
|
+
...sparkMethods,
|
|
1084
|
+
...runesMethods,
|
|
1085
|
+
...ordinalsMethods,
|
|
1086
|
+
...walletMethods
|
|
1087
|
+
};
|
|
1088
|
+
|
|
1088
1089
|
//#endregion
|
|
1089
1090
|
//#region src/request/rpc/compat.ts
|
|
1090
1091
|
function bitcoinModeToLegacyBitcoinNetworkType(mode) {
|
|
@@ -1108,6 +1109,10 @@ const defineMethodSupport = (supportDefinition) => {
|
|
|
1108
1109
|
return supportDefinition;
|
|
1109
1110
|
};
|
|
1110
1111
|
|
|
1112
|
+
//#endregion
|
|
1113
|
+
//#region src/request/shared.ts
|
|
1114
|
+
const rpcIdSchema = v.string();
|
|
1115
|
+
|
|
1111
1116
|
//#endregion
|
|
1112
1117
|
//#region src/request/createRequestSchema.ts
|
|
1113
1118
|
function createRequestSchema({ paramsSchema, method }) {
|
|
@@ -1130,12 +1135,20 @@ const bitcoinGetAccountsRequestSchema = createRequestSchema({
|
|
|
1130
1135
|
method: bitcoinMethods.getAccounts
|
|
1131
1136
|
});
|
|
1132
1137
|
|
|
1138
|
+
//#endregion
|
|
1139
|
+
//#region src/request/createSuccessResponseSchema.ts
|
|
1140
|
+
function createSuccessResponseSchema({ method, resultSchema }) {
|
|
1141
|
+
return v.object({
|
|
1142
|
+
...specSuccessWithExtensionsResponseSchema.entries,
|
|
1143
|
+
id: rpcIdSchema,
|
|
1144
|
+
result: resultSchema,
|
|
1145
|
+
"~sats-connect-method": v.literal(method)
|
|
1146
|
+
});
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1133
1149
|
//#endregion
|
|
1134
1150
|
//#region src/request/rpc/objects/namespaces/bitcoin/methods/getAccounts/response.ts
|
|
1135
|
-
const bitcoinGetAccountsResultSchema = v.array(
|
|
1136
|
-
...addressSchema.entries,
|
|
1137
|
-
...v.object({ walletType: walletTypeSchema }).entries
|
|
1138
|
-
}));
|
|
1151
|
+
const bitcoinGetAccountsResultSchema = v.array(addressSchema);
|
|
1139
1152
|
const bitcoinGetAccountsSuccessResponseSchema = createSuccessResponseSchema({
|
|
1140
1153
|
resultSchema: bitcoinGetAccountsResultSchema,
|
|
1141
1154
|
method: bitcoinMethods.getAccounts
|
|
@@ -2805,13 +2818,25 @@ const stacksGetAccountsRequestSchema = createRequestSchema({
|
|
|
2805
2818
|
|
|
2806
2819
|
//#endregion
|
|
2807
2820
|
//#region src/request/rpc/objects/namespaces/stacks/methods/getAccounts/response.ts
|
|
2821
|
+
const stacksLegacyAccountSchema = v.object({
|
|
2822
|
+
address: v.string(),
|
|
2823
|
+
publicKey: v.string(),
|
|
2824
|
+
gaiaHubUrl: v.string(),
|
|
2825
|
+
gaiaAppKey: v.string(),
|
|
2826
|
+
walletType: v.optional(v.picklist([
|
|
2827
|
+
"software",
|
|
2828
|
+
"ledger",
|
|
2829
|
+
"keystone"
|
|
2830
|
+
]))
|
|
2831
|
+
});
|
|
2832
|
+
const stacksMultisigAccountSchema = v.strictObject({
|
|
2833
|
+
address: v.string(),
|
|
2834
|
+
walletType: v.literal("multisig"),
|
|
2835
|
+
multisig: stacksMultisigSchema
|
|
2836
|
+
});
|
|
2837
|
+
const stacksAccountSchema = v.union([stacksLegacyAccountSchema, stacksMultisigAccountSchema]);
|
|
2808
2838
|
const stacksGetAccountsResultSchema = v.object({
|
|
2809
|
-
addresses: v.array(
|
|
2810
|
-
address: v.string(),
|
|
2811
|
-
publicKey: v.string(),
|
|
2812
|
-
gaiaHubUrl: v.string(),
|
|
2813
|
-
gaiaAppKey: v.string()
|
|
2814
|
-
})),
|
|
2839
|
+
addresses: v.array(stacksAccountSchema),
|
|
2815
2840
|
network: walletGetNetworkResultSchema
|
|
2816
2841
|
});
|
|
2817
2842
|
const stacksGetAccountsSuccessResponseSchema = createSuccessResponseSchema({
|
|
@@ -2838,17 +2863,13 @@ const stacksGetAddressesSuccessResponseSchema = createSuccessResponseSchema({
|
|
|
2838
2863
|
method: stacksMethods.stx_getAddresses
|
|
2839
2864
|
});
|
|
2840
2865
|
|
|
2841
|
-
//#endregion
|
|
2842
|
-
//#region src/request/rpc/objects/namespaces/stacks/methods/getNetworks/request.ts
|
|
2843
|
-
const stacksGetNetworksParamsSchema = v.nullish(v.null());
|
|
2844
|
-
const stacksGetNetworksRequestSchema = createRequestSchema({
|
|
2845
|
-
method: stacksMethods.stx_getNetworks,
|
|
2846
|
-
paramsSchema: stacksGetNetworksParamsSchema
|
|
2847
|
-
});
|
|
2848
|
-
|
|
2849
2866
|
//#endregion
|
|
2850
2867
|
//#region src/request/rpc/objects/namespaces/stacks/methods/signMessage/request.ts
|
|
2851
|
-
const
|
|
2868
|
+
const stacksSignMessageSigners = ["account", "member"];
|
|
2869
|
+
const stacksSignMessageParamsSchema = v.object({
|
|
2870
|
+
message: v.string(),
|
|
2871
|
+
signer: v.optional(v.picklist(stacksSignMessageSigners))
|
|
2872
|
+
});
|
|
2852
2873
|
const stacksSignMessageRequestSchema = createRequestSchema({
|
|
2853
2874
|
paramsSchema: stacksSignMessageParamsSchema,
|
|
2854
2875
|
method: stacksMethods.stx_signMessage
|
|
@@ -2908,6 +2929,24 @@ const stacksSignTransactionSuccessResponseSchema = createSuccessResponseSchema({
|
|
|
2908
2929
|
method: stacksMethods.stx_signTransaction
|
|
2909
2930
|
});
|
|
2910
2931
|
|
|
2932
|
+
//#endregion
|
|
2933
|
+
//#region src/request/rpc/objects/namespaces/stacks/methods/signTransactions/errorData.ts
|
|
2934
|
+
/**
|
|
2935
|
+
* The `data` of the error response when a wallet stops broadcasting a batch
|
|
2936
|
+
* partway through. Lists every transaction of the request, in request order.
|
|
2937
|
+
*/
|
|
2938
|
+
const stacksSignTransactionsBroadcastErrorDataSchema = v.object({ transactions: v.array(v.object({
|
|
2939
|
+
index: v.number(),
|
|
2940
|
+
transaction: v.string(),
|
|
2941
|
+
status: v.picklist([
|
|
2942
|
+
"broadcast",
|
|
2943
|
+
"failed",
|
|
2944
|
+
"not_broadcast"
|
|
2945
|
+
]),
|
|
2946
|
+
txid: v.optional(v.string()),
|
|
2947
|
+
error: v.optional(v.string())
|
|
2948
|
+
})) });
|
|
2949
|
+
|
|
2911
2950
|
//#endregion
|
|
2912
2951
|
//#region src/request/rpc/objects/namespaces/stacks/methods/signTransactions/request.ts
|
|
2913
2952
|
const stacksSignTransactionsParamsSchema = v.object({
|
|
@@ -2923,7 +2962,10 @@ const stacksSignTransactionsRequestSchema = createRequestSchema({
|
|
|
2923
2962
|
|
|
2924
2963
|
//#endregion
|
|
2925
2964
|
//#region src/request/rpc/objects/namespaces/stacks/methods/signTransactions/response.ts
|
|
2926
|
-
const stacksSignTransactionsResultSchema = v.object({
|
|
2965
|
+
const stacksSignTransactionsResultSchema = v.object({
|
|
2966
|
+
transactions: v.array(v.string()),
|
|
2967
|
+
txids: v.optional(v.array(v.string()))
|
|
2968
|
+
});
|
|
2927
2969
|
const stacksSignTransactionsSuccessResponseSchema = createSuccessResponseSchema({
|
|
2928
2970
|
resultSchema: stacksSignTransactionsResultSchema,
|
|
2929
2971
|
method: stacksMethods.stx_signTransactions
|
|
@@ -2963,7 +3005,6 @@ const stacksRequestSchema = v.variant("method", [
|
|
|
2963
3005
|
stacksDeployContractRequestSchema,
|
|
2964
3006
|
stacksGetAccountsRequestSchema,
|
|
2965
3007
|
stacksGetAddressesRequestSchema,
|
|
2966
|
-
stacksGetNetworksRequestSchema,
|
|
2967
3008
|
stacksSignMessageRequestSchema,
|
|
2968
3009
|
stacksSignStructuredMessageRequestSchema,
|
|
2969
3010
|
stacksSignTransactionRequestSchema,
|
|
@@ -2975,7 +3016,6 @@ const stacksSuccessResponseSchema = v.variant("~sats-connect-method", [
|
|
|
2975
3016
|
stacksDeployContractSuccessResponseSchema,
|
|
2976
3017
|
stacksGetAccountsSuccessResponseSchema,
|
|
2977
3018
|
stacksGetAddressesSuccessResponseSchema,
|
|
2978
|
-
stacksGetNetworksSuccessResponseSchema,
|
|
2979
3019
|
stacksSignMessageSuccessResponseSchema,
|
|
2980
3020
|
stacksSignStructuredMessageSuccessResponseSchema,
|
|
2981
3021
|
stacksSignTransactionSuccessResponseSchema,
|
|
@@ -3097,12 +3137,6 @@ const addListener = (...rawArgs) => {
|
|
|
3097
3137
|
}
|
|
3098
3138
|
return provider.addListener(listenerInfo);
|
|
3099
3139
|
};
|
|
3100
|
-
/** SIP-030 listener; legacy addListener remains unchanged. */
|
|
3101
|
-
const listen = (event, cb, providerId) => {
|
|
3102
|
-
const provider = providerId ? getProviderById(providerId) : window.XverseProviders?.BitcoinProvider || window.BitcoinProvider;
|
|
3103
|
-
if (!provider?.listen) throw new Error("The wallet provider does not support SIP-030 listeners.");
|
|
3104
|
-
return provider.listen(event, cb);
|
|
3105
|
-
};
|
|
3106
3140
|
|
|
3107
3141
|
//#endregion
|
|
3108
3142
|
//#region src/adapters/xverse.ts
|
|
@@ -3111,7 +3145,6 @@ var XverseAdapter = class extends SatsConnectAdapter {
|
|
|
3111
3145
|
requestInternal = async (method, params) => {
|
|
3112
3146
|
return request(method, params, this.id);
|
|
3113
3147
|
};
|
|
3114
|
-
listen = (event, cb) => listen(event, cb, this.id);
|
|
3115
3148
|
addListener = (listenerInfo) => {
|
|
3116
3149
|
return addListener(listenerInfo, this.id);
|
|
3117
3150
|
};
|
|
@@ -3336,4 +3369,4 @@ const signTransaction = async (options) => {
|
|
|
3336
3369
|
};
|
|
3337
3370
|
|
|
3338
3371
|
//#endregion
|
|
3339
|
-
export { AddressPurpose, AddressType, BaseAdapter, BitcoinNetworkType, DefaultAdaptersInfo, MessageSigningProtocols, ProviderPlatform, RpcErrorCode, SatsConnectAdapter, SparkNetworkType, StacksNetworkType, StarknetNetworkType, accountChangeEventName, accountChangeSchema, addListener, addressSchema, allResolvedNetworksSchema, bitcoinGetAccountsParamsSchema, bitcoinGetAccountsRequestSchema, bitcoinGetAccountsResultSchema, bitcoinGetAccountsSuccessResponseSchema, bitcoinGetAddressesParamsSchema, bitcoinGetAddressesRequestSchema, bitcoinGetAddressesResultSchema, bitcoinGetAddressesSuccessResponseSchema, bitcoinGetAddressesV2ParamsSchema, bitcoinGetAddressesV2RequestSchema, bitcoinGetAddressesV2ResultSchema, bitcoinGetAddressesV2SuccessResponseSchema, bitcoinGetBalanceParamsSchema, bitcoinGetBalanceRequestSchema, bitcoinGetBalanceResultSchema, bitcoinGetBalanceSuccessResponseSchema, bitcoinGetBalanceV2ParamsSchema, bitcoinGetBalanceV2RequestSchema, bitcoinGetBalanceV2ResultSchema, bitcoinGetBalanceV2SuccessResponseSchema, bitcoinGetInfoParamsSchema, bitcoinGetInfoRequestSchema, bitcoinGetInfoResultSchema, bitcoinGetInfoSuccessResponseSchema, bitcoinMethods, bitcoinModeToLegacyBitcoinNetworkType, bitcoinNetworkConfigurationOptionsSchema, bitcoinRequestSchema, bitcoinSendTransferParamsSchema, bitcoinSendTransferRequestSchema, bitcoinSendTransferResultSchema, bitcoinSendTransferSuccessResponseSchema, bitcoinSendTransferV2ParamsSchema, bitcoinSendTransferV2RequestSchema, bitcoinSendTransferV2ResultSchema, bitcoinSendTransferV2SuccessResponseSchema, bitcoinSignMessageParamsSchema, bitcoinSignMessageRequestSchema, bitcoinSignMessageResultSchema, bitcoinSignMessageSuccessResponseSchema, bitcoinSignMessageV2ParamsSchema, bitcoinSignMessageV2RequestSchema, bitcoinSignMessageV2ResultSchema, bitcoinSignMessageV2SuccessResponseSchema, bitcoinSignMultipleMessagesParamsSchema, bitcoinSignMultipleMessagesRequestSchema, bitcoinSignMultipleMessagesResultSchema, bitcoinSignMultipleMessagesSuccessResponseSchema, bitcoinSignMultipleMessagesV2ParamsSchema, bitcoinSignMultipleMessagesV2RequestSchema, bitcoinSignMultipleMessagesV2ResultSchema, bitcoinSignMultipleMessagesV2SuccessResponseSchema, bitcoinSignPsbtParamsSchema, bitcoinSignPsbtRequestSchema, bitcoinSignPsbtResultSchema, bitcoinSignPsbtSuccessResponseSchema, bitcoinSignPsbtV2ParamsSchema, bitcoinSignPsbtV2RequestSchema, bitcoinSignPsbtV2ResultSchema, bitcoinSignPsbtV2SuccessResponseSchema, bitcoinSuccessResponseSchema, createInscription, createRepeatInscriptions, createRpcRequest, createRpcSuccessResponse, defaultAdapters, defineMethodSupport, disconnectEventName, disconnectSchema, getAddress, getCapabilities, getDefaultProvider, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, isProviderInstalled, listen, methods, networkChangeEventName, networkChangeEventNameV2, networkChangeSchema, networkChangeV2Schema, networkConfigurationOptionsSchema, ordinalsGetInscriptionsParamsSchema, ordinalsGetInscriptionsRequestSchema, ordinalsGetInscriptionsResultSchema, ordinalsGetInscriptionsSuccessResponseSchema, ordinalsMethods, ordinalsRequestSchema, ordinalsSendInscriptionsParamsSchema, ordinalsSendInscriptionsRequestSchema, ordinalsSendInscriptionsResultSchema, ordinalsSendInscriptionsSuccessResponseSchema, ordinalsSuccessResponseSchema, permissionRequestParamsSchema, removeDefaultProvider, request, rpcIdSchema, rpcRequestSchema, rpcSuccessResponseSchema, runesEstimateEtchParamsSchema, runesEstimateEtchRequestSchema, runesEstimateEtchResultSchema, runesEstimateEtchSuccessResponseSchema, runesEstimateMintParamsSchema, runesEstimateMintRequestSchema, runesEstimateMintResultSchema, runesEstimateMintSuccessResponseSchema, runesEstimateRbfOrderParamsSchema, runesEstimateRbfOrderRequestSchema, runesEstimateRbfOrderResultSchema, runesEstimateRbfOrderSuccessResponseSchema, runesEtchParamsSchema, runesEtchRequestSchema, runesEtchResultSchema, runesEtchSuccessResponseSchema, runesGetBalanceParamsSchema, runesGetBalanceRequestSchema, runesGetBalanceResultSchema, runesGetBalanceSuccessResponseSchema, runesGetOrderParamsSchema, runesGetOrderRequestSchema, runesGetOrderResultSchema, runesGetOrderSuccessResponseSchema, runesMethods, runesMintParamsSchema, runesMintRequestSchema, runesMintResultSchema, runesMintSuccessResponseSchema, runesRbfOrderParamsSchema, runesRbfOrderRequestSchema, runesRbfOrderResultSchema, runesRbfOrderSuccessResponseSchema, runesRequestSchema, runesSuccessResponseSchema, runesTransferParamsSchema, runesTransferRequestSchema, runesTransferResultSchema, runesTransferSuccessResponseSchema, sendBtcTransaction, setDefaultProvider, signMessage, signMultipleTransactions, signTransaction, sparkFlashnetClawbackFundsParamsSchema, sparkFlashnetClawbackFundsRequestSchema, sparkFlashnetClawbackFundsResultSchema, sparkFlashnetClawbackFundsSuccessResponseSchema, sparkFlashnetExecuteRouteSwapParamsSchema, sparkFlashnetExecuteRouteSwapRequestSchema, sparkFlashnetExecuteRouteSwapResultSchema, sparkFlashnetExecuteRouteSwapSuccessResponseSchema, sparkFlashnetExecuteSwapParamsSchema, sparkFlashnetExecuteSwapRequestSchema, sparkFlashnetExecuteSwapResultSchema, sparkFlashnetExecuteSwapSuccessResponseSchema, sparkFlashnetGetJwtParamsSchema, sparkFlashnetGetJwtRequestSchema, sparkFlashnetGetJwtResultSchema, sparkFlashnetGetJwtSuccessResponseSchema, sparkFlashnetSignIntentParamsSchema, sparkFlashnetSignIntentRequestSchema, sparkFlashnetSignIntentResultSchema, sparkFlashnetSignIntentSuccessResponseSchema, sparkFlashnetSignStructuredMessageParamsSchema, sparkFlashnetSignStructuredMessageRequestSchema, sparkFlashnetSignStructuredMessageResultSchema, sparkFlashnetSignStructuredMessageSuccessResponseSchema, sparkGetAddressesParamsSchema, sparkGetAddressesRequestSchema, sparkGetAddressesResultSchema, sparkGetAddressesSuccessResponseSchema, sparkGetAddressesV2ParamsSchema, sparkGetAddressesV2RequestSchema, sparkGetAddressesV2ResultSchema, sparkGetAddressesV2SuccessResponseSchema, sparkGetBalanceParamsSchema, sparkGetBalanceRequestSchema, sparkGetBalanceResultSchema, sparkGetBalanceSuccessResponseSchema, sparkGetClawbackEligibleTransfersParamsSchema, sparkGetClawbackEligibleTransfersRequestSchema, sparkGetClawbackEligibleTransfersResultSchema, sparkGetClawbackEligibleTransfersSuccessResponseSchema, sparkMethods, sparkModeToLegacySparkNetworkType, sparkNetworkConfigurationOptionsSchema, sparkRequestSchema, sparkSignMessageParamsSchema, sparkSignMessageRequestSchema, sparkSignMessageResultSchema, sparkSignMessageSuccessResponseSchema, sparkSuccessResponseSchema, sparkTransferParamsSchema, sparkTransferRequestSchema, sparkTransferResultSchema, sparkTransferSuccessResponseSchema, sparkTransferTokenParamsSchema, sparkTransferTokenRequestSchema, sparkTransferTokenResultSchema, sparkTransferTokenSuccessResponseSchema, specErrorObjectSchema, specErrorResponseSchema, specIdSchema, specRequestSchema, specResponseSchema, specSuccessResponseSchema, specSuccessWithExtensionsResponseSchema, stacksAccountChangeResultSchema, stacksAccountChangeSchema, stacksCallContractParamsSchema, stacksCallContractRequestSchema, stacksCallContractResultSchema, stacksCallContractSuccessResponseSchema, stacksDeployContractParamsSchema, stacksDeployContractRequestSchema, stacksDeployContractResultSchema, stacksDeployContractSuccessResponseSchema, stacksGetAccountsParamsSchema, stacksGetAccountsRequestSchema, stacksGetAccountsResultSchema, stacksGetAccountsSuccessResponseSchema, stacksGetAddressesParamsSchema, stacksGetAddressesRequestSchema, stacksGetAddressesResultSchema, stacksGetAddressesSuccessResponseSchema, stacksGetNetworksParamsSchema, stacksGetNetworksRequestSchema, stacksGetNetworksResultSchema, stacksGetNetworksSuccessResponseSchema, stacksMethods, stacksModeToLegacyStacksNetworkType, stacksNetworkChangeSchema, stacksNetworkConfigurationOptionsSchema, stacksRequestSchema, stacksSignMessageParamsSchema, stacksSignMessageRequestSchema, stacksSignMessageResultSchema, stacksSignMessageSuccessResponseSchema, stacksSignStructuredMessageParamsSchema, stacksSignStructuredMessageRequestSchema, stacksSignStructuredMessageResultSchema, stacksSignStructuredMessageSuccessResponseSchema, stacksSignTransactionParamsSchema, stacksSignTransactionRequestSchema, stacksSignTransactionResultSchema, stacksSignTransactionSuccessResponseSchema, stacksSignTransactionsParamsSchema, stacksSignTransactionsRequestSchema, stacksSignTransactionsResultSchema, stacksSignTransactionsSuccessResponseSchema, stacksSuccessResponseSchema, stacksTransferStxParamsSchema, stacksTransferStxRequestSchema, stacksTransferStxResultSchema, stacksTransferStxSuccessResponseSchema, starknetNetworkConfigurationOptionsSchema, supportStates, walletAddNetworkParamsSchema, walletAddNetworkRequestSchema, walletAddNetworkResultSchema, walletAddNetworkSuccessResponseSchema, walletAddNetworkV2ParamsSchema, walletAddNetworkV2RequestSchema, walletAddNetworkV2ResultSchema, walletAddNetworkV2SuccessResponseSchema, walletChangeNetworkParamsSchema, walletChangeNetworkRequestSchema, walletChangeNetworkResultSchema, walletChangeNetworkSuccessResponseSchema, walletConnectParamsSchema, walletConnectRequestSchema, walletConnectResultSchema, walletConnectSuccessResponseSchema, walletConnectV2ParamsSchema, walletConnectV2RequestSchema, walletConnectV2ResultSchema, walletConnectV2SuccessResponseSchema, walletDisconnectParamsSchema, walletDisconnectRequestSchema, walletDisconnectResultSchema, walletDisconnectSuccessResponseSchema, walletEventSchema, walletGetAccountParamsSchema, walletGetAccountRequestSchema, walletGetAccountResultSchema, walletGetAccountSuccessResponseSchema, walletGetAccountV2ParamsSchema, walletGetAccountV2RequestSchema, walletGetAccountV2ResultSchema, walletGetAccountV2SuccessResponseSchema, walletGetCurrentPermissionsParamsSchema, walletGetCurrentPermissionsRequestSchema, walletGetCurrentPermissionsResultSchema, walletGetCurrentPermissionsSuccessResponseSchema, walletGetNetworkParamsSchema, walletGetNetworkRequestSchema, walletGetNetworkResultSchema, walletGetNetworkSuccessResponseSchema, walletGetNetworksParamsSchema, walletGetNetworksRequestSchema, walletGetNetworksResultSchema, walletGetNetworksSuccessResponseSchema, walletGetWalletTypeParamsSchema, walletGetWalletTypeRequestSchema, walletGetWalletTypeResultSchema, walletGetWalletTypeSuccessResponseSchema, walletMethods, walletOpenBridgeParamsSchema, walletOpenBridgeRequestSchema, walletOpenBridgeResultSchema, walletOpenBridgeSuccessResponseSchema, walletOpenBuyParamsSchema, walletOpenBuyRequestSchema, walletOpenBuyResultSchema, walletOpenBuySuccessResponseSchema, walletOpenParamsSchema, walletOpenReceiveParamsSchema, walletOpenReceiveRequestSchema, walletOpenReceiveResultSchema, walletOpenReceiveSuccessResponseSchema, walletOpenRequestSchema, walletOpenResultSchema, walletOpenSuccessResponseSchema, walletRenouncePermissionsParamsSchema, walletRenouncePermissionsRequestSchema, walletRenouncePermissionsResultSchema, walletRenouncePermissionsSuccessResponseSchema, walletRequestPermissionsParamsSchema, walletRequestPermissionsRequestSchema, walletRequestPermissionsResultSchema, walletRequestPermissionsSuccessResponseSchema, walletRequestSchema, walletSuccessResponseSchema, walletSwitchNetworkParamsSchema, walletSwitchNetworkRequestSchema, walletSwitchNetworkResultSchema, walletSwitchNetworkSuccessResponseSchema, walletTypeSchema, walletTypes };
|
|
3372
|
+
export { AddressPurpose, AddressType, BaseAdapter, BitcoinNetworkType, DefaultAdaptersInfo, MessageSigningProtocols, ProviderPlatform, RpcErrorCode, SatsConnectAdapter, SparkNetworkType, StacksNetworkType, StarknetNetworkType, accountChangeEventName, accountChangeSchema, addListener, addressObjectSchema, addressSchema, allResolvedNetworksSchema, bitcoinGetAccountsParamsSchema, bitcoinGetAccountsRequestSchema, bitcoinGetAccountsResultSchema, bitcoinGetAccountsSuccessResponseSchema, bitcoinGetAddressesParamsSchema, bitcoinGetAddressesRequestSchema, bitcoinGetAddressesResultSchema, bitcoinGetAddressesSuccessResponseSchema, bitcoinGetAddressesV2ParamsSchema, bitcoinGetAddressesV2RequestSchema, bitcoinGetAddressesV2ResultSchema, bitcoinGetAddressesV2SuccessResponseSchema, bitcoinGetBalanceParamsSchema, bitcoinGetBalanceRequestSchema, bitcoinGetBalanceResultSchema, bitcoinGetBalanceSuccessResponseSchema, bitcoinGetBalanceV2ParamsSchema, bitcoinGetBalanceV2RequestSchema, bitcoinGetBalanceV2ResultSchema, bitcoinGetBalanceV2SuccessResponseSchema, bitcoinGetInfoParamsSchema, bitcoinGetInfoRequestSchema, bitcoinGetInfoResultSchema, bitcoinGetInfoSuccessResponseSchema, bitcoinMethods, bitcoinModeToLegacyBitcoinNetworkType, bitcoinNetworkConfigurationOptionsSchema, bitcoinRequestSchema, bitcoinSendTransferParamsSchema, bitcoinSendTransferRequestSchema, bitcoinSendTransferResultSchema, bitcoinSendTransferSuccessResponseSchema, bitcoinSendTransferV2ParamsSchema, bitcoinSendTransferV2RequestSchema, bitcoinSendTransferV2ResultSchema, bitcoinSendTransferV2SuccessResponseSchema, bitcoinSignMessageParamsSchema, bitcoinSignMessageRequestSchema, bitcoinSignMessageResultSchema, bitcoinSignMessageSuccessResponseSchema, bitcoinSignMessageV2ParamsSchema, bitcoinSignMessageV2RequestSchema, bitcoinSignMessageV2ResultSchema, bitcoinSignMessageV2SuccessResponseSchema, bitcoinSignMultipleMessagesParamsSchema, bitcoinSignMultipleMessagesRequestSchema, bitcoinSignMultipleMessagesResultSchema, bitcoinSignMultipleMessagesSuccessResponseSchema, bitcoinSignMultipleMessagesV2ParamsSchema, bitcoinSignMultipleMessagesV2RequestSchema, bitcoinSignMultipleMessagesV2ResultSchema, bitcoinSignMultipleMessagesV2SuccessResponseSchema, bitcoinSignPsbtParamsSchema, bitcoinSignPsbtRequestSchema, bitcoinSignPsbtResultSchema, bitcoinSignPsbtSuccessResponseSchema, bitcoinSignPsbtV2ParamsSchema, bitcoinSignPsbtV2RequestSchema, bitcoinSignPsbtV2ResultSchema, bitcoinSignPsbtV2SuccessResponseSchema, bitcoinSuccessResponseSchema, createInscription, createRepeatInscriptions, createRpcRequest, createRpcSuccessResponse, defaultAdapters, defineMethodSupport, disconnectEventName, disconnectSchema, getAddress, getCapabilities, getDefaultProvider, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, isProviderInstalled, methods, networkChangeEventName, networkChangeEventNameV2, networkChangeSchema, networkChangeV2Schema, networkConfigurationOptionsSchema, ordinalsGetInscriptionsParamsSchema, ordinalsGetInscriptionsRequestSchema, ordinalsGetInscriptionsResultSchema, ordinalsGetInscriptionsSuccessResponseSchema, ordinalsMethods, ordinalsRequestSchema, ordinalsSendInscriptionsParamsSchema, ordinalsSendInscriptionsRequestSchema, ordinalsSendInscriptionsResultSchema, ordinalsSendInscriptionsSuccessResponseSchema, ordinalsSuccessResponseSchema, permissionRequestParamsSchema, removeDefaultProvider, request, rpcIdSchema, rpcRequestSchema, rpcSuccessResponseSchema, runesEstimateEtchParamsSchema, runesEstimateEtchRequestSchema, runesEstimateEtchResultSchema, runesEstimateEtchSuccessResponseSchema, runesEstimateMintParamsSchema, runesEstimateMintRequestSchema, runesEstimateMintResultSchema, runesEstimateMintSuccessResponseSchema, runesEstimateRbfOrderParamsSchema, runesEstimateRbfOrderRequestSchema, runesEstimateRbfOrderResultSchema, runesEstimateRbfOrderSuccessResponseSchema, runesEtchParamsSchema, runesEtchRequestSchema, runesEtchResultSchema, runesEtchSuccessResponseSchema, runesGetBalanceParamsSchema, runesGetBalanceRequestSchema, runesGetBalanceResultSchema, runesGetBalanceSuccessResponseSchema, runesGetOrderParamsSchema, runesGetOrderRequestSchema, runesGetOrderResultSchema, runesGetOrderSuccessResponseSchema, runesMethods, runesMintParamsSchema, runesMintRequestSchema, runesMintResultSchema, runesMintSuccessResponseSchema, runesRbfOrderParamsSchema, runesRbfOrderRequestSchema, runesRbfOrderResultSchema, runesRbfOrderSuccessResponseSchema, runesRequestSchema, runesSuccessResponseSchema, runesTransferParamsSchema, runesTransferRequestSchema, runesTransferResultSchema, runesTransferSuccessResponseSchema, sendBtcTransaction, setDefaultProvider, signMessage, signMultipleTransactions, signTransaction, sparkFlashnetClawbackFundsParamsSchema, sparkFlashnetClawbackFundsRequestSchema, sparkFlashnetClawbackFundsResultSchema, sparkFlashnetClawbackFundsSuccessResponseSchema, sparkFlashnetExecuteRouteSwapParamsSchema, sparkFlashnetExecuteRouteSwapRequestSchema, sparkFlashnetExecuteRouteSwapResultSchema, sparkFlashnetExecuteRouteSwapSuccessResponseSchema, sparkFlashnetExecuteSwapParamsSchema, sparkFlashnetExecuteSwapRequestSchema, sparkFlashnetExecuteSwapResultSchema, sparkFlashnetExecuteSwapSuccessResponseSchema, sparkFlashnetGetJwtParamsSchema, sparkFlashnetGetJwtRequestSchema, sparkFlashnetGetJwtResultSchema, sparkFlashnetGetJwtSuccessResponseSchema, sparkFlashnetSignIntentParamsSchema, sparkFlashnetSignIntentRequestSchema, sparkFlashnetSignIntentResultSchema, sparkFlashnetSignIntentSuccessResponseSchema, sparkFlashnetSignStructuredMessageParamsSchema, sparkFlashnetSignStructuredMessageRequestSchema, sparkFlashnetSignStructuredMessageResultSchema, sparkFlashnetSignStructuredMessageSuccessResponseSchema, sparkGetAddressesParamsSchema, sparkGetAddressesRequestSchema, sparkGetAddressesResultSchema, sparkGetAddressesSuccessResponseSchema, sparkGetAddressesV2ParamsSchema, sparkGetAddressesV2RequestSchema, sparkGetAddressesV2ResultSchema, sparkGetAddressesV2SuccessResponseSchema, sparkGetBalanceParamsSchema, sparkGetBalanceRequestSchema, sparkGetBalanceResultSchema, sparkGetBalanceSuccessResponseSchema, sparkGetClawbackEligibleTransfersParamsSchema, sparkGetClawbackEligibleTransfersRequestSchema, sparkGetClawbackEligibleTransfersResultSchema, sparkGetClawbackEligibleTransfersSuccessResponseSchema, sparkMethods, sparkModeToLegacySparkNetworkType, sparkNetworkConfigurationOptionsSchema, sparkRequestSchema, sparkSignMessageParamsSchema, sparkSignMessageRequestSchema, sparkSignMessageResultSchema, sparkSignMessageSuccessResponseSchema, sparkSuccessResponseSchema, sparkTransferParamsSchema, sparkTransferRequestSchema, sparkTransferResultSchema, sparkTransferSuccessResponseSchema, sparkTransferTokenParamsSchema, sparkTransferTokenRequestSchema, sparkTransferTokenResultSchema, sparkTransferTokenSuccessResponseSchema, specErrorObjectSchema, specErrorResponseSchema, specIdSchema, specRequestSchema, specResponseSchema, specSuccessResponseSchema, specSuccessWithExtensionsResponseSchema, stacksAccountSchema, stacksCallContractParamsSchema, stacksCallContractRequestSchema, stacksCallContractResultSchema, stacksCallContractSuccessResponseSchema, stacksDeployContractParamsSchema, stacksDeployContractRequestSchema, stacksDeployContractResultSchema, stacksDeployContractSuccessResponseSchema, stacksGetAccountsParamsSchema, stacksGetAccountsRequestSchema, stacksGetAccountsResultSchema, stacksGetAccountsSuccessResponseSchema, stacksGetAddressesParamsSchema, stacksGetAddressesRequestSchema, stacksGetAddressesResultSchema, stacksGetAddressesSuccessResponseSchema, stacksLegacyAccountSchema, stacksMethods, stacksModeToLegacyStacksNetworkType, stacksMultisigAccountSchema, stacksMultisigSchema, stacksNetworkConfigurationOptionsSchema, stacksRequestSchema, stacksSignMessageParamsSchema, stacksSignMessageRequestSchema, stacksSignMessageResultSchema, stacksSignMessageSigners, stacksSignMessageSuccessResponseSchema, stacksSignStructuredMessageParamsSchema, stacksSignStructuredMessageRequestSchema, stacksSignStructuredMessageResultSchema, stacksSignStructuredMessageSuccessResponseSchema, stacksSignTransactionParamsSchema, stacksSignTransactionRequestSchema, stacksSignTransactionResultSchema, stacksSignTransactionSuccessResponseSchema, stacksSignTransactionsBroadcastErrorDataSchema, stacksSignTransactionsParamsSchema, stacksSignTransactionsRequestSchema, stacksSignTransactionsResultSchema, stacksSignTransactionsSuccessResponseSchema, stacksSuccessResponseSchema, stacksTransferStxParamsSchema, stacksTransferStxRequestSchema, stacksTransferStxResultSchema, stacksTransferStxSuccessResponseSchema, starknetNetworkConfigurationOptionsSchema, supportStates, unlockDefinitionSchema, walletAddNetworkParamsSchema, walletAddNetworkRequestSchema, walletAddNetworkResultSchema, walletAddNetworkSuccessResponseSchema, walletAddNetworkV2ParamsSchema, walletAddNetworkV2RequestSchema, walletAddNetworkV2ResultSchema, walletAddNetworkV2SuccessResponseSchema, walletChangeNetworkParamsSchema, walletChangeNetworkRequestSchema, walletChangeNetworkResultSchema, walletChangeNetworkSuccessResponseSchema, walletConnectParamsSchema, walletConnectRequestSchema, walletConnectResultSchema, walletConnectSuccessResponseSchema, walletConnectV2ParamsSchema, walletConnectV2RequestSchema, walletConnectV2ResultSchema, walletConnectV2SuccessResponseSchema, walletDisconnectParamsSchema, walletDisconnectRequestSchema, walletDisconnectResultSchema, walletDisconnectSuccessResponseSchema, walletEventSchema, walletGetAccountParamsSchema, walletGetAccountRequestSchema, walletGetAccountResultSchema, walletGetAccountSuccessResponseSchema, walletGetAccountV2ParamsSchema, walletGetAccountV2RequestSchema, walletGetAccountV2ResultSchema, walletGetAccountV2SuccessResponseSchema, walletGetCurrentPermissionsParamsSchema, walletGetCurrentPermissionsRequestSchema, walletGetCurrentPermissionsResultSchema, walletGetCurrentPermissionsSuccessResponseSchema, walletGetNetworkParamsSchema, walletGetNetworkRequestSchema, walletGetNetworkResultSchema, walletGetNetworkSuccessResponseSchema, walletGetNetworksParamsSchema, walletGetNetworksRequestSchema, walletGetNetworksResultSchema, walletGetNetworksSuccessResponseSchema, walletGetWalletTypeParamsSchema, walletGetWalletTypeRequestSchema, walletGetWalletTypeResultSchema, walletGetWalletTypeSuccessResponseSchema, walletMethods, walletOpenBridgeParamsSchema, walletOpenBridgeRequestSchema, walletOpenBridgeResultSchema, walletOpenBridgeSuccessResponseSchema, walletOpenBuyParamsSchema, walletOpenBuyRequestSchema, walletOpenBuyResultSchema, walletOpenBuySuccessResponseSchema, walletOpenParamsSchema, walletOpenReceiveParamsSchema, walletOpenReceiveRequestSchema, walletOpenReceiveResultSchema, walletOpenReceiveSuccessResponseSchema, walletOpenRequestSchema, walletOpenResultSchema, walletOpenSuccessResponseSchema, walletRenouncePermissionsParamsSchema, walletRenouncePermissionsRequestSchema, walletRenouncePermissionsResultSchema, walletRenouncePermissionsSuccessResponseSchema, walletRequestPermissionsParamsSchema, walletRequestPermissionsRequestSchema, walletRequestPermissionsResultSchema, walletRequestPermissionsSuccessResponseSchema, walletRequestSchema, walletSuccessResponseSchema, walletSwitchNetworkParamsSchema, walletSwitchNetworkRequestSchema, walletSwitchNetworkResultSchema, walletSwitchNetworkSuccessResponseSchema, walletTypeSchema, walletTypes };
|