@sats-connect/core 0.5.3-93a39cc → 0.5.3-a7c5453
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 +29 -49
- package/dist/index.d.ts +29 -49
- package/dist/index.js +114 -127
- package/dist/index.mjs +114 -126
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -102,12 +102,6 @@ type AccountChangeEvent = v.InferOutput<typeof accountChangeSchema>;
|
|
|
102
102
|
declare const networkChangeEventName = "networkChange";
|
|
103
103
|
declare const networkChangeSchema: v.ObjectSchema<{
|
|
104
104
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
105
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
106
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
107
|
-
}, undefined>;
|
|
108
|
-
readonly stacks: v.ObjectSchema<{
|
|
109
|
-
readonly name: v.StringSchema<undefined>;
|
|
110
|
-
}, undefined>;
|
|
111
105
|
}, undefined>;
|
|
112
106
|
type NetworkChangeEvent = v.InferOutput<typeof networkChangeSchema>;
|
|
113
107
|
declare const disconnectEventName = "disconnect";
|
|
@@ -119,12 +113,6 @@ declare const walletEventSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
|
119
113
|
readonly type: v.LiteralSchema<"accountChange", undefined>;
|
|
120
114
|
}, undefined>, v.ObjectSchema<{
|
|
121
115
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
122
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
123
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
124
|
-
}, undefined>;
|
|
125
|
-
readonly stacks: v.ObjectSchema<{
|
|
126
|
-
readonly name: v.StringSchema<undefined>;
|
|
127
|
-
}, undefined>;
|
|
128
116
|
}, undefined>, v.ObjectSchema<{
|
|
129
117
|
readonly type: v.LiteralSchema<"disconnect", undefined>;
|
|
130
118
|
}, undefined>], undefined>;
|
|
@@ -326,6 +314,7 @@ declare const addressSchema: v.ObjectSchema<{
|
|
|
326
314
|
readonly publicKey: v.StringSchema<undefined>;
|
|
327
315
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
328
316
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
317
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
329
318
|
}, undefined>;
|
|
330
319
|
type Address = v.InferOutput<typeof addressSchema>;
|
|
331
320
|
interface GetAddressResponse {
|
|
@@ -384,10 +373,9 @@ declare const getAddressesResultSchema: v.ObjectSchema<{
|
|
|
384
373
|
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
385
374
|
readonly address: v.StringSchema<undefined>;
|
|
386
375
|
readonly publicKey: v.StringSchema<undefined>;
|
|
387
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
388
|
-
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
389
|
-
*/
|
|
376
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
390
377
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
378
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
391
379
|
}, undefined>, undefined>;
|
|
392
380
|
}, undefined>;
|
|
393
381
|
type GetAddressesResult = v.InferOutput<typeof getAddressesResultSchema>;
|
|
@@ -570,13 +558,11 @@ declare const getAccountsParamsSchema: v.ObjectSchema<{
|
|
|
570
558
|
}, undefined>;
|
|
571
559
|
type GetAccountsParams = v.InferOutput<typeof getAccountsParamsSchema>;
|
|
572
560
|
declare const getAccountsResultSchema: v.ArraySchema<v.ObjectSchema<{
|
|
573
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
574
561
|
readonly address: v.StringSchema<undefined>;
|
|
575
562
|
readonly publicKey: v.StringSchema<undefined>;
|
|
576
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
577
|
-
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
578
|
-
*/
|
|
563
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
579
564
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
565
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
580
566
|
}, undefined>, undefined>;
|
|
581
567
|
type GetAccountsResult = v.InferOutput<typeof getAccountsResultSchema>;
|
|
582
568
|
declare const getAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1115,6 +1101,7 @@ declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
|
1115
1101
|
readonly publicKey: v.StringSchema<undefined>;
|
|
1116
1102
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1117
1103
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1104
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1118
1105
|
}, undefined>, undefined>;
|
|
1119
1106
|
}, undefined>;
|
|
1120
1107
|
type StxGetAddressesResult = v.InferOutput<typeof stxGetAddressesResultSchema>;
|
|
@@ -1614,6 +1601,7 @@ declare const getAccountResultSchema: v.ObjectSchema<{
|
|
|
1614
1601
|
readonly publicKey: v.StringSchema<undefined>;
|
|
1615
1602
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1616
1603
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1604
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1617
1605
|
}, undefined>, undefined>;
|
|
1618
1606
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1619
1607
|
}, undefined>;
|
|
@@ -1626,26 +1614,6 @@ declare const getAccountRequestMessageSchema: v.ObjectSchema<{
|
|
|
1626
1614
|
}, undefined>;
|
|
1627
1615
|
type GetAccountRequestMessage = v.InferOutput<typeof getAccountRequestMessageSchema>;
|
|
1628
1616
|
type GetAccount = MethodParamsAndResult<GetAccountParams, GetAccountResult>;
|
|
1629
|
-
declare const getNetworkMethodName = "wallet_getNetwork";
|
|
1630
|
-
declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1631
|
-
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1632
|
-
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1633
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1634
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
1635
|
-
}, undefined>;
|
|
1636
|
-
readonly stacks: v.ObjectSchema<{
|
|
1637
|
-
readonly name: v.StringSchema<undefined>;
|
|
1638
|
-
}, undefined>;
|
|
1639
|
-
}, undefined>;
|
|
1640
|
-
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
1641
|
-
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1642
|
-
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
1643
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1644
|
-
readonly id: v.StringSchema<undefined>;
|
|
1645
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1646
|
-
}, undefined>;
|
|
1647
|
-
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
1648
|
-
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
1649
1617
|
declare const connectMethodName = "wallet_connect";
|
|
1650
1618
|
declare const connectParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1651
1619
|
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
@@ -1672,16 +1640,9 @@ declare const connectResultSchema: v.ObjectSchema<{
|
|
|
1672
1640
|
readonly publicKey: v.StringSchema<undefined>;
|
|
1673
1641
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1674
1642
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1643
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1675
1644
|
}, undefined>, undefined>;
|
|
1676
1645
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1677
|
-
readonly network: v.ObjectSchema<{
|
|
1678
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1679
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
1680
|
-
}, undefined>;
|
|
1681
|
-
readonly stacks: v.ObjectSchema<{
|
|
1682
|
-
readonly name: v.StringSchema<undefined>;
|
|
1683
|
-
}, undefined>;
|
|
1684
|
-
}, undefined>;
|
|
1685
1646
|
}, undefined>;
|
|
1686
1647
|
type ConnectResult = v.InferOutput<typeof connectResultSchema>;
|
|
1687
1648
|
declare const connectRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1708,11 +1669,30 @@ declare const connectRequestMessageSchema: v.ObjectSchema<{
|
|
|
1708
1669
|
}, undefined>;
|
|
1709
1670
|
type ConnectRequestMessage = v.InferOutput<typeof connectRequestMessageSchema>;
|
|
1710
1671
|
type Connect = MethodParamsAndResult<ConnectParams, ConnectResult>;
|
|
1672
|
+
declare const getNetworkMethodName = "wallet_getNetwork";
|
|
1673
|
+
declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1674
|
+
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1675
|
+
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1676
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1677
|
+
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
1678
|
+
}, undefined>;
|
|
1679
|
+
readonly stacks: v.ObjectSchema<{
|
|
1680
|
+
readonly name: v.StringSchema<undefined>;
|
|
1681
|
+
}, undefined>;
|
|
1682
|
+
}, undefined>;
|
|
1683
|
+
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
1684
|
+
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1685
|
+
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
1686
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1687
|
+
readonly id: v.StringSchema<undefined>;
|
|
1688
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1689
|
+
}, undefined>;
|
|
1690
|
+
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
1691
|
+
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
1711
1692
|
|
|
1712
1693
|
declare const walletTypes: readonly ["software", "ledger", "keystone"];
|
|
1713
1694
|
declare const walletTypeSchema: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1714
1695
|
type WalletType = v.InferOutput<typeof walletTypeSchema>;
|
|
1715
|
-
declare const networkType: readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"];
|
|
1716
1696
|
|
|
1717
1697
|
interface StxRequests {
|
|
1718
1698
|
stx_callContract: StxCallContract;
|
|
@@ -1794,4 +1774,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
|
|
|
1794
1774
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
|
1795
1775
|
declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
|
|
1796
1776
|
|
|
1797
|
-
export { type AccountChangeEvent, type AddListener, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type Connect, type ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type GetAccount, type GetAccountParams, type GetAccountRequestMessage, type GetAccountResult, 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 GetBalanceParams, type GetBalanceRequestMessage, type GetBalanceResult, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetCurrentPermissionsParams, type GetCurrentPermissionsRequestMessage, type GetCurrentPermissionsResult, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetInscriptionsParams, type GetInscriptionsRequestMessage, type GetInscriptionsResult, type GetNetwork, type GetNetworkParams, type GetNetworkRequestMessage, type GetNetworkResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, PermissionRequestParams, type PermissionWithoutClientId, type Provider, type PsbtPayload, type Recipient, type RenouncePermissions, type RenouncePermissionsParams, type RenouncePermissionsRequestMessage, type RenouncePermissionsResult, type RequestOptions, type RequestPayload, type RequestPermissions, type RequestPermissionsParams, type RequestPermissionsRequestMessage, type RequestPermissionsResult, 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 RunesEstimateEtch, type RunesEstimateEtchParams, type RunesEstimateEtchResult, type RunesEstimateMint, type RunesEstimateRbfOrder, type RunesEtch, type RunesEtchParams, type RunesEtchRequestMessage, type RunesEtchResult, type RunesGetBalance, type RunesGetBalanceParams, type RunesGetBalanceResult, type RunesGetOrder, type RunesMint, type RunesMintParams, type RunesMintRequestMessage, type RunesMintResult, type RunesRbfOrder, type RunesRequestMethod, type RunesRequests, type RunesTransfer, type RunesTransferRequestMessage, type RunesTransferResult, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendInscriptionsParams, type SendInscriptionsRequestMessage, type SendInscriptionsResult, type SendTransfer, type SendTransferParams, type SendTransferRequestMessage, type SendTransferResult, 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 SignPsbtRequestMessage, type SignPsbtResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxDeployContractParams, type StxDeployContractRequestMessage, type StxDeployContractResult, type StxGetAccounts, type StxGetAccountsParams, type StxGetAccountsRequestMessage, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignMessage, type StxSignMessageParams, type StxSignMessageRequestMessage, type StxSignMessageResult, type StxSignStructuredMessage, type StxSignStructuredMessageParams, type StxSignStructuredMessageRequestMessage, type StxSignStructuredMessageResult, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxSignTransactions, type StxSignTransactionsParams, type StxSignTransactionsRequestMessage, type StxSignTransactionsResult, type StxTransferStx, type StxTransferStxParams, type StxTransferStxRequestMessage, type StxTransferStxResult, type SupportedWallet, type TransferRunesParams, type WalletEvent, type WalletRequests, type WalletType, accountActionsSchema, accountChangeEventName, accountChangeSchema, accountPermissionSchema, addListener, addressSchema, connectMethodName, connectParamsSchema, connectRequestMessageSchema, connectResultSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectMethodName, disconnectParamsSchema, disconnectRequestMessageSchema, disconnectResultSchema, disconnectSchema, getAccountMethodName, getAccountParamsSchema, getAccountRequestMessageSchema, getAccountResultSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsRequestMessageSchema, getInscriptionsResultSchema, getNetworkMethodName, getNetworkParamsSchema, getNetworkRequestMessageSchema, getNetworkResultSchema, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema,
|
|
1777
|
+
export { type AccountChangeEvent, type AddListener, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type Connect, type ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type GetAccount, type GetAccountParams, type GetAccountRequestMessage, type GetAccountResult, 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 GetBalanceParams, type GetBalanceRequestMessage, type GetBalanceResult, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetCurrentPermissionsParams, type GetCurrentPermissionsRequestMessage, type GetCurrentPermissionsResult, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetInscriptionsParams, type GetInscriptionsRequestMessage, type GetInscriptionsResult, type GetNetwork, type GetNetworkParams, type GetNetworkRequestMessage, type GetNetworkResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, PermissionRequestParams, type PermissionWithoutClientId, type Provider, type PsbtPayload, type Recipient, type RenouncePermissions, type RenouncePermissionsParams, type RenouncePermissionsRequestMessage, type RenouncePermissionsResult, type RequestOptions, type RequestPayload, type RequestPermissions, type RequestPermissionsParams, type RequestPermissionsRequestMessage, type RequestPermissionsResult, 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 RunesEstimateEtch, type RunesEstimateEtchParams, type RunesEstimateEtchResult, type RunesEstimateMint, type RunesEstimateRbfOrder, type RunesEtch, type RunesEtchParams, type RunesEtchRequestMessage, type RunesEtchResult, type RunesGetBalance, type RunesGetBalanceParams, type RunesGetBalanceResult, type RunesGetOrder, type RunesMint, type RunesMintParams, type RunesMintRequestMessage, type RunesMintResult, type RunesRbfOrder, type RunesRequestMethod, type RunesRequests, type RunesTransfer, type RunesTransferRequestMessage, type RunesTransferResult, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendInscriptionsParams, type SendInscriptionsRequestMessage, type SendInscriptionsResult, type SendTransfer, type SendTransferParams, type SendTransferRequestMessage, type SendTransferResult, 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 SignPsbtRequestMessage, type SignPsbtResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxDeployContractParams, type StxDeployContractRequestMessage, type StxDeployContractResult, type StxGetAccounts, type StxGetAccountsParams, type StxGetAccountsRequestMessage, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignMessage, type StxSignMessageParams, type StxSignMessageRequestMessage, type StxSignMessageResult, type StxSignStructuredMessage, type StxSignStructuredMessageParams, type StxSignStructuredMessageRequestMessage, type StxSignStructuredMessageResult, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxSignTransactions, type StxSignTransactionsParams, type StxSignTransactionsRequestMessage, type StxSignTransactionsResult, type StxTransferStx, type StxTransferStxParams, type StxTransferStxRequestMessage, type StxTransferStxResult, type SupportedWallet, type TransferRunesParams, type WalletEvent, type WalletRequests, type WalletType, accountActionsSchema, accountChangeEventName, accountChangeSchema, accountPermissionSchema, addListener, addressSchema, connectMethodName, connectParamsSchema, connectRequestMessageSchema, connectResultSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectMethodName, disconnectParamsSchema, disconnectRequestMessageSchema, disconnectResultSchema, disconnectSchema, getAccountMethodName, getAccountParamsSchema, getAccountRequestMessageSchema, getAccountResultSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsRequestMessageSchema, getInscriptionsResultSchema, getNetworkMethodName, getNetworkParamsSchema, getNetworkRequestMessageSchema, getNetworkResultSchema, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permission, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, type runesEstimateMintParams, type runesEstimateMintResult, runesEtchMethodName, runesEtchParamsSchema, runesEtchRequestMessageSchema, runesEtchResultSchema, runesGetBalanceMethodName, runesGetBalanceParamsSchema, type runesGetBalanceRequestMessage, runesGetBalanceRequestMessageSchema, runesGetBalanceResultSchema, runesMintMethodName, runesMintParamsSchema, runesMintRequestMessageSchema, runesMintResultSchema, runesTransferMethodName, runesTransferParamsSchema, runesTransferRequestMessageSchema, runesTransferResultSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsRequestMessageSchema, sendInscriptionsResultSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxCallContractMethodName, stxCallContractParamsSchema, stxCallContractRequestMessageSchema, stxCallContractResultSchema, stxDeployContractMethodName, stxDeployContractParamsSchema, stxDeployContractRequestMessageSchema, stxDeployContractResultSchema, stxGetAccountsMethodName, stxGetAccountsParamsSchema, stxGetAccountsRequestMessageSchema, stxGetAccountsResultSchema, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignMessageMethodName, stxSignMessageParamsSchema, stxSignMessageRequestMessageSchema, stxSignMessageResultSchema, stxSignStructuredMessageMethodName, stxSignStructuredMessageParamsSchema, stxSignStructuredMessageRequestMessageSchema, stxSignStructuredMessageResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, stxSignTransactionsMethodName, stxSignTransactionsParamsSchema, stxSignTransactionsRequestMessageSchema, stxSignTransactionsResultSchema, stxTransferStxMethodName, stxTransferStxParamsSchema, stxTransferStxRequestMessageSchema, stxTransferStxResultSchema, walletActionsSchema, walletEventSchema, walletPermissionSchema, walletTypeSchema, walletTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -102,12 +102,6 @@ type AccountChangeEvent = v.InferOutput<typeof accountChangeSchema>;
|
|
|
102
102
|
declare const networkChangeEventName = "networkChange";
|
|
103
103
|
declare const networkChangeSchema: v.ObjectSchema<{
|
|
104
104
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
105
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
106
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
107
|
-
}, undefined>;
|
|
108
|
-
readonly stacks: v.ObjectSchema<{
|
|
109
|
-
readonly name: v.StringSchema<undefined>;
|
|
110
|
-
}, undefined>;
|
|
111
105
|
}, undefined>;
|
|
112
106
|
type NetworkChangeEvent = v.InferOutput<typeof networkChangeSchema>;
|
|
113
107
|
declare const disconnectEventName = "disconnect";
|
|
@@ -119,12 +113,6 @@ declare const walletEventSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
|
119
113
|
readonly type: v.LiteralSchema<"accountChange", undefined>;
|
|
120
114
|
}, undefined>, v.ObjectSchema<{
|
|
121
115
|
readonly type: v.LiteralSchema<"networkChange", undefined>;
|
|
122
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
123
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
124
|
-
}, undefined>;
|
|
125
|
-
readonly stacks: v.ObjectSchema<{
|
|
126
|
-
readonly name: v.StringSchema<undefined>;
|
|
127
|
-
}, undefined>;
|
|
128
116
|
}, undefined>, v.ObjectSchema<{
|
|
129
117
|
readonly type: v.LiteralSchema<"disconnect", undefined>;
|
|
130
118
|
}, undefined>], undefined>;
|
|
@@ -326,6 +314,7 @@ declare const addressSchema: v.ObjectSchema<{
|
|
|
326
314
|
readonly publicKey: v.StringSchema<undefined>;
|
|
327
315
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
328
316
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
317
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
329
318
|
}, undefined>;
|
|
330
319
|
type Address = v.InferOutput<typeof addressSchema>;
|
|
331
320
|
interface GetAddressResponse {
|
|
@@ -384,10 +373,9 @@ declare const getAddressesResultSchema: v.ObjectSchema<{
|
|
|
384
373
|
readonly addresses: v.ArraySchema<v.ObjectSchema<{
|
|
385
374
|
readonly address: v.StringSchema<undefined>;
|
|
386
375
|
readonly publicKey: v.StringSchema<undefined>;
|
|
387
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
388
|
-
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
389
|
-
*/
|
|
376
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
390
377
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
378
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
391
379
|
}, undefined>, undefined>;
|
|
392
380
|
}, undefined>;
|
|
393
381
|
type GetAddressesResult = v.InferOutput<typeof getAddressesResultSchema>;
|
|
@@ -570,13 +558,11 @@ declare const getAccountsParamsSchema: v.ObjectSchema<{
|
|
|
570
558
|
}, undefined>;
|
|
571
559
|
type GetAccountsParams = v.InferOutput<typeof getAccountsParamsSchema>;
|
|
572
560
|
declare const getAccountsResultSchema: v.ArraySchema<v.ObjectSchema<{
|
|
573
|
-
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
574
561
|
readonly address: v.StringSchema<undefined>;
|
|
575
562
|
readonly publicKey: v.StringSchema<undefined>;
|
|
576
|
-
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
577
|
-
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
578
|
-
*/
|
|
563
|
+
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
579
564
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
565
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
580
566
|
}, undefined>, undefined>;
|
|
581
567
|
type GetAccountsResult = v.InferOutput<typeof getAccountsResultSchema>;
|
|
582
568
|
declare const getAccountsRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1115,6 +1101,7 @@ declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
|
1115
1101
|
readonly publicKey: v.StringSchema<undefined>;
|
|
1116
1102
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1117
1103
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1104
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1118
1105
|
}, undefined>, undefined>;
|
|
1119
1106
|
}, undefined>;
|
|
1120
1107
|
type StxGetAddressesResult = v.InferOutput<typeof stxGetAddressesResultSchema>;
|
|
@@ -1614,6 +1601,7 @@ declare const getAccountResultSchema: v.ObjectSchema<{
|
|
|
1614
1601
|
readonly publicKey: v.StringSchema<undefined>;
|
|
1615
1602
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1616
1603
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1604
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1617
1605
|
}, undefined>, undefined>;
|
|
1618
1606
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1619
1607
|
}, undefined>;
|
|
@@ -1626,26 +1614,6 @@ declare const getAccountRequestMessageSchema: v.ObjectSchema<{
|
|
|
1626
1614
|
}, undefined>;
|
|
1627
1615
|
type GetAccountRequestMessage = v.InferOutput<typeof getAccountRequestMessageSchema>;
|
|
1628
1616
|
type GetAccount = MethodParamsAndResult<GetAccountParams, GetAccountResult>;
|
|
1629
|
-
declare const getNetworkMethodName = "wallet_getNetwork";
|
|
1630
|
-
declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1631
|
-
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1632
|
-
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1633
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1634
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
1635
|
-
}, undefined>;
|
|
1636
|
-
readonly stacks: v.ObjectSchema<{
|
|
1637
|
-
readonly name: v.StringSchema<undefined>;
|
|
1638
|
-
}, undefined>;
|
|
1639
|
-
}, undefined>;
|
|
1640
|
-
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
1641
|
-
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1642
|
-
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
1643
|
-
readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1644
|
-
readonly id: v.StringSchema<undefined>;
|
|
1645
|
-
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1646
|
-
}, undefined>;
|
|
1647
|
-
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
1648
|
-
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
1649
1617
|
declare const connectMethodName = "wallet_connect";
|
|
1650
1618
|
declare const connectParamsSchema: v.NullishSchema<v.ObjectSchema<{
|
|
1651
1619
|
readonly permissions: v.OptionalSchema<v.ArraySchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
@@ -1672,16 +1640,9 @@ declare const connectResultSchema: v.ObjectSchema<{
|
|
|
1672
1640
|
readonly publicKey: v.StringSchema<undefined>;
|
|
1673
1641
|
readonly purpose: v.EnumSchema<typeof AddressPurpose, undefined>;
|
|
1674
1642
|
readonly addressType: v.EnumSchema<typeof AddressType, undefined>;
|
|
1643
|
+
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1675
1644
|
}, undefined>, undefined>;
|
|
1676
1645
|
readonly walletType: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1677
|
-
readonly network: v.ObjectSchema<{
|
|
1678
|
-
readonly bitcoin: v.ObjectSchema<{
|
|
1679
|
-
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
1680
|
-
}, undefined>;
|
|
1681
|
-
readonly stacks: v.ObjectSchema<{
|
|
1682
|
-
readonly name: v.StringSchema<undefined>;
|
|
1683
|
-
}, undefined>;
|
|
1684
|
-
}, undefined>;
|
|
1685
1646
|
}, undefined>;
|
|
1686
1647
|
type ConnectResult = v.InferOutput<typeof connectResultSchema>;
|
|
1687
1648
|
declare const connectRequestMessageSchema: v.ObjectSchema<{
|
|
@@ -1708,11 +1669,30 @@ declare const connectRequestMessageSchema: v.ObjectSchema<{
|
|
|
1708
1669
|
}, undefined>;
|
|
1709
1670
|
type ConnectRequestMessage = v.InferOutput<typeof connectRequestMessageSchema>;
|
|
1710
1671
|
type Connect = MethodParamsAndResult<ConnectParams, ConnectResult>;
|
|
1672
|
+
declare const getNetworkMethodName = "wallet_getNetwork";
|
|
1673
|
+
declare const getNetworkParamsSchema: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1674
|
+
type GetNetworkParams = v.InferOutput<typeof getNetworkParamsSchema>;
|
|
1675
|
+
declare const getNetworkResultSchema: v.ObjectSchema<{
|
|
1676
|
+
readonly bitcoin: v.ObjectSchema<{
|
|
1677
|
+
readonly name: v.PicklistSchema<readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"], undefined>;
|
|
1678
|
+
}, undefined>;
|
|
1679
|
+
readonly stacks: v.ObjectSchema<{
|
|
1680
|
+
readonly name: v.StringSchema<undefined>;
|
|
1681
|
+
}, undefined>;
|
|
1682
|
+
}, undefined>;
|
|
1683
|
+
type GetNetworkResult = v.InferOutput<typeof getNetworkResultSchema>;
|
|
1684
|
+
declare const getNetworkRequestMessageSchema: v.ObjectSchema<{
|
|
1685
|
+
readonly method: v.LiteralSchema<"wallet_getNetwork", undefined>;
|
|
1686
|
+
readonly params: v.NullishSchema<v.NullSchema<undefined>, never>;
|
|
1687
|
+
readonly id: v.StringSchema<undefined>;
|
|
1688
|
+
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
1689
|
+
}, undefined>;
|
|
1690
|
+
type GetNetworkRequestMessage = v.InferOutput<typeof getNetworkRequestMessageSchema>;
|
|
1691
|
+
type GetNetwork = MethodParamsAndResult<GetNetworkParams, GetNetworkResult>;
|
|
1711
1692
|
|
|
1712
1693
|
declare const walletTypes: readonly ["software", "ledger", "keystone"];
|
|
1713
1694
|
declare const walletTypeSchema: v.PicklistSchema<readonly ["software", "ledger", "keystone"], undefined>;
|
|
1714
1695
|
type WalletType = v.InferOutput<typeof walletTypeSchema>;
|
|
1715
|
-
declare const networkType: readonly ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"];
|
|
1716
1696
|
|
|
1717
1697
|
interface StxRequests {
|
|
1718
1698
|
stx_callContract: StxCallContract;
|
|
@@ -1794,4 +1774,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
|
|
|
1794
1774
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
|
1795
1775
|
declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
|
|
1796
1776
|
|
|
1797
|
-
export { type AccountChangeEvent, type AddListener, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type Connect, type ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type GetAccount, type GetAccountParams, type GetAccountRequestMessage, type GetAccountResult, 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 GetBalanceParams, type GetBalanceRequestMessage, type GetBalanceResult, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetCurrentPermissionsParams, type GetCurrentPermissionsRequestMessage, type GetCurrentPermissionsResult, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetInscriptionsParams, type GetInscriptionsRequestMessage, type GetInscriptionsResult, type GetNetwork, type GetNetworkParams, type GetNetworkRequestMessage, type GetNetworkResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, PermissionRequestParams, type PermissionWithoutClientId, type Provider, type PsbtPayload, type Recipient, type RenouncePermissions, type RenouncePermissionsParams, type RenouncePermissionsRequestMessage, type RenouncePermissionsResult, type RequestOptions, type RequestPayload, type RequestPermissions, type RequestPermissionsParams, type RequestPermissionsRequestMessage, type RequestPermissionsResult, 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 RunesEstimateEtch, type RunesEstimateEtchParams, type RunesEstimateEtchResult, type RunesEstimateMint, type RunesEstimateRbfOrder, type RunesEtch, type RunesEtchParams, type RunesEtchRequestMessage, type RunesEtchResult, type RunesGetBalance, type RunesGetBalanceParams, type RunesGetBalanceResult, type RunesGetOrder, type RunesMint, type RunesMintParams, type RunesMintRequestMessage, type RunesMintResult, type RunesRbfOrder, type RunesRequestMethod, type RunesRequests, type RunesTransfer, type RunesTransferRequestMessage, type RunesTransferResult, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendInscriptionsParams, type SendInscriptionsRequestMessage, type SendInscriptionsResult, type SendTransfer, type SendTransferParams, type SendTransferRequestMessage, type SendTransferResult, 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 SignPsbtRequestMessage, type SignPsbtResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxDeployContractParams, type StxDeployContractRequestMessage, type StxDeployContractResult, type StxGetAccounts, type StxGetAccountsParams, type StxGetAccountsRequestMessage, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignMessage, type StxSignMessageParams, type StxSignMessageRequestMessage, type StxSignMessageResult, type StxSignStructuredMessage, type StxSignStructuredMessageParams, type StxSignStructuredMessageRequestMessage, type StxSignStructuredMessageResult, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxSignTransactions, type StxSignTransactionsParams, type StxSignTransactionsRequestMessage, type StxSignTransactionsResult, type StxTransferStx, type StxTransferStxParams, type StxTransferStxRequestMessage, type StxTransferStxResult, type SupportedWallet, type TransferRunesParams, type WalletEvent, type WalletRequests, type WalletType, accountActionsSchema, accountChangeEventName, accountChangeSchema, accountPermissionSchema, addListener, addressSchema, connectMethodName, connectParamsSchema, connectRequestMessageSchema, connectResultSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectMethodName, disconnectParamsSchema, disconnectRequestMessageSchema, disconnectResultSchema, disconnectSchema, getAccountMethodName, getAccountParamsSchema, getAccountRequestMessageSchema, getAccountResultSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsRequestMessageSchema, getInscriptionsResultSchema, getNetworkMethodName, getNetworkParamsSchema, getNetworkRequestMessageSchema, getNetworkResultSchema, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema,
|
|
1777
|
+
export { type AccountChangeEvent, type AddListener, type Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type Capability, type Connect, type ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type GetAccount, type GetAccountParams, type GetAccountRequestMessage, type GetAccountResult, 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 GetBalanceParams, type GetBalanceRequestMessage, type GetBalanceResult, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetCurrentPermissions, type GetCurrentPermissionsParams, type GetCurrentPermissionsRequestMessage, type GetCurrentPermissionsResult, type GetInfo, type GetInfoParams, type GetInfoRequestMessage, type GetInfoResult, type GetInscriptions, type GetInscriptionsParams, type GetInscriptionsRequestMessage, type GetInscriptionsResult, type GetNetwork, type GetNetworkParams, type GetNetworkRequestMessage, type GetNetworkResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, PermissionRequestParams, type PermissionWithoutClientId, type Provider, type PsbtPayload, type Recipient, type RenouncePermissions, type RenouncePermissionsParams, type RenouncePermissionsRequestMessage, type RenouncePermissionsResult, type RequestOptions, type RequestPayload, type RequestPermissions, type RequestPermissionsParams, type RequestPermissionsRequestMessage, type RequestPermissionsResult, 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 RunesEstimateEtch, type RunesEstimateEtchParams, type RunesEstimateEtchResult, type RunesEstimateMint, type RunesEstimateRbfOrder, type RunesEtch, type RunesEtchParams, type RunesEtchRequestMessage, type RunesEtchResult, type RunesGetBalance, type RunesGetBalanceParams, type RunesGetBalanceResult, type RunesGetOrder, type RunesMint, type RunesMintParams, type RunesMintRequestMessage, type RunesMintResult, type RunesRbfOrder, type RunesRequestMethod, type RunesRequests, type RunesTransfer, type RunesTransferRequestMessage, type RunesTransferResult, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, type SendInscriptionsParams, type SendInscriptionsRequestMessage, type SendInscriptionsResult, type SendTransfer, type SendTransferParams, type SendTransferRequestMessage, type SendTransferResult, 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 SignPsbtRequestMessage, type SignPsbtResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxDeployContractParams, type StxDeployContractRequestMessage, type StxDeployContractResult, type StxGetAccounts, type StxGetAccountsParams, type StxGetAccountsRequestMessage, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignMessage, type StxSignMessageParams, type StxSignMessageRequestMessage, type StxSignMessageResult, type StxSignStructuredMessage, type StxSignStructuredMessageParams, type StxSignStructuredMessageRequestMessage, type StxSignStructuredMessageResult, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxSignTransactions, type StxSignTransactionsParams, type StxSignTransactionsRequestMessage, type StxSignTransactionsResult, type StxTransferStx, type StxTransferStxParams, type StxTransferStxRequestMessage, type StxTransferStxResult, type SupportedWallet, type TransferRunesParams, type WalletEvent, type WalletRequests, type WalletType, accountActionsSchema, accountChangeEventName, accountChangeSchema, accountPermissionSchema, addListener, addressSchema, connectMethodName, connectParamsSchema, connectRequestMessageSchema, connectResultSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectEventName, disconnectMethodName, disconnectParamsSchema, disconnectRequestMessageSchema, disconnectResultSchema, disconnectSchema, getAccountMethodName, getAccountParamsSchema, getAccountRequestMessageSchema, getAccountResultSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getCurrentPermissionsMethodName, getCurrentPermissionsParamsSchema, getCurrentPermissionsRequestMessageSchema, getCurrentPermissionsResultSchema, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getInscriptionsMethodName, getInscriptionsParamsSchema, getInscriptionsRequestMessageSchema, getInscriptionsResultSchema, getNetworkMethodName, getNetworkParamsSchema, getNetworkRequestMessageSchema, getNetworkResultSchema, getProviderById, getProviderOrThrow, getProviders, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permission, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, type runesEstimateMintParams, type runesEstimateMintResult, runesEtchMethodName, runesEtchParamsSchema, runesEtchRequestMessageSchema, runesEtchResultSchema, runesGetBalanceMethodName, runesGetBalanceParamsSchema, type runesGetBalanceRequestMessage, runesGetBalanceRequestMessageSchema, runesGetBalanceResultSchema, runesMintMethodName, runesMintParamsSchema, runesMintRequestMessageSchema, runesMintResultSchema, runesTransferMethodName, runesTransferParamsSchema, runesTransferRequestMessageSchema, runesTransferResultSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsRequestMessageSchema, sendInscriptionsResultSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxCallContractMethodName, stxCallContractParamsSchema, stxCallContractRequestMessageSchema, stxCallContractResultSchema, stxDeployContractMethodName, stxDeployContractParamsSchema, stxDeployContractRequestMessageSchema, stxDeployContractResultSchema, stxGetAccountsMethodName, stxGetAccountsParamsSchema, stxGetAccountsRequestMessageSchema, stxGetAccountsResultSchema, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignMessageMethodName, stxSignMessageParamsSchema, stxSignMessageRequestMessageSchema, stxSignMessageResultSchema, stxSignStructuredMessageMethodName, stxSignStructuredMessageParamsSchema, stxSignStructuredMessageRequestMessageSchema, stxSignStructuredMessageResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, stxSignTransactionsMethodName, stxSignTransactionsParamsSchema, stxSignTransactionsRequestMessageSchema, stxSignTransactionsResultSchema, stxTransferStxMethodName, stxTransferStxParamsSchema, stxTransferStxRequestMessageSchema, stxTransferStxResultSchema, walletActionsSchema, walletEventSchema, walletPermissionSchema, walletTypeSchema, walletTypes };
|
package/dist/index.js
CHANGED
|
@@ -105,7 +105,6 @@ __export(src_exports, {
|
|
|
105
105
|
isProviderInstalled: () => isProviderInstalled,
|
|
106
106
|
networkChangeEventName: () => networkChangeEventName,
|
|
107
107
|
networkChangeSchema: () => networkChangeSchema,
|
|
108
|
-
networkType: () => networkType,
|
|
109
108
|
permission: () => permission,
|
|
110
109
|
removeDefaultProvider: () => removeDefaultProvider,
|
|
111
110
|
renouncePermissionsMethodName: () => renouncePermissionsMethodName,
|
|
@@ -210,13 +209,7 @@ var accountChangeSchema = v.object({
|
|
|
210
209
|
});
|
|
211
210
|
var networkChangeEventName = "networkChange";
|
|
212
211
|
var networkChangeSchema = v.object({
|
|
213
|
-
type: v.literal(networkChangeEventName)
|
|
214
|
-
bitcoin: v.object({
|
|
215
|
-
name: v.picklist(networkType)
|
|
216
|
-
}),
|
|
217
|
-
stacks: v.object({
|
|
218
|
-
name: v.string()
|
|
219
|
-
})
|
|
212
|
+
type: v.literal(networkChangeEventName)
|
|
220
213
|
});
|
|
221
214
|
var disconnectEventName = "disconnect";
|
|
222
215
|
var disconnectSchema = v.object({
|
|
@@ -269,13 +262,13 @@ function getSupportedWallets() {
|
|
|
269
262
|
|
|
270
263
|
// src/types.ts
|
|
271
264
|
var v2 = __toESM(require("valibot"));
|
|
272
|
-
var BitcoinNetworkType = /* @__PURE__ */ ((
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
return
|
|
265
|
+
var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType3) => {
|
|
266
|
+
BitcoinNetworkType3["Mainnet"] = "Mainnet";
|
|
267
|
+
BitcoinNetworkType3["Testnet"] = "Testnet";
|
|
268
|
+
BitcoinNetworkType3["Testnet4"] = "Testnet4";
|
|
269
|
+
BitcoinNetworkType3["Signet"] = "Signet";
|
|
270
|
+
BitcoinNetworkType3["Regtest"] = "Regtest";
|
|
271
|
+
return BitcoinNetworkType3;
|
|
279
272
|
})(BitcoinNetworkType || {});
|
|
280
273
|
var RpcIdSchema = v2.optional(v2.union([v2.string(), v2.number(), v2.null()]));
|
|
281
274
|
var rpcRequestMessageSchema = v2.object({
|
|
@@ -461,7 +454,8 @@ var addressSchema = v6.object({
|
|
|
461
454
|
address: v6.string(),
|
|
462
455
|
publicKey: v6.string(),
|
|
463
456
|
purpose: v6.enum(AddressPurpose),
|
|
464
|
-
addressType: v6.enum(AddressType)
|
|
457
|
+
addressType: v6.enum(AddressType),
|
|
458
|
+
walletType: walletTypeSchema
|
|
465
459
|
});
|
|
466
460
|
|
|
467
461
|
// src/addresses/index.ts
|
|
@@ -728,63 +722,55 @@ var stxTransferStxRequestMessageSchema = v12.object({
|
|
|
728
722
|
});
|
|
729
723
|
|
|
730
724
|
// src/request/types/btcMethods.ts
|
|
731
|
-
var v14 = __toESM(require("valibot"));
|
|
732
|
-
|
|
733
|
-
// src/request/types/common.ts
|
|
734
725
|
var v13 = __toESM(require("valibot"));
|
|
735
|
-
var walletTypes = ["software", "ledger", "keystone"];
|
|
736
|
-
var walletTypeSchema = v13.picklist(walletTypes);
|
|
737
|
-
var networkType = ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"];
|
|
738
|
-
|
|
739
|
-
// src/request/types/btcMethods.ts
|
|
740
726
|
var getInfoMethodName = "getInfo";
|
|
741
|
-
var getInfoParamsSchema =
|
|
742
|
-
var getInfoResultSchema =
|
|
727
|
+
var getInfoParamsSchema = v13.nullish(v13.null());
|
|
728
|
+
var getInfoResultSchema = v13.object({
|
|
743
729
|
/**
|
|
744
730
|
* Version of the wallet.
|
|
745
731
|
*/
|
|
746
|
-
version:
|
|
732
|
+
version: v13.string(),
|
|
747
733
|
/**
|
|
748
734
|
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
749
735
|
*/
|
|
750
|
-
methods:
|
|
736
|
+
methods: v13.optional(v13.array(v13.string())),
|
|
751
737
|
/**
|
|
752
738
|
* List of WBIP standards supported by the wallet. Not currently used.
|
|
753
739
|
*/
|
|
754
|
-
supports:
|
|
740
|
+
supports: v13.array(v13.string())
|
|
755
741
|
});
|
|
756
|
-
var getInfoRequestMessageSchema =
|
|
742
|
+
var getInfoRequestMessageSchema = v13.object({
|
|
757
743
|
...rpcRequestMessageSchema.entries,
|
|
758
|
-
...
|
|
759
|
-
method:
|
|
744
|
+
...v13.object({
|
|
745
|
+
method: v13.literal(getInfoMethodName),
|
|
760
746
|
params: getInfoParamsSchema,
|
|
761
|
-
id:
|
|
747
|
+
id: v13.string()
|
|
762
748
|
}).entries
|
|
763
749
|
});
|
|
764
750
|
var getAddressesMethodName = "getAddresses";
|
|
765
|
-
var getAddressesParamsSchema =
|
|
751
|
+
var getAddressesParamsSchema = v13.object({
|
|
766
752
|
/**
|
|
767
753
|
* The purposes for which to generate addresses. See
|
|
768
754
|
* {@linkcode AddressPurpose} for available purposes.
|
|
769
755
|
*/
|
|
770
|
-
purposes:
|
|
756
|
+
purposes: v13.array(v13.enum(AddressPurpose)),
|
|
771
757
|
/**
|
|
772
758
|
* A message to be displayed to the user in the request prompt.
|
|
773
759
|
*/
|
|
774
|
-
message:
|
|
760
|
+
message: v13.optional(v13.string())
|
|
775
761
|
});
|
|
776
|
-
var getAddressesResultSchema =
|
|
762
|
+
var getAddressesResultSchema = v13.object({
|
|
777
763
|
/**
|
|
778
764
|
* The addresses generated for the given purposes.
|
|
779
765
|
*/
|
|
780
|
-
addresses:
|
|
766
|
+
addresses: v13.array(addressSchema)
|
|
781
767
|
});
|
|
782
|
-
var getAddressesRequestMessageSchema =
|
|
768
|
+
var getAddressesRequestMessageSchema = v13.object({
|
|
783
769
|
...rpcRequestMessageSchema.entries,
|
|
784
|
-
...
|
|
785
|
-
method:
|
|
770
|
+
...v13.object({
|
|
771
|
+
method: v13.literal(getAddressesMethodName),
|
|
786
772
|
params: getAddressesParamsSchema,
|
|
787
|
-
id:
|
|
773
|
+
id: v13.string()
|
|
788
774
|
}).entries
|
|
789
775
|
});
|
|
790
776
|
var signMessageMethodName = "signMessage";
|
|
@@ -793,168 +779,172 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
|
793
779
|
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
794
780
|
return MessageSigningProtocols2;
|
|
795
781
|
})(MessageSigningProtocols || {});
|
|
796
|
-
var signMessageParamsSchema =
|
|
782
|
+
var signMessageParamsSchema = v13.object({
|
|
797
783
|
/**
|
|
798
784
|
* The address used for signing.
|
|
799
785
|
**/
|
|
800
|
-
address:
|
|
786
|
+
address: v13.string(),
|
|
801
787
|
/**
|
|
802
788
|
* The message to sign.
|
|
803
789
|
**/
|
|
804
|
-
message:
|
|
790
|
+
message: v13.string(),
|
|
805
791
|
/**
|
|
806
792
|
* The protocol to use for signing the message.
|
|
807
793
|
*/
|
|
808
|
-
protocol:
|
|
794
|
+
protocol: v13.optional(v13.enum(MessageSigningProtocols))
|
|
809
795
|
});
|
|
810
|
-
var signMessageResultSchema =
|
|
796
|
+
var signMessageResultSchema = v13.object({
|
|
811
797
|
/**
|
|
812
798
|
* The signature of the message.
|
|
813
799
|
*/
|
|
814
|
-
signature:
|
|
800
|
+
signature: v13.string(),
|
|
815
801
|
/**
|
|
816
802
|
* hash of the message.
|
|
817
803
|
*/
|
|
818
|
-
messageHash:
|
|
804
|
+
messageHash: v13.string(),
|
|
819
805
|
/**
|
|
820
806
|
* The address used for signing.
|
|
821
807
|
*/
|
|
822
|
-
address:
|
|
808
|
+
address: v13.string(),
|
|
823
809
|
/**
|
|
824
810
|
* The protocol to use for signing the message.
|
|
825
811
|
*/
|
|
826
|
-
protocol:
|
|
812
|
+
protocol: v13.enum(MessageSigningProtocols)
|
|
827
813
|
});
|
|
828
|
-
var signMessageRequestMessageSchema =
|
|
814
|
+
var signMessageRequestMessageSchema = v13.object({
|
|
829
815
|
...rpcRequestMessageSchema.entries,
|
|
830
|
-
...
|
|
831
|
-
method:
|
|
816
|
+
...v13.object({
|
|
817
|
+
method: v13.literal(signMessageMethodName),
|
|
832
818
|
params: signMessageParamsSchema,
|
|
833
|
-
id:
|
|
819
|
+
id: v13.string()
|
|
834
820
|
}).entries
|
|
835
821
|
});
|
|
836
822
|
var sendTransferMethodName = "sendTransfer";
|
|
837
|
-
var sendTransferParamsSchema =
|
|
823
|
+
var sendTransferParamsSchema = v13.object({
|
|
838
824
|
/**
|
|
839
825
|
* Array of recipients to send to.
|
|
840
826
|
* The amount to send to each recipient is in satoshis.
|
|
841
827
|
*/
|
|
842
|
-
recipients:
|
|
843
|
-
|
|
844
|
-
address:
|
|
845
|
-
amount:
|
|
828
|
+
recipients: v13.array(
|
|
829
|
+
v13.object({
|
|
830
|
+
address: v13.string(),
|
|
831
|
+
amount: v13.number()
|
|
846
832
|
})
|
|
847
833
|
)
|
|
848
834
|
});
|
|
849
|
-
var sendTransferResultSchema =
|
|
835
|
+
var sendTransferResultSchema = v13.object({
|
|
850
836
|
/**
|
|
851
837
|
* The transaction id as a hex-encoded string.
|
|
852
838
|
*/
|
|
853
|
-
txid:
|
|
839
|
+
txid: v13.string()
|
|
854
840
|
});
|
|
855
|
-
var sendTransferRequestMessageSchema =
|
|
841
|
+
var sendTransferRequestMessageSchema = v13.object({
|
|
856
842
|
...rpcRequestMessageSchema.entries,
|
|
857
|
-
...
|
|
858
|
-
method:
|
|
843
|
+
...v13.object({
|
|
844
|
+
method: v13.literal(sendTransferMethodName),
|
|
859
845
|
params: sendTransferParamsSchema,
|
|
860
|
-
id:
|
|
846
|
+
id: v13.string()
|
|
861
847
|
}).entries
|
|
862
848
|
});
|
|
863
849
|
var signPsbtMethodName = "signPsbt";
|
|
864
|
-
var signPsbtParamsSchema =
|
|
850
|
+
var signPsbtParamsSchema = v13.object({
|
|
865
851
|
/**
|
|
866
852
|
* The base64 encoded PSBT to sign.
|
|
867
853
|
*/
|
|
868
|
-
psbt:
|
|
854
|
+
psbt: v13.string(),
|
|
869
855
|
/**
|
|
870
856
|
* The inputs to sign.
|
|
871
857
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
872
858
|
*/
|
|
873
|
-
signInputs:
|
|
859
|
+
signInputs: v13.record(v13.string(), v13.array(v13.number())),
|
|
874
860
|
/**
|
|
875
861
|
* Whether to broadcast the transaction after signing.
|
|
876
862
|
**/
|
|
877
|
-
broadcast:
|
|
863
|
+
broadcast: v13.optional(v13.boolean())
|
|
878
864
|
});
|
|
879
|
-
var signPsbtResultSchema =
|
|
865
|
+
var signPsbtResultSchema = v13.object({
|
|
880
866
|
/**
|
|
881
867
|
* The base64 encoded PSBT after signing.
|
|
882
868
|
*/
|
|
883
|
-
psbt:
|
|
869
|
+
psbt: v13.string(),
|
|
884
870
|
/**
|
|
885
871
|
* The transaction id as a hex-encoded string.
|
|
886
872
|
* This is only returned if the transaction was broadcast.
|
|
887
873
|
**/
|
|
888
|
-
txid:
|
|
874
|
+
txid: v13.optional(v13.string())
|
|
889
875
|
});
|
|
890
|
-
var signPsbtRequestMessageSchema =
|
|
876
|
+
var signPsbtRequestMessageSchema = v13.object({
|
|
891
877
|
...rpcRequestMessageSchema.entries,
|
|
892
|
-
...
|
|
893
|
-
method:
|
|
878
|
+
...v13.object({
|
|
879
|
+
method: v13.literal(signPsbtMethodName),
|
|
894
880
|
params: signPsbtParamsSchema,
|
|
895
|
-
id:
|
|
881
|
+
id: v13.string()
|
|
896
882
|
}).entries
|
|
897
883
|
});
|
|
898
884
|
var getAccountsMethodName = "getAccounts";
|
|
899
|
-
var getAccountsParamsSchema =
|
|
885
|
+
var getAccountsParamsSchema = v13.object({
|
|
900
886
|
/**
|
|
901
887
|
* The purposes for which to generate addresses. See
|
|
902
888
|
* {@linkcode AddressPurpose} for available purposes.
|
|
903
889
|
*/
|
|
904
|
-
purposes:
|
|
890
|
+
purposes: v13.array(v13.enum(AddressPurpose)),
|
|
905
891
|
/**
|
|
906
892
|
* A message to be displayed to the user in the request prompt.
|
|
907
893
|
*/
|
|
908
|
-
message:
|
|
909
|
-
});
|
|
910
|
-
var getAccountsResultSchema =
|
|
911
|
-
|
|
912
|
-
...addressSchema.entries
|
|
913
|
-
...v14.object({
|
|
914
|
-
walletType: walletTypeSchema
|
|
915
|
-
}).entries
|
|
894
|
+
message: v13.optional(v13.string())
|
|
895
|
+
});
|
|
896
|
+
var getAccountsResultSchema = v13.array(
|
|
897
|
+
v13.object({
|
|
898
|
+
...addressSchema.entries
|
|
916
899
|
})
|
|
917
900
|
);
|
|
918
|
-
var getAccountsRequestMessageSchema =
|
|
901
|
+
var getAccountsRequestMessageSchema = v13.object({
|
|
919
902
|
...rpcRequestMessageSchema.entries,
|
|
920
|
-
...
|
|
921
|
-
method:
|
|
903
|
+
...v13.object({
|
|
904
|
+
method: v13.literal(getAccountsMethodName),
|
|
922
905
|
params: getAccountsParamsSchema,
|
|
923
|
-
id:
|
|
906
|
+
id: v13.string()
|
|
924
907
|
}).entries
|
|
925
908
|
});
|
|
926
909
|
var getBalanceMethodName = "getBalance";
|
|
927
|
-
var getBalanceParamsSchema =
|
|
928
|
-
var getBalanceResultSchema =
|
|
910
|
+
var getBalanceParamsSchema = v13.nullish(v13.null());
|
|
911
|
+
var getBalanceResultSchema = v13.object({
|
|
929
912
|
/**
|
|
930
913
|
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
931
914
|
* messages not supporting bigint
|
|
932
915
|
* (https://issues.chromium.org/issues/40116184).
|
|
933
916
|
*/
|
|
934
|
-
confirmed:
|
|
917
|
+
confirmed: v13.string(),
|
|
935
918
|
/**
|
|
936
919
|
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
937
920
|
* messages not supporting bigint
|
|
938
921
|
* (https://issues.chromium.org/issues/40116184).
|
|
939
922
|
*/
|
|
940
|
-
unconfirmed:
|
|
923
|
+
unconfirmed: v13.string(),
|
|
941
924
|
/**
|
|
942
925
|
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
943
926
|
* sats. Using a string due to chrome messages not supporting bigint
|
|
944
927
|
* (https://issues.chromium.org/issues/40116184).
|
|
945
928
|
*/
|
|
946
|
-
total:
|
|
929
|
+
total: v13.string()
|
|
947
930
|
});
|
|
948
|
-
var getBalanceRequestMessageSchema =
|
|
931
|
+
var getBalanceRequestMessageSchema = v13.object({
|
|
949
932
|
...rpcRequestMessageSchema.entries,
|
|
950
|
-
...
|
|
951
|
-
method:
|
|
952
|
-
id:
|
|
933
|
+
...v13.object({
|
|
934
|
+
method: v13.literal(getBalanceMethodName),
|
|
935
|
+
id: v13.string()
|
|
953
936
|
}).entries
|
|
954
937
|
});
|
|
955
938
|
|
|
956
939
|
// src/request/types/walletMethods.ts
|
|
957
940
|
var v15 = __toESM(require("valibot"));
|
|
941
|
+
|
|
942
|
+
// src/request/types/common.ts
|
|
943
|
+
var v14 = __toESM(require("valibot"));
|
|
944
|
+
var walletTypes = ["software", "ledger", "keystone"];
|
|
945
|
+
var walletTypeSchema = v14.picklist(walletTypes);
|
|
946
|
+
|
|
947
|
+
// src/request/types/walletMethods.ts
|
|
958
948
|
var accountActionsSchema = v15.object({
|
|
959
949
|
read: v15.optional(v15.boolean())
|
|
960
950
|
});
|
|
@@ -1052,24 +1042,6 @@ var getAccountRequestMessageSchema = v15.object({
|
|
|
1052
1042
|
id: v15.string()
|
|
1053
1043
|
}).entries
|
|
1054
1044
|
});
|
|
1055
|
-
var getNetworkMethodName = "wallet_getNetwork";
|
|
1056
|
-
var getNetworkParamsSchema = v15.nullish(v15.null());
|
|
1057
|
-
var getNetworkResultSchema = v15.object({
|
|
1058
|
-
bitcoin: v15.object({
|
|
1059
|
-
name: v15.picklist(networkType)
|
|
1060
|
-
}),
|
|
1061
|
-
stacks: v15.object({
|
|
1062
|
-
name: v15.string()
|
|
1063
|
-
})
|
|
1064
|
-
});
|
|
1065
|
-
var getNetworkRequestMessageSchema = v15.object({
|
|
1066
|
-
...rpcRequestMessageSchema.entries,
|
|
1067
|
-
...v15.object({
|
|
1068
|
-
method: v15.literal(getNetworkMethodName),
|
|
1069
|
-
params: getNetworkParamsSchema,
|
|
1070
|
-
id: v15.string()
|
|
1071
|
-
}).entries
|
|
1072
|
-
});
|
|
1073
1045
|
var connectMethodName = "wallet_connect";
|
|
1074
1046
|
var connectParamsSchema = v15.nullish(
|
|
1075
1047
|
v15.object({
|
|
@@ -1080,12 +1052,7 @@ var connectParamsSchema = v15.nullish(
|
|
|
1080
1052
|
)
|
|
1081
1053
|
})
|
|
1082
1054
|
);
|
|
1083
|
-
var connectResultSchema =
|
|
1084
|
-
id: v15.string(),
|
|
1085
|
-
addresses: v15.array(addressSchema),
|
|
1086
|
-
walletType: walletTypeSchema,
|
|
1087
|
-
network: getNetworkResultSchema
|
|
1088
|
-
});
|
|
1055
|
+
var connectResultSchema = getAccountResultSchema;
|
|
1089
1056
|
var connectRequestMessageSchema = v15.object({
|
|
1090
1057
|
...rpcRequestMessageSchema.entries,
|
|
1091
1058
|
...v15.object({
|
|
@@ -1094,6 +1061,25 @@ var connectRequestMessageSchema = v15.object({
|
|
|
1094
1061
|
id: v15.string()
|
|
1095
1062
|
}).entries
|
|
1096
1063
|
});
|
|
1064
|
+
var getNetworkMethodName = "wallet_getNetwork";
|
|
1065
|
+
var getNetworkParamsSchema = v15.nullish(v15.null());
|
|
1066
|
+
var networkType = ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"];
|
|
1067
|
+
var getNetworkResultSchema = v15.object({
|
|
1068
|
+
bitcoin: v15.object({
|
|
1069
|
+
name: v15.picklist(networkType)
|
|
1070
|
+
}),
|
|
1071
|
+
stacks: v15.object({
|
|
1072
|
+
name: v15.string()
|
|
1073
|
+
})
|
|
1074
|
+
});
|
|
1075
|
+
var getNetworkRequestMessageSchema = v15.object({
|
|
1076
|
+
...rpcRequestMessageSchema.entries,
|
|
1077
|
+
...v15.object({
|
|
1078
|
+
method: v15.literal(getNetworkMethodName),
|
|
1079
|
+
params: getNetworkParamsSchema,
|
|
1080
|
+
id: v15.string()
|
|
1081
|
+
}).entries
|
|
1082
|
+
});
|
|
1097
1083
|
|
|
1098
1084
|
// src/request/types/runesMethods/etch.ts
|
|
1099
1085
|
var v16 = __toESM(require("valibot"));
|
|
@@ -1837,13 +1823,15 @@ var UnisatAdapter = class extends SatsConnectAdapter {
|
|
|
1837
1823
|
address,
|
|
1838
1824
|
publicKey: pk,
|
|
1839
1825
|
addressType,
|
|
1840
|
-
purpose: "payment" /* Payment
|
|
1826
|
+
purpose: "payment" /* Payment */,
|
|
1827
|
+
walletType: "software"
|
|
1841
1828
|
};
|
|
1842
1829
|
const ordinalsAddress = {
|
|
1843
1830
|
address,
|
|
1844
1831
|
publicKey: pk,
|
|
1845
1832
|
addressType,
|
|
1846
|
-
purpose: "ordinals" /* Ordinals
|
|
1833
|
+
purpose: "ordinals" /* Ordinals */,
|
|
1834
|
+
walletType: "software"
|
|
1847
1835
|
};
|
|
1848
1836
|
const response = [];
|
|
1849
1837
|
if (purposes.includes("payment" /* Payment */)) {
|
|
@@ -2311,7 +2299,6 @@ var signMultipleTransactions = async (options) => {
|
|
|
2311
2299
|
isProviderInstalled,
|
|
2312
2300
|
networkChangeEventName,
|
|
2313
2301
|
networkChangeSchema,
|
|
2314
|
-
networkType,
|
|
2315
2302
|
permission,
|
|
2316
2303
|
removeDefaultProvider,
|
|
2317
2304
|
renouncePermissionsMethodName,
|
package/dist/index.mjs
CHANGED
|
@@ -6,13 +6,7 @@ var accountChangeSchema = v.object({
|
|
|
6
6
|
});
|
|
7
7
|
var networkChangeEventName = "networkChange";
|
|
8
8
|
var networkChangeSchema = v.object({
|
|
9
|
-
type: v.literal(networkChangeEventName)
|
|
10
|
-
bitcoin: v.object({
|
|
11
|
-
name: v.picklist(networkType)
|
|
12
|
-
}),
|
|
13
|
-
stacks: v.object({
|
|
14
|
-
name: v.string()
|
|
15
|
-
})
|
|
9
|
+
type: v.literal(networkChangeEventName)
|
|
16
10
|
});
|
|
17
11
|
var disconnectEventName = "disconnect";
|
|
18
12
|
var disconnectSchema = v.object({
|
|
@@ -65,13 +59,13 @@ function getSupportedWallets() {
|
|
|
65
59
|
|
|
66
60
|
// src/types.ts
|
|
67
61
|
import * as v2 from "valibot";
|
|
68
|
-
var BitcoinNetworkType = /* @__PURE__ */ ((
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return
|
|
62
|
+
var BitcoinNetworkType = /* @__PURE__ */ ((BitcoinNetworkType3) => {
|
|
63
|
+
BitcoinNetworkType3["Mainnet"] = "Mainnet";
|
|
64
|
+
BitcoinNetworkType3["Testnet"] = "Testnet";
|
|
65
|
+
BitcoinNetworkType3["Testnet4"] = "Testnet4";
|
|
66
|
+
BitcoinNetworkType3["Signet"] = "Signet";
|
|
67
|
+
BitcoinNetworkType3["Regtest"] = "Regtest";
|
|
68
|
+
return BitcoinNetworkType3;
|
|
75
69
|
})(BitcoinNetworkType || {});
|
|
76
70
|
var RpcIdSchema = v2.optional(v2.union([v2.string(), v2.number(), v2.null()]));
|
|
77
71
|
var rpcRequestMessageSchema = v2.object({
|
|
@@ -257,7 +251,8 @@ var addressSchema = v6.object({
|
|
|
257
251
|
address: v6.string(),
|
|
258
252
|
publicKey: v6.string(),
|
|
259
253
|
purpose: v6.enum(AddressPurpose),
|
|
260
|
-
addressType: v6.enum(AddressType)
|
|
254
|
+
addressType: v6.enum(AddressType),
|
|
255
|
+
walletType: walletTypeSchema
|
|
261
256
|
});
|
|
262
257
|
|
|
263
258
|
// src/addresses/index.ts
|
|
@@ -524,63 +519,55 @@ var stxTransferStxRequestMessageSchema = v12.object({
|
|
|
524
519
|
});
|
|
525
520
|
|
|
526
521
|
// src/request/types/btcMethods.ts
|
|
527
|
-
import * as v14 from "valibot";
|
|
528
|
-
|
|
529
|
-
// src/request/types/common.ts
|
|
530
522
|
import * as v13 from "valibot";
|
|
531
|
-
var walletTypes = ["software", "ledger", "keystone"];
|
|
532
|
-
var walletTypeSchema = v13.picklist(walletTypes);
|
|
533
|
-
var networkType = ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"];
|
|
534
|
-
|
|
535
|
-
// src/request/types/btcMethods.ts
|
|
536
523
|
var getInfoMethodName = "getInfo";
|
|
537
|
-
var getInfoParamsSchema =
|
|
538
|
-
var getInfoResultSchema =
|
|
524
|
+
var getInfoParamsSchema = v13.nullish(v13.null());
|
|
525
|
+
var getInfoResultSchema = v13.object({
|
|
539
526
|
/**
|
|
540
527
|
* Version of the wallet.
|
|
541
528
|
*/
|
|
542
|
-
version:
|
|
529
|
+
version: v13.string(),
|
|
543
530
|
/**
|
|
544
531
|
* [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet.
|
|
545
532
|
*/
|
|
546
|
-
methods:
|
|
533
|
+
methods: v13.optional(v13.array(v13.string())),
|
|
547
534
|
/**
|
|
548
535
|
* List of WBIP standards supported by the wallet. Not currently used.
|
|
549
536
|
*/
|
|
550
|
-
supports:
|
|
537
|
+
supports: v13.array(v13.string())
|
|
551
538
|
});
|
|
552
|
-
var getInfoRequestMessageSchema =
|
|
539
|
+
var getInfoRequestMessageSchema = v13.object({
|
|
553
540
|
...rpcRequestMessageSchema.entries,
|
|
554
|
-
...
|
|
555
|
-
method:
|
|
541
|
+
...v13.object({
|
|
542
|
+
method: v13.literal(getInfoMethodName),
|
|
556
543
|
params: getInfoParamsSchema,
|
|
557
|
-
id:
|
|
544
|
+
id: v13.string()
|
|
558
545
|
}).entries
|
|
559
546
|
});
|
|
560
547
|
var getAddressesMethodName = "getAddresses";
|
|
561
|
-
var getAddressesParamsSchema =
|
|
548
|
+
var getAddressesParamsSchema = v13.object({
|
|
562
549
|
/**
|
|
563
550
|
* The purposes for which to generate addresses. See
|
|
564
551
|
* {@linkcode AddressPurpose} for available purposes.
|
|
565
552
|
*/
|
|
566
|
-
purposes:
|
|
553
|
+
purposes: v13.array(v13.enum(AddressPurpose)),
|
|
567
554
|
/**
|
|
568
555
|
* A message to be displayed to the user in the request prompt.
|
|
569
556
|
*/
|
|
570
|
-
message:
|
|
557
|
+
message: v13.optional(v13.string())
|
|
571
558
|
});
|
|
572
|
-
var getAddressesResultSchema =
|
|
559
|
+
var getAddressesResultSchema = v13.object({
|
|
573
560
|
/**
|
|
574
561
|
* The addresses generated for the given purposes.
|
|
575
562
|
*/
|
|
576
|
-
addresses:
|
|
563
|
+
addresses: v13.array(addressSchema)
|
|
577
564
|
});
|
|
578
|
-
var getAddressesRequestMessageSchema =
|
|
565
|
+
var getAddressesRequestMessageSchema = v13.object({
|
|
579
566
|
...rpcRequestMessageSchema.entries,
|
|
580
|
-
...
|
|
581
|
-
method:
|
|
567
|
+
...v13.object({
|
|
568
|
+
method: v13.literal(getAddressesMethodName),
|
|
582
569
|
params: getAddressesParamsSchema,
|
|
583
|
-
id:
|
|
570
|
+
id: v13.string()
|
|
584
571
|
}).entries
|
|
585
572
|
});
|
|
586
573
|
var signMessageMethodName = "signMessage";
|
|
@@ -589,168 +576,172 @@ var MessageSigningProtocols = /* @__PURE__ */ ((MessageSigningProtocols2) => {
|
|
|
589
576
|
MessageSigningProtocols2["BIP322"] = "BIP322";
|
|
590
577
|
return MessageSigningProtocols2;
|
|
591
578
|
})(MessageSigningProtocols || {});
|
|
592
|
-
var signMessageParamsSchema =
|
|
579
|
+
var signMessageParamsSchema = v13.object({
|
|
593
580
|
/**
|
|
594
581
|
* The address used for signing.
|
|
595
582
|
**/
|
|
596
|
-
address:
|
|
583
|
+
address: v13.string(),
|
|
597
584
|
/**
|
|
598
585
|
* The message to sign.
|
|
599
586
|
**/
|
|
600
|
-
message:
|
|
587
|
+
message: v13.string(),
|
|
601
588
|
/**
|
|
602
589
|
* The protocol to use for signing the message.
|
|
603
590
|
*/
|
|
604
|
-
protocol:
|
|
591
|
+
protocol: v13.optional(v13.enum(MessageSigningProtocols))
|
|
605
592
|
});
|
|
606
|
-
var signMessageResultSchema =
|
|
593
|
+
var signMessageResultSchema = v13.object({
|
|
607
594
|
/**
|
|
608
595
|
* The signature of the message.
|
|
609
596
|
*/
|
|
610
|
-
signature:
|
|
597
|
+
signature: v13.string(),
|
|
611
598
|
/**
|
|
612
599
|
* hash of the message.
|
|
613
600
|
*/
|
|
614
|
-
messageHash:
|
|
601
|
+
messageHash: v13.string(),
|
|
615
602
|
/**
|
|
616
603
|
* The address used for signing.
|
|
617
604
|
*/
|
|
618
|
-
address:
|
|
605
|
+
address: v13.string(),
|
|
619
606
|
/**
|
|
620
607
|
* The protocol to use for signing the message.
|
|
621
608
|
*/
|
|
622
|
-
protocol:
|
|
609
|
+
protocol: v13.enum(MessageSigningProtocols)
|
|
623
610
|
});
|
|
624
|
-
var signMessageRequestMessageSchema =
|
|
611
|
+
var signMessageRequestMessageSchema = v13.object({
|
|
625
612
|
...rpcRequestMessageSchema.entries,
|
|
626
|
-
...
|
|
627
|
-
method:
|
|
613
|
+
...v13.object({
|
|
614
|
+
method: v13.literal(signMessageMethodName),
|
|
628
615
|
params: signMessageParamsSchema,
|
|
629
|
-
id:
|
|
616
|
+
id: v13.string()
|
|
630
617
|
}).entries
|
|
631
618
|
});
|
|
632
619
|
var sendTransferMethodName = "sendTransfer";
|
|
633
|
-
var sendTransferParamsSchema =
|
|
620
|
+
var sendTransferParamsSchema = v13.object({
|
|
634
621
|
/**
|
|
635
622
|
* Array of recipients to send to.
|
|
636
623
|
* The amount to send to each recipient is in satoshis.
|
|
637
624
|
*/
|
|
638
|
-
recipients:
|
|
639
|
-
|
|
640
|
-
address:
|
|
641
|
-
amount:
|
|
625
|
+
recipients: v13.array(
|
|
626
|
+
v13.object({
|
|
627
|
+
address: v13.string(),
|
|
628
|
+
amount: v13.number()
|
|
642
629
|
})
|
|
643
630
|
)
|
|
644
631
|
});
|
|
645
|
-
var sendTransferResultSchema =
|
|
632
|
+
var sendTransferResultSchema = v13.object({
|
|
646
633
|
/**
|
|
647
634
|
* The transaction id as a hex-encoded string.
|
|
648
635
|
*/
|
|
649
|
-
txid:
|
|
636
|
+
txid: v13.string()
|
|
650
637
|
});
|
|
651
|
-
var sendTransferRequestMessageSchema =
|
|
638
|
+
var sendTransferRequestMessageSchema = v13.object({
|
|
652
639
|
...rpcRequestMessageSchema.entries,
|
|
653
|
-
...
|
|
654
|
-
method:
|
|
640
|
+
...v13.object({
|
|
641
|
+
method: v13.literal(sendTransferMethodName),
|
|
655
642
|
params: sendTransferParamsSchema,
|
|
656
|
-
id:
|
|
643
|
+
id: v13.string()
|
|
657
644
|
}).entries
|
|
658
645
|
});
|
|
659
646
|
var signPsbtMethodName = "signPsbt";
|
|
660
|
-
var signPsbtParamsSchema =
|
|
647
|
+
var signPsbtParamsSchema = v13.object({
|
|
661
648
|
/**
|
|
662
649
|
* The base64 encoded PSBT to sign.
|
|
663
650
|
*/
|
|
664
|
-
psbt:
|
|
651
|
+
psbt: v13.string(),
|
|
665
652
|
/**
|
|
666
653
|
* The inputs to sign.
|
|
667
654
|
* The key is the address and the value is an array of indexes of the inputs to sign.
|
|
668
655
|
*/
|
|
669
|
-
signInputs:
|
|
656
|
+
signInputs: v13.record(v13.string(), v13.array(v13.number())),
|
|
670
657
|
/**
|
|
671
658
|
* Whether to broadcast the transaction after signing.
|
|
672
659
|
**/
|
|
673
|
-
broadcast:
|
|
660
|
+
broadcast: v13.optional(v13.boolean())
|
|
674
661
|
});
|
|
675
|
-
var signPsbtResultSchema =
|
|
662
|
+
var signPsbtResultSchema = v13.object({
|
|
676
663
|
/**
|
|
677
664
|
* The base64 encoded PSBT after signing.
|
|
678
665
|
*/
|
|
679
|
-
psbt:
|
|
666
|
+
psbt: v13.string(),
|
|
680
667
|
/**
|
|
681
668
|
* The transaction id as a hex-encoded string.
|
|
682
669
|
* This is only returned if the transaction was broadcast.
|
|
683
670
|
**/
|
|
684
|
-
txid:
|
|
671
|
+
txid: v13.optional(v13.string())
|
|
685
672
|
});
|
|
686
|
-
var signPsbtRequestMessageSchema =
|
|
673
|
+
var signPsbtRequestMessageSchema = v13.object({
|
|
687
674
|
...rpcRequestMessageSchema.entries,
|
|
688
|
-
...
|
|
689
|
-
method:
|
|
675
|
+
...v13.object({
|
|
676
|
+
method: v13.literal(signPsbtMethodName),
|
|
690
677
|
params: signPsbtParamsSchema,
|
|
691
|
-
id:
|
|
678
|
+
id: v13.string()
|
|
692
679
|
}).entries
|
|
693
680
|
});
|
|
694
681
|
var getAccountsMethodName = "getAccounts";
|
|
695
|
-
var getAccountsParamsSchema =
|
|
682
|
+
var getAccountsParamsSchema = v13.object({
|
|
696
683
|
/**
|
|
697
684
|
* The purposes for which to generate addresses. See
|
|
698
685
|
* {@linkcode AddressPurpose} for available purposes.
|
|
699
686
|
*/
|
|
700
|
-
purposes:
|
|
687
|
+
purposes: v13.array(v13.enum(AddressPurpose)),
|
|
701
688
|
/**
|
|
702
689
|
* A message to be displayed to the user in the request prompt.
|
|
703
690
|
*/
|
|
704
|
-
message:
|
|
705
|
-
});
|
|
706
|
-
var getAccountsResultSchema =
|
|
707
|
-
|
|
708
|
-
...addressSchema.entries
|
|
709
|
-
...v14.object({
|
|
710
|
-
walletType: walletTypeSchema
|
|
711
|
-
}).entries
|
|
691
|
+
message: v13.optional(v13.string())
|
|
692
|
+
});
|
|
693
|
+
var getAccountsResultSchema = v13.array(
|
|
694
|
+
v13.object({
|
|
695
|
+
...addressSchema.entries
|
|
712
696
|
})
|
|
713
697
|
);
|
|
714
|
-
var getAccountsRequestMessageSchema =
|
|
698
|
+
var getAccountsRequestMessageSchema = v13.object({
|
|
715
699
|
...rpcRequestMessageSchema.entries,
|
|
716
|
-
...
|
|
717
|
-
method:
|
|
700
|
+
...v13.object({
|
|
701
|
+
method: v13.literal(getAccountsMethodName),
|
|
718
702
|
params: getAccountsParamsSchema,
|
|
719
|
-
id:
|
|
703
|
+
id: v13.string()
|
|
720
704
|
}).entries
|
|
721
705
|
});
|
|
722
706
|
var getBalanceMethodName = "getBalance";
|
|
723
|
-
var getBalanceParamsSchema =
|
|
724
|
-
var getBalanceResultSchema =
|
|
707
|
+
var getBalanceParamsSchema = v13.nullish(v13.null());
|
|
708
|
+
var getBalanceResultSchema = v13.object({
|
|
725
709
|
/**
|
|
726
710
|
* The confirmed balance of the wallet in sats. Using a string due to chrome
|
|
727
711
|
* messages not supporting bigint
|
|
728
712
|
* (https://issues.chromium.org/issues/40116184).
|
|
729
713
|
*/
|
|
730
|
-
confirmed:
|
|
714
|
+
confirmed: v13.string(),
|
|
731
715
|
/**
|
|
732
716
|
* The unconfirmed balance of the wallet in sats. Using a string due to chrome
|
|
733
717
|
* messages not supporting bigint
|
|
734
718
|
* (https://issues.chromium.org/issues/40116184).
|
|
735
719
|
*/
|
|
736
|
-
unconfirmed:
|
|
720
|
+
unconfirmed: v13.string(),
|
|
737
721
|
/**
|
|
738
722
|
* The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
|
|
739
723
|
* sats. Using a string due to chrome messages not supporting bigint
|
|
740
724
|
* (https://issues.chromium.org/issues/40116184).
|
|
741
725
|
*/
|
|
742
|
-
total:
|
|
726
|
+
total: v13.string()
|
|
743
727
|
});
|
|
744
|
-
var getBalanceRequestMessageSchema =
|
|
728
|
+
var getBalanceRequestMessageSchema = v13.object({
|
|
745
729
|
...rpcRequestMessageSchema.entries,
|
|
746
|
-
...
|
|
747
|
-
method:
|
|
748
|
-
id:
|
|
730
|
+
...v13.object({
|
|
731
|
+
method: v13.literal(getBalanceMethodName),
|
|
732
|
+
id: v13.string()
|
|
749
733
|
}).entries
|
|
750
734
|
});
|
|
751
735
|
|
|
752
736
|
// src/request/types/walletMethods.ts
|
|
753
737
|
import * as v15 from "valibot";
|
|
738
|
+
|
|
739
|
+
// src/request/types/common.ts
|
|
740
|
+
import * as v14 from "valibot";
|
|
741
|
+
var walletTypes = ["software", "ledger", "keystone"];
|
|
742
|
+
var walletTypeSchema = v14.picklist(walletTypes);
|
|
743
|
+
|
|
744
|
+
// src/request/types/walletMethods.ts
|
|
754
745
|
var accountActionsSchema = v15.object({
|
|
755
746
|
read: v15.optional(v15.boolean())
|
|
756
747
|
});
|
|
@@ -848,24 +839,6 @@ var getAccountRequestMessageSchema = v15.object({
|
|
|
848
839
|
id: v15.string()
|
|
849
840
|
}).entries
|
|
850
841
|
});
|
|
851
|
-
var getNetworkMethodName = "wallet_getNetwork";
|
|
852
|
-
var getNetworkParamsSchema = v15.nullish(v15.null());
|
|
853
|
-
var getNetworkResultSchema = v15.object({
|
|
854
|
-
bitcoin: v15.object({
|
|
855
|
-
name: v15.picklist(networkType)
|
|
856
|
-
}),
|
|
857
|
-
stacks: v15.object({
|
|
858
|
-
name: v15.string()
|
|
859
|
-
})
|
|
860
|
-
});
|
|
861
|
-
var getNetworkRequestMessageSchema = v15.object({
|
|
862
|
-
...rpcRequestMessageSchema.entries,
|
|
863
|
-
...v15.object({
|
|
864
|
-
method: v15.literal(getNetworkMethodName),
|
|
865
|
-
params: getNetworkParamsSchema,
|
|
866
|
-
id: v15.string()
|
|
867
|
-
}).entries
|
|
868
|
-
});
|
|
869
842
|
var connectMethodName = "wallet_connect";
|
|
870
843
|
var connectParamsSchema = v15.nullish(
|
|
871
844
|
v15.object({
|
|
@@ -876,12 +849,7 @@ var connectParamsSchema = v15.nullish(
|
|
|
876
849
|
)
|
|
877
850
|
})
|
|
878
851
|
);
|
|
879
|
-
var connectResultSchema =
|
|
880
|
-
id: v15.string(),
|
|
881
|
-
addresses: v15.array(addressSchema),
|
|
882
|
-
walletType: walletTypeSchema,
|
|
883
|
-
network: getNetworkResultSchema
|
|
884
|
-
});
|
|
852
|
+
var connectResultSchema = getAccountResultSchema;
|
|
885
853
|
var connectRequestMessageSchema = v15.object({
|
|
886
854
|
...rpcRequestMessageSchema.entries,
|
|
887
855
|
...v15.object({
|
|
@@ -890,6 +858,25 @@ var connectRequestMessageSchema = v15.object({
|
|
|
890
858
|
id: v15.string()
|
|
891
859
|
}).entries
|
|
892
860
|
});
|
|
861
|
+
var getNetworkMethodName = "wallet_getNetwork";
|
|
862
|
+
var getNetworkParamsSchema = v15.nullish(v15.null());
|
|
863
|
+
var networkType = ["Mainnet", "Testnet", "Testnet4", "Signet", "Regtest"];
|
|
864
|
+
var getNetworkResultSchema = v15.object({
|
|
865
|
+
bitcoin: v15.object({
|
|
866
|
+
name: v15.picklist(networkType)
|
|
867
|
+
}),
|
|
868
|
+
stacks: v15.object({
|
|
869
|
+
name: v15.string()
|
|
870
|
+
})
|
|
871
|
+
});
|
|
872
|
+
var getNetworkRequestMessageSchema = v15.object({
|
|
873
|
+
...rpcRequestMessageSchema.entries,
|
|
874
|
+
...v15.object({
|
|
875
|
+
method: v15.literal(getNetworkMethodName),
|
|
876
|
+
params: getNetworkParamsSchema,
|
|
877
|
+
id: v15.string()
|
|
878
|
+
}).entries
|
|
879
|
+
});
|
|
893
880
|
|
|
894
881
|
// src/request/types/runesMethods/etch.ts
|
|
895
882
|
import * as v16 from "valibot";
|
|
@@ -1633,13 +1620,15 @@ var UnisatAdapter = class extends SatsConnectAdapter {
|
|
|
1633
1620
|
address,
|
|
1634
1621
|
publicKey: pk,
|
|
1635
1622
|
addressType,
|
|
1636
|
-
purpose: "payment" /* Payment
|
|
1623
|
+
purpose: "payment" /* Payment */,
|
|
1624
|
+
walletType: "software"
|
|
1637
1625
|
};
|
|
1638
1626
|
const ordinalsAddress = {
|
|
1639
1627
|
address,
|
|
1640
1628
|
publicKey: pk,
|
|
1641
1629
|
addressType,
|
|
1642
|
-
purpose: "ordinals" /* Ordinals
|
|
1630
|
+
purpose: "ordinals" /* Ordinals */,
|
|
1631
|
+
walletType: "software"
|
|
1643
1632
|
};
|
|
1644
1633
|
const response = [];
|
|
1645
1634
|
if (purposes.includes("payment" /* Payment */)) {
|
|
@@ -2106,7 +2095,6 @@ export {
|
|
|
2106
2095
|
isProviderInstalled,
|
|
2107
2096
|
networkChangeEventName,
|
|
2108
2097
|
networkChangeSchema,
|
|
2109
|
-
networkType,
|
|
2110
2098
|
permission,
|
|
2111
2099
|
removeDefaultProvider,
|
|
2112
2100
|
renouncePermissionsMethodName,
|