import * as v from "valibot"; //#region src/sat-connect-core/walletMethods.advanced.d.ts declare const walletTypes: readonly ["software", "ledger"]; declare const walletTypeSchema: v.PicklistSchema; type WalletType = v.InferOutput; declare const requestPermissionsMethodName = "wallet_requestPermissions"; declare const requestPermissionsParamsSchema: v.UndefinedSchema; declare const requestPermissionsResultSchema: v.LiteralSchema; declare const requestPermissionsRequestMessageSchema: v.ObjectSchema<{ readonly method: v.LiteralSchema<"wallet_requestPermissions", undefined>; readonly params: v.UndefinedSchema; readonly id: v.StringSchema; readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; }, undefined>; type RequestPermissions = MethodParamsAndResult, v.InferOutput>; declare const renouncePermissionsMethodName = "wallet_renouncePermissions"; declare const renouncePermissionsParamsSchema: v.UndefinedSchema; declare const renouncePermissionsResultSchema: v.LiteralSchema; declare const renouncePermissionsRequestMessageSchema: v.ObjectSchema<{ readonly method: v.LiteralSchema<"wallet_renouncePermissions", undefined>; readonly params: v.UndefinedSchema; readonly id: v.StringSchema; readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; }, undefined>; type RenouncePermissions = MethodParamsAndResult, v.InferOutput>; declare const getWalletTypeMethodName = "wallet_getWalletType"; declare const getWalletTypeParamsSchema: v.NullishSchema, undefined>; declare const getWalletTypeResultSchema: v.PicklistSchema; declare const getWalletTypeRequestMessageSchema: v.ObjectSchema<{ readonly method: v.LiteralSchema<"wallet_getWalletType", undefined>; readonly id: v.StringSchema; readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; readonly params: v.OptionalSchema, v.LooseObjectSchema<{}, undefined>, v.NullSchema], undefined>, undefined>; }, undefined>; type GetWalletType = MethodParamsAndResult, v.InferOutput>; type WalletNetworkName = "Mainnet" | "Testnet4" | "Signet" | "Regtest"; type GetNetwork = MethodParamsAndResult; type ChangeNetwork = MethodParamsAndResult<{ name: WalletNetworkName; }, null>; //#endregion //#region src/sat-connect-core/requests.advanced.d.ts interface BtcRequests { getInfo: GetInfo; getAddresses: GetAddresses; getAccounts: GetAccounts; getBalance: GetBalance; signMessage: SignMessage; sendTransfer: SendTransfer; signPsbt: SignPsbt; } type BtcRequestMethod = keyof BtcRequests; interface WalletRequests { wallet_requestPermissions: RequestPermissions; wallet_renouncePermissions: RenouncePermissions; wallet_getWalletType: GetWalletType; wallet_getNetwork: GetNetwork; wallet_changeNetwork: ChangeNetwork; } type Requests = BtcRequests & WalletRequests; type Return = Method extends keyof Requests ? Requests[Method]["result"] : never; type Params = Method extends keyof Requests ? Requests[Method]["params"] : never; //#endregion //#region src/sat-connect-core/provider.advanced.d.ts declare const accountChangeEventName = "accountChange"; declare const accountChangeSchema: v.ObjectSchema<{ readonly type: v.LiteralSchema<"accountChange", undefined>; }, undefined>; type AccountChangeEvent = v.InferOutput; declare const networkChangeEventName = "networkChange"; declare const networkChangeSchema: v.ObjectSchema<{ readonly type: v.LiteralSchema<"networkChange", undefined>; }, undefined>; type NetworkChangeEvent = v.InferOutput; declare const disconnectEventName = "disconnect"; declare const disconnectSchema: v.ObjectSchema<{ readonly type: v.LiteralSchema<"disconnect", undefined>; }, undefined>; type DisconnectEvent = v.InferOutput; declare const walletEventSchema: v.VariantSchema<"type", [v.ObjectSchema<{ readonly type: v.LiteralSchema<"accountChange", undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"networkChange", undefined>; }, undefined>, v.ObjectSchema<{ readonly type: v.LiteralSchema<"disconnect", undefined>; }, undefined>], undefined>; type WalletEvent = v.InferOutput; type AddListener = (eventName: WalletEventName, cb: (event: Extract) => void) => () => void; /** * Interface representing a provider for interacting with accounts and signing messages. */ interface BtcProvider { request: (method: Method, options: Params, providerId?: string) => Promise>; addListener: AddListener; } interface Provider { id: string; name: string; icon: string; webUrl?: string; chromeWebStoreUrl?: string; mozillaAddOnsUrl?: string; googlePlayStoreUrl?: string; iOSAppStoreUrl?: string; methods?: string[]; } //#endregion //#region src/sat-connect-core/types.advanced.d.ts declare enum BitcoinNetworkType { Mainnet = "Mainnet", Testnet = "Testnet", Signet = "Signet" } interface BitcoinNetwork { type: BitcoinNetworkType; address?: string; } interface RequestPayload { network: BitcoinNetwork; } interface RequestOptions { onFinish: (response: Response) => void; onCancel: () => void; payload: Payload; getProvider?: () => Promise; } declare const RpcIdSchema: v.OptionalSchema, v.NumberSchema, v.NullSchema], undefined>, undefined>; type RpcId = v.InferOutput; declare const rpcRequestMessageSchema: v.ObjectSchema<{ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; readonly method: v.StringSchema; readonly params: v.OptionalSchema, v.LooseObjectSchema<{}, undefined>, v.NullSchema], undefined>, undefined>; readonly id: v.OptionalSchema, v.NumberSchema, v.NullSchema], undefined>, undefined>; }, undefined>; type RpcRequestMessage = v.InferOutput; interface RpcBase { jsonrpc: "2.0"; id: RpcId; } interface RpcRequest extends RpcBase { method: T; params: U; } interface MethodParamsAndResult { params: TParams; result: TResult; } /** * @enum {number} RpcErrorCode * @description JSON-RPC error codes * @see https://www.jsonrpc.org/specification#error_object */ declare enum RpcErrorCode { /** * Parse error Invalid JSON **/ PARSE_ERROR = -32700, /** * The JSON sent is not a valid Request object. **/ INVALID_REQUEST = -32600, /** * The method does not exist/is not available. **/ METHOD_NOT_FOUND = -32601, /** * Invalid method parameter(s). */ INVALID_PARAMS = -32602, /** * Internal JSON-RPC error. * This is a generic error, used when the server encounters an error in performing the request. **/ INTERNAL_ERROR = -32603, /** * user rejected/canceled the request */ USER_REJECTION = -32000, /** * method is not supported for the address provided */ METHOD_NOT_SUPPORTED = -32001, /** * The client does not have permission to access the requested resource. */ ACCESS_DENIED = -32002 } declare const rpcSuccessResponseMessageSchema: v.ObjectSchema<{ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; readonly result: v.NonOptionalSchema; readonly id: v.OptionalSchema, v.NumberSchema, v.NullSchema], undefined>, undefined>; }, undefined>; type RpcSuccessResponseMessage = v.InferOutput; declare const rpcErrorResponseMessageSchema: v.ObjectSchema<{ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; readonly error: v.NonOptionalSchema; readonly id: v.OptionalSchema, v.NumberSchema, v.NullSchema], undefined>, undefined>; }, undefined>; type RpcErrorResponseMessage = v.InferOutput; declare const rpcResponseMessageSchema: v.UnionSchema<[v.ObjectSchema<{ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; readonly result: v.NonOptionalSchema; readonly id: v.OptionalSchema, v.NumberSchema, v.NullSchema], undefined>, undefined>; }, undefined>, v.ObjectSchema<{ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; readonly error: v.NonOptionalSchema; readonly id: v.OptionalSchema, v.NumberSchema, v.NullSchema], undefined>, undefined>; }, undefined>], undefined>; type RpcResponseMessage = v.InferOutput; interface RpcError { code: number | RpcErrorCode; message: string; data?: any; } interface RpcErrorResponse extends RpcBase { error: TError; } interface RpcSuccessResponse extends RpcBase { result: Return; } type RpcResponse = RpcSuccessResponse | RpcErrorResponse; type RpcResult = { result: RpcSuccessResponse["result"]; status: "success"; } | { error: RpcErrorResponse["error"]; status: "error"; }; //#endregion //#region src/sat-connect-core/btcMethods.advanced.d.ts declare enum AddressPurpose { Ordinals = "ordinals", Payment = "payment", Stacks = "stacks" } declare enum AddressType { p2pkh = "p2pkh", p2sh = "p2sh", p2wpkh = "p2wpkh", p2wsh = "p2wsh", p2tr = "p2tr", stacks = "stacks" } declare const addressSchema: v.ObjectSchema<{ readonly address: v.StringSchema; readonly publicKey: v.StringSchema; readonly purpose: v.EnumSchema; readonly addressType: v.EnumSchema; }, undefined>; type Address = v.InferOutput; declare const getInfoMethodName = "getInfo"; declare const getInfoParamsSchema: v.NullishSchema, undefined>; type GetInfoParams = v.InferOutput; declare const getInfoResultSchema: v.ObjectSchema<{ /** * Version of the wallet. */ readonly version: v.StringSchema; /** * [WBIP](https://wbips.netlify.app/wbips/WBIP002) methods supported by the wallet. */ readonly methods: v.OptionalSchema, undefined>, undefined>; /** * List of WBIP standards supported by the wallet. Not currently used. */ readonly supports: v.ArraySchema, undefined>; }, undefined>; type GetInfoResult = v.InferOutput; declare const getInfoRequestMessageSchema: v.ObjectSchema<{ readonly method: v.LiteralSchema<"getInfo", undefined>; readonly params: v.NullishSchema, undefined>; readonly id: v.StringSchema; readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; }, undefined>; type GetInfoRequestMessage = v.InferOutput; type GetInfo = MethodParamsAndResult, v.InferOutput>; declare const getAddressesMethodName = "getAddresses"; declare const getAddressesParamsSchema: v.ObjectSchema<{ /** * The purposes for which to generate addresses. See * {@linkcode AddressPurpose} for available purposes. */ readonly purposes: v.ArraySchema, undefined>; /** * A message to be displayed to the user in the request prompt. */ readonly message: v.OptionalSchema, undefined>; }, undefined>; type GetAddressesParams = v.InferOutput; declare const getAddressesResultSchema: v.ObjectSchema<{ /** * The addresses generated for the given purposes. */ readonly addresses: v.ArraySchema; readonly publicKey: v.StringSchema; readonly purpose: v.EnumSchema; readonly addressType: v.EnumSchema; }, undefined>, undefined>; }, undefined>; type GetAddressesResult = v.InferOutput; declare const getAddressesRequestMessageSchema: v.ObjectSchema<{ readonly method: v.LiteralSchema<"getAddresses", undefined>; readonly params: v.ObjectSchema<{ /** * The purposes for which to generate addresses. See * {@linkcode AddressPurpose} for available purposes. */ readonly purposes: v.ArraySchema, undefined>; /** * A message to be displayed to the user in the request prompt. */ readonly message: v.OptionalSchema, undefined>; }, undefined>; readonly id: v.StringSchema; readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; }, undefined>; type GetAddressesRequestMessage = v.InferOutput; type GetAddresses = MethodParamsAndResult, v.InferOutput>; declare const signMessageMethodName = "signMessage"; declare enum MessageSigningProtocols { ECDSA = "ECDSA", BIP322 = "BIP322" } declare const signMessageParamsSchema: v.ObjectSchema<{ /** * The address used for signing. **/ readonly address: v.StringSchema; /** * The message to sign. **/ readonly message: v.StringSchema; /** * The protocol to use for signing the message. */ readonly protocol: v.OptionalSchema, undefined>; }, undefined>; type SignMessageParams = v.InferOutput; declare const signMessageResultSchema: v.ObjectSchema<{ /** * The signature of the message. */ readonly signature: v.StringSchema; /** * hash of the message. */ readonly messageHash: v.StringSchema; /** * The address used for signing. */ readonly address: v.StringSchema; /** * The protocol to use for signing the message. */ readonly protocol: v.EnumSchema; }, undefined>; type SignMessageResult = v.InferOutput; declare const signMessageRequestMessageSchema: v.ObjectSchema<{ readonly method: v.LiteralSchema<"signMessage", undefined>; readonly params: v.ObjectSchema<{ /** * The address used for signing. **/ readonly address: v.StringSchema; /** * The message to sign. **/ readonly message: v.StringSchema; /** * The protocol to use for signing the message. */ readonly protocol: v.OptionalSchema, undefined>; }, undefined>; readonly id: v.StringSchema; readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; }, undefined>; type SignMessageRequestMessage = v.InferOutput; type SignMessage = MethodParamsAndResult, v.InferOutput>; type Recipient = { /** * The recipient's address. **/ address: string; /** * The amount to send to the recipient in satoshis. */ amount: number; }; type SendTransferParams = { /** * Array of recipients to send to. * The amount to send to each recipient is in satoshis. */ recipients: Array; }; type SendTransferResult = { /** * The transaction id as a hex-encoded string. */ txid: string; }; type SendTransfer = MethodParamsAndResult; type SignPsbtParams = { /** * The base64 encoded PSBT to sign. */ psbt: string; /** * The inputs to sign. * The key is the address and the value is an array of indexes of the inputs to sign. */ signInputs: Record; /** * the sigHash type to use for signing. * will default to the sighash type of the input if not provided. **/ allowedSignHash?: number; /** * Whether to broadcast the transaction after signing. **/ broadcast?: boolean; }; type SignPsbtResult = { /** * The base64 encoded PSBT after signing. */ psbt: string; /** * The transaction id as a hex-encoded string. * This is only returned if the transaction was broadcast. **/ txid?: string; }; type SignPsbt = MethodParamsAndResult; declare const getAccountsMethodName = "getAccounts"; declare const getAccountsParamsSchema: v.ObjectSchema<{ /** * The purposes for which to generate addresses. See * {@linkcode AddressPurpose} for available purposes. */ readonly purposes: v.ArraySchema, undefined>; /** * A message to be displayed to the user in the request prompt. */ readonly message: v.OptionalSchema, undefined>; }, undefined>; type GetAccountsParams = v.InferOutput; declare const getAccountsResultSchema: v.ArraySchema; readonly address: v.StringSchema; readonly publicKey: v.StringSchema; readonly purpose: v.EnumSchema; readonly addressType: v.EnumSchema; }, undefined>, undefined>; type GetAccountsResult = v.InferOutput; declare const getAccountsRequestMessageSchema: v.ObjectSchema<{ readonly method: v.LiteralSchema<"getAccounts", undefined>; readonly params: v.ObjectSchema<{ /** * The purposes for which to generate addresses. See * {@linkcode AddressPurpose} for available purposes. */ readonly purposes: v.ArraySchema, undefined>; /** * A message to be displayed to the user in the request prompt. */ readonly message: v.OptionalSchema, undefined>; }, undefined>; readonly id: v.StringSchema; readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; }, undefined>; type GetAccountsRequestMessage = v.InferOutput; type GetAccounts = MethodParamsAndResult, v.InferOutput>; declare const getBalanceMethodName = "getBalance"; declare const getBalanceParamsSchema: v.NullishSchema, undefined>; declare const getBalanceResultSchema: v.ObjectSchema<{ /** * The confirmed balance of the wallet in sats. Using a string due to chrome * messages not supporting bigint * (https://issues.chromium.org/issues/40116184). */ readonly confirmed: v.StringSchema; /** * The unconfirmed balance of the wallet in sats. Using a string due to chrome * messages not supporting bigint * (https://issues.chromium.org/issues/40116184). */ readonly unconfirmed: v.StringSchema; /** * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in * sats. Using a string due to chrome messages not supporting bigint * (https://issues.chromium.org/issues/40116184). */ readonly total: v.StringSchema; }, undefined>; declare const getBalanceRequestMessageSchema: v.ObjectSchema<{ readonly method: v.LiteralSchema<"getBalance", undefined>; readonly id: v.StringSchema; readonly jsonrpc: v.LiteralSchema<"2.0", undefined>; readonly params: v.OptionalSchema, v.LooseObjectSchema<{}, undefined>, v.NullSchema], undefined>, undefined>; }, undefined>; type GetBalance = MethodParamsAndResult, v.InferOutput>; declare namespace advancedBarrel_d_exports { export { AccountChangeEvent, AddListener, Address, AddressPurpose, AddressType, BitcoinNetwork, BitcoinNetworkType, BtcProvider, BtcRequestMethod, BtcRequests, ChangeNetwork, DisconnectEvent, GetAccounts, GetAccountsParams, GetAccountsRequestMessage, GetAccountsResult, GetAddresses, GetAddressesParams, GetAddressesRequestMessage, GetAddressesResult, GetBalance, GetInfo, GetInfoParams, GetInfoRequestMessage, GetInfoResult, GetNetwork, GetWalletType, MessageSigningProtocols, MethodParamsAndResult, NetworkChangeEvent, Params, Provider, RenouncePermissions, RequestOptions, RequestPayload, RequestPermissions, Requests, Return, RpcBase, RpcError, RpcErrorCode, RpcErrorResponse, RpcErrorResponseMessage, RpcId, RpcIdSchema, RpcRequest, RpcRequestMessage, RpcResponse, RpcResponseMessage, RpcResult, RpcSuccessResponse, RpcSuccessResponseMessage, SendTransfer, SendTransferParams, SignMessage, SignMessageParams, SignMessageRequestMessage, SignMessageResult, SignPsbt, SignPsbtParams, SignPsbtResult, WalletEvent, WalletNetworkName, WalletRequests, WalletType, accountChangeEventName, accountChangeSchema, addressSchema, disconnectEventName, disconnectSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getInfoMethodName, getInfoParamsSchema, getInfoRequestMessageSchema, getInfoResultSchema, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, networkChangeEventName, networkChangeSchema, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, walletEventSchema, walletTypeSchema, walletTypes }; } //#endregion export { RequestPayload as $, requestPermissionsMethodName as $t, getAccountsParamsSchema as A, networkChangeSchema as At, getBalanceResultSchema as B, GetWalletType as Bt, SignMessageRequestMessage as C, Provider as Ct, SignPsbtResult as D, disconnectEventName as Dt, SignPsbtParams as E, accountChangeSchema as Et, getAddressesRequestMessageSchema as F, Requests as Ft, signMessageMethodName as G, getWalletTypeMethodName as Gt, getInfoParamsSchema as H, RequestPermissions as Ht, getAddressesResultSchema as I, Return as It, signMessageResultSchema as J, getWalletTypeResultSchema as Jt, signMessageParamsSchema as K, getWalletTypeParamsSchema as Kt, getBalanceMethodName as L, WalletRequests as Lt, getAccountsResultSchema as M, BtcRequestMethod as Mt, getAddressesMethodName as N, BtcRequests as Nt, addressSchema as O, disconnectSchema as Ot, getAddressesParamsSchema as P, Params as Pt, RequestOptions as Q, renouncePermissionsResultSchema as Qt, getBalanceParamsSchema as R, ChangeNetwork as Rt, SignMessageParams as S, NetworkChangeEvent as St, SignPsbt as T, accountChangeEventName as Tt, getInfoRequestMessageSchema as U, WalletNetworkName as Ut, getInfoMethodName as V, RenouncePermissions as Vt, getInfoResultSchema as W, WalletType as Wt, BitcoinNetworkType as X, renouncePermissionsParamsSchema as Xt, BitcoinNetwork as Y, renouncePermissionsMethodName as Yt, MethodParamsAndResult as Z, renouncePermissionsRequestMessageSchema as Zt, GetInfoResult as _, rpcSuccessResponseMessageSchema as _t, GetAccounts as a, RpcId as at, SendTransferParams as b, BtcProvider as bt, GetAccountsResult as c, RpcRequestMessage as ct, GetAddressesRequestMessage as d, RpcResult as dt, requestPermissionsParamsSchema as en, RpcBase as et, GetAddressesResult as f, RpcSuccessResponse as ft, GetInfoRequestMessage as g, rpcResponseMessageSchema as gt, GetInfoParams as h, rpcRequestMessageSchema as ht, AddressType as i, walletTypes as in, RpcErrorResponseMessage as it, getAccountsRequestMessageSchema as j, walletEventSchema as jt, getAccountsMethodName as k, networkChangeEventName as kt, GetAddresses as l, RpcResponse as lt, GetInfo as m, rpcErrorResponseMessageSchema as mt, Address as n, requestPermissionsResultSchema as nn, RpcErrorCode as nt, GetAccountsParams as o, RpcIdSchema as ot, GetBalance as p, RpcSuccessResponseMessage as pt, signMessageRequestMessageSchema as q, getWalletTypeRequestMessageSchema as qt, AddressPurpose as r, walletTypeSchema as rn, RpcErrorResponse as rt, GetAccountsRequestMessage as s, RpcRequest as st, advancedBarrel_d_exports as t, requestPermissionsRequestMessageSchema as tn, RpcError as tt, GetAddressesParams as u, RpcResponseMessage as ut, MessageSigningProtocols as v, AccountChangeEvent as vt, SignMessageResult as w, WalletEvent as wt, SignMessage as x, DisconnectEvent as xt, SendTransfer as y, AddListener as yt, getBalanceRequestMessageSchema as z, GetNetwork as zt }; //# sourceMappingURL=advancedBarrel-X2l53C3a.d.mts.map