@sats-connect/core 0.0.15-87cf6c7 → 0.0.15-be0d447
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 +17 -1
- package/dist/index.mjs +23 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -363,6 +363,10 @@ declare const getAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
|
363
363
|
type GetAddressesRequestMessage = v.InferOutput<typeof getAddressesRequestMessageSchema>;
|
|
364
364
|
type GetAddresses = MethodParamsAndResult<v.InferOutput<typeof getAddressesParamsSchema>, v.InferOutput<typeof getAddressesResultSchema>>;
|
|
365
365
|
declare const signMessageMethodName = "signMessage";
|
|
366
|
+
declare enum MessageSigningProtocols {
|
|
367
|
+
ECDSA = "ECDSA",
|
|
368
|
+
BIP322 = "BIP322"
|
|
369
|
+
}
|
|
366
370
|
declare const signMessageParamsSchema: v.ObjectSchema<{
|
|
367
371
|
/**
|
|
368
372
|
* The address used for signing.
|
|
@@ -372,6 +376,10 @@ declare const signMessageParamsSchema: v.ObjectSchema<{
|
|
|
372
376
|
* The message to sign.
|
|
373
377
|
**/
|
|
374
378
|
readonly message: v.StringSchema<undefined>;
|
|
379
|
+
/**
|
|
380
|
+
* The protocol to use for signing the message.
|
|
381
|
+
*/
|
|
382
|
+
readonly protocol: v.OptionalSchema<v.EnumSchema<typeof MessageSigningProtocols, undefined>, never>;
|
|
375
383
|
}, undefined>;
|
|
376
384
|
type SignMessageParams = v.InferOutput<typeof signMessageParamsSchema>;
|
|
377
385
|
declare const signMessageResultSchema: v.ObjectSchema<{
|
|
@@ -387,6 +395,10 @@ declare const signMessageResultSchema: v.ObjectSchema<{
|
|
|
387
395
|
* The address used for signing.
|
|
388
396
|
*/
|
|
389
397
|
readonly address: v.StringSchema<undefined>;
|
|
398
|
+
/**
|
|
399
|
+
* The protocol to use for signing the message.
|
|
400
|
+
*/
|
|
401
|
+
readonly protocol: v.EnumSchema<typeof MessageSigningProtocols, undefined>;
|
|
390
402
|
}, undefined>;
|
|
391
403
|
type SignMessageResult = v.InferOutput<typeof signMessageResultSchema>;
|
|
392
404
|
declare const signMessageRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -400,6 +412,10 @@ declare const signMessageRequestMessageSchema: v.ObjectSchema<{
|
|
|
400
412
|
* The message to sign.
|
|
401
413
|
**/
|
|
402
414
|
readonly message: v.StringSchema<undefined>;
|
|
415
|
+
/**
|
|
416
|
+
* The protocol to use for signing the message.
|
|
417
|
+
*/
|
|
418
|
+
readonly protocol: v.OptionalSchema<v.EnumSchema<typeof MessageSigningProtocols, undefined>, never>;
|
|
403
419
|
}, undefined>;
|
|
404
420
|
readonly id: v.StringSchema<undefined>;
|
|
405
421
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
@@ -994,4 +1010,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
|
|
|
994
1010
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
|
995
1011
|
declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
|
|
996
1012
|
|
|
997
|
-
export { type Address$1 as Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type CallContractParams, type CallContractResult, type Capability, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type DeployContractParams, type DeployContractResult, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, type GetAccounts, type GetAccountsParams, type GetAccountsRequestMessage, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesRequestMessage, type GetAddressesResult, type GetBalance, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetOrder, type GetRunesBalance, type GetRunesBalanceParams, type GetRunesBalanceRequestMessage, type GetRunesBalanceResult, type InputToSign, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, type Provider, type PsbtPayload, type RbfOrder, type Recipient$2 as Recipient, type RenouncePermissions, type RequestOptions, type RequestPayload, type RequestPermissions, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendTransfer, type SendTransferParams, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessageParams, type SignMessagePayload, type SignMessageRequestMessage, type SignMessageResponse, type SignMessageResult, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtResult, type SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionParams, type SignTransactionPayload, type SignTransactionResponse, type SignTransactionResult, type StxCallContract, type StxDeployContract, type StxGetAccounts, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxTransferStx, type SupportedWallet, type TransferStxParams, type TransferStxResult, type WalletMethods, addressSchema, createInscription, createRepeatInscriptions, defaultAdapters, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsResultSchema, getInscriptionsSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, isProviderInstalled, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signTransaction, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema };
|
|
1013
|
+
export { type Address$1 as Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type CallContractParams, type CallContractResult, type Capability, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type DeployContractParams, type DeployContractResult, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, type GetAccounts, type GetAccountsParams, type GetAccountsRequestMessage, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesRequestMessage, type GetAddressesResult, type GetBalance, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetOrder, type GetRunesBalance, type GetRunesBalanceParams, type GetRunesBalanceRequestMessage, type GetRunesBalanceResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, type Provider, type PsbtPayload, type RbfOrder, type Recipient$2 as Recipient, type RenouncePermissions, type RequestOptions, type RequestPayload, type RequestPermissions, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendTransfer, type SendTransferParams, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessageParams, type SignMessagePayload, type SignMessageRequestMessage, type SignMessageResponse, type SignMessageResult, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtResult, type SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionParams, type SignTransactionPayload, type SignTransactionResponse, type SignTransactionResult, type StxCallContract, type StxDeployContract, type StxGetAccounts, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxTransferStx, type SupportedWallet, type TransferStxParams, type TransferStxResult, type WalletMethods, addressSchema, createInscription, createRepeatInscriptions, defaultAdapters, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsResultSchema, getInscriptionsSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, isProviderInstalled, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signTransaction, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema };
|
package/dist/index.mjs
CHANGED
|
@@ -211,7 +211,7 @@ var SatsConnectAdapter = class {
|
|
|
211
211
|
if (response.status === "success") {
|
|
212
212
|
return response;
|
|
213
213
|
}
|
|
214
|
-
if (response.status === "error" && response.error.code !== -
|
|
214
|
+
if (response.status === "error" && response.error.code !== -32601 /* METHOD_NOT_FOUND */) {
|
|
215
215
|
return response;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -292,7 +292,12 @@ var SatsConnectAdapter = class {
|
|
|
292
292
|
if (isEtchSupported) {
|
|
293
293
|
const response = await this.requestInternal("runes_etch", params);
|
|
294
294
|
if (response) {
|
|
295
|
-
|
|
295
|
+
if (response.status === "success") {
|
|
296
|
+
return response;
|
|
297
|
+
}
|
|
298
|
+
if (response.status === "error" && response.error.code !== -32601 /* METHOD_NOT_FOUND */) {
|
|
299
|
+
return response;
|
|
300
|
+
}
|
|
296
301
|
}
|
|
297
302
|
}
|
|
298
303
|
}
|
|
@@ -676,6 +681,11 @@ var getAddressesRequestMessageSchema = v4.object({
|
|
|
676
681
|
}).entries
|
|
677
682
|
});
|
|
678
683
|
var signMessageMethodName = "signMessage";
|
|
684
|
+
var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
685
|
+
MessageSigningProtocols2["ECDSA"] = "ECDSA";
|
|
686
|
+
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
687
|
+
return MessageSigningProtocols2;
|
|
688
|
+
})(MessageSigningProtocols || {});
|
|
679
689
|
var signMessageParamsSchema = v4.object({
|
|
680
690
|
/**
|
|
681
691
|
* The address used for signing.
|
|
@@ -684,7 +694,11 @@ var signMessageParamsSchema = v4.object({
|
|
|
684
694
|
/**
|
|
685
695
|
* The message to sign.
|
|
686
696
|
**/
|
|
687
|
-
message: v4.string()
|
|
697
|
+
message: v4.string(),
|
|
698
|
+
/**
|
|
699
|
+
* The protocol to use for signing the message.
|
|
700
|
+
*/
|
|
701
|
+
protocol: v4.optional(v4.enum(MessageSigningProtocols))
|
|
688
702
|
});
|
|
689
703
|
var signMessageResultSchema = v4.object({
|
|
690
704
|
/**
|
|
@@ -698,7 +712,11 @@ var signMessageResultSchema = v4.object({
|
|
|
698
712
|
/**
|
|
699
713
|
* The address used for signing.
|
|
700
714
|
*/
|
|
701
|
-
address: v4.string()
|
|
715
|
+
address: v4.string(),
|
|
716
|
+
/**
|
|
717
|
+
* The protocol to use for signing the message.
|
|
718
|
+
*/
|
|
719
|
+
protocol: v4.enum(MessageSigningProtocols)
|
|
702
720
|
});
|
|
703
721
|
var signMessageRequestMessageSchema = v4.object({
|
|
704
722
|
...rpcRequestMessageSchema.entries,
|
|
@@ -1282,6 +1300,7 @@ export {
|
|
|
1282
1300
|
BaseAdapter,
|
|
1283
1301
|
BitcoinNetworkType,
|
|
1284
1302
|
DefaultAdaptersInfo,
|
|
1303
|
+
MessageSigningProtocols,
|
|
1285
1304
|
RpcErrorCode,
|
|
1286
1305
|
RpcIdSchema,
|
|
1287
1306
|
SatsConnectAdapter,
|