@sats-connect/core 0.1.0 → 0.1.1-18f772e
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 +18 -1
- package/dist/index.mjs +16 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -35,6 +35,7 @@ declare const createRepeatInscriptions: (options: CreateRepeatInscriptionsOption
|
|
|
35
35
|
interface SignMessagePayload extends RequestPayload {
|
|
36
36
|
address: string;
|
|
37
37
|
message: string;
|
|
38
|
+
protocol?: MessageSigningProtocols;
|
|
38
39
|
}
|
|
39
40
|
type SignMessageResponse = string;
|
|
40
41
|
type SignMessageOptions = RequestOptions<SignMessagePayload, SignMessageResponse>;
|
|
@@ -365,6 +366,10 @@ declare const getAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
|
365
366
|
type GetAddressesRequestMessage = v.InferOutput<typeof getAddressesRequestMessageSchema>;
|
|
366
367
|
type GetAddresses = MethodParamsAndResult<v.InferOutput<typeof getAddressesParamsSchema>, v.InferOutput<typeof getAddressesResultSchema>>;
|
|
367
368
|
declare const signMessageMethodName = "signMessage";
|
|
369
|
+
declare enum MessageSigningProtocols {
|
|
370
|
+
ECDSA = "ECDSA",
|
|
371
|
+
BIP322 = "BIP322"
|
|
372
|
+
}
|
|
368
373
|
declare const signMessageParamsSchema: v.ObjectSchema<{
|
|
369
374
|
/**
|
|
370
375
|
* The address used for signing.
|
|
@@ -374,6 +379,10 @@ declare const signMessageParamsSchema: v.ObjectSchema<{
|
|
|
374
379
|
* The message to sign.
|
|
375
380
|
**/
|
|
376
381
|
readonly message: v.StringSchema<undefined>;
|
|
382
|
+
/**
|
|
383
|
+
* The protocol to use for signing the message.
|
|
384
|
+
*/
|
|
385
|
+
readonly protocol: v.OptionalSchema<v.EnumSchema<typeof MessageSigningProtocols, undefined>, never>;
|
|
377
386
|
}, undefined>;
|
|
378
387
|
type SignMessageParams = v.InferOutput<typeof signMessageParamsSchema>;
|
|
379
388
|
declare const signMessageResultSchema: v.ObjectSchema<{
|
|
@@ -389,6 +398,10 @@ declare const signMessageResultSchema: v.ObjectSchema<{
|
|
|
389
398
|
* The address used for signing.
|
|
390
399
|
*/
|
|
391
400
|
readonly address: v.StringSchema<undefined>;
|
|
401
|
+
/**
|
|
402
|
+
* The protocol to use for signing the message.
|
|
403
|
+
*/
|
|
404
|
+
readonly protocol: v.EnumSchema<typeof MessageSigningProtocols, undefined>;
|
|
392
405
|
}, undefined>;
|
|
393
406
|
type SignMessageResult = v.InferOutput<typeof signMessageResultSchema>;
|
|
394
407
|
declare const signMessageRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -402,6 +415,10 @@ declare const signMessageRequestMessageSchema: v.ObjectSchema<{
|
|
|
402
415
|
* The message to sign.
|
|
403
416
|
**/
|
|
404
417
|
readonly message: v.StringSchema<undefined>;
|
|
418
|
+
/**
|
|
419
|
+
* The protocol to use for signing the message.
|
|
420
|
+
*/
|
|
421
|
+
readonly protocol: v.OptionalSchema<v.EnumSchema<typeof MessageSigningProtocols, undefined>, never>;
|
|
405
422
|
}, undefined>;
|
|
406
423
|
readonly id: v.StringSchema<undefined>;
|
|
407
424
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
@@ -1057,4 +1074,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
|
|
|
1057
1074
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
|
1058
1075
|
declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
|
|
1059
1076
|
|
|
1060
|
-
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 GetWalletType, 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 SignTransactionPayload, type SignTransactionResponse, 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 StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type SupportedWallet, type TransferStxParams, type TransferStxResult, type WalletRequests, type WalletType, 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, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, 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, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, walletTypeSchema, walletTypes };
|
|
1077
|
+
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 GetWalletType, 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 SignTransactionPayload, type SignTransactionResponse, 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 StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type SupportedWallet, type TransferStxParams, type TransferStxResult, type WalletRequests, type WalletType, 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, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, 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, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, walletTypeSchema, walletTypes };
|
package/dist/index.mjs
CHANGED
|
@@ -718,6 +718,11 @@ var getAddressesRequestMessageSchema = v5.object({
|
|
|
718
718
|
}).entries
|
|
719
719
|
});
|
|
720
720
|
var signMessageMethodName = "signMessage";
|
|
721
|
+
var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
722
|
+
MessageSigningProtocols2["ECDSA"] = "ECDSA";
|
|
723
|
+
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
724
|
+
return MessageSigningProtocols2;
|
|
725
|
+
})(MessageSigningProtocols || {});
|
|
721
726
|
var signMessageParamsSchema = v5.object({
|
|
722
727
|
/**
|
|
723
728
|
* The address used for signing.
|
|
@@ -726,7 +731,11 @@ var signMessageParamsSchema = v5.object({
|
|
|
726
731
|
/**
|
|
727
732
|
* The message to sign.
|
|
728
733
|
**/
|
|
729
|
-
message: v5.string()
|
|
734
|
+
message: v5.string(),
|
|
735
|
+
/**
|
|
736
|
+
* The protocol to use for signing the message.
|
|
737
|
+
*/
|
|
738
|
+
protocol: v5.optional(v5.enum(MessageSigningProtocols))
|
|
730
739
|
});
|
|
731
740
|
var signMessageResultSchema = v5.object({
|
|
732
741
|
/**
|
|
@@ -740,7 +749,11 @@ var signMessageResultSchema = v5.object({
|
|
|
740
749
|
/**
|
|
741
750
|
* The address used for signing.
|
|
742
751
|
*/
|
|
743
|
-
address: v5.string()
|
|
752
|
+
address: v5.string(),
|
|
753
|
+
/**
|
|
754
|
+
* The protocol to use for signing the message.
|
|
755
|
+
*/
|
|
756
|
+
protocol: v5.enum(MessageSigningProtocols)
|
|
744
757
|
});
|
|
745
758
|
var signMessageRequestMessageSchema = v5.object({
|
|
746
759
|
...rpcRequestMessageSchema.entries,
|
|
@@ -1351,6 +1364,7 @@ export {
|
|
|
1351
1364
|
BaseAdapter,
|
|
1352
1365
|
BitcoinNetworkType,
|
|
1353
1366
|
DefaultAdaptersInfo,
|
|
1367
|
+
MessageSigningProtocols,
|
|
1354
1368
|
RpcErrorCode,
|
|
1355
1369
|
RpcIdSchema,
|
|
1356
1370
|
SatsConnectAdapter,
|