@sats-connect/core 0.0.11-65f0852 → 0.0.11-6cb912b

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 CHANGED
@@ -492,18 +492,23 @@ declare const getBalanceMethodName = "getBalance";
492
492
  declare const getBalanceParamsSchema: v.UndefinedSchema<undefined>;
493
493
  declare const getBalanceResultSchema: v.ObjectSchema<{
494
494
  /**
495
- * The confirmed balance of the wallet in sats.
495
+ * The confirmed balance of the wallet in sats. Using a string due to chrome
496
+ * messages not supporting bigint
497
+ * (https://issues.chromium.org/issues/40116184).
496
498
  */
497
- readonly confirmed: v.BigintSchema<undefined>;
499
+ readonly confirmed: v.StringSchema<undefined>;
498
500
  /**
499
- * The unconfirmed balance of the wallet in sats.
501
+ * The unconfirmed balance of the wallet in sats. Using a string due to chrome
502
+ * messages not supporting bigint
503
+ * (https://issues.chromium.org/issues/40116184).
500
504
  */
501
- readonly unconfirmed: v.BigintSchema<undefined>;
505
+ readonly unconfirmed: v.StringSchema<undefined>;
502
506
  /**
503
507
  * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
504
- * sats.
508
+ * sats. Using a string due to chrome messages not supporting bigint
509
+ * (https://issues.chromium.org/issues/40116184).
505
510
  */
506
- readonly total: v.BigintSchema<undefined>;
511
+ readonly total: v.StringSchema<undefined>;
507
512
  }, undefined>;
508
513
  declare const getBalanceRequestMessageSchema: v.ObjectSchema<{
509
514
  readonly method: v.LiteralSchema<"getBalance", undefined>;
@@ -823,26 +828,26 @@ type SignTransactionParams = Transaction & Partial<Pubkey>;
823
828
  type SignTransactionResult = Transaction;
824
829
  type StxSignTransaction = MethodParamsAndResult<SignTransactionParams, SignTransactionResult>;
825
830
 
826
- declare const connectMethodName = "wallet_connect";
827
- declare const connectParamsSchema: v.UndefinedSchema<undefined>;
828
- declare const connectResultSchema: v.LiteralSchema<true, undefined>;
829
- declare const connectSchema: v.ObjectSchema<{
830
- readonly method: v.LiteralSchema<"wallet_connect", undefined>;
831
+ declare const grantPermissionsMethodName = "wallet_requestPermissions";
832
+ declare const grantPermissionsParamsSchema: v.UndefinedSchema<undefined>;
833
+ declare const grantPermissionsResultSchema: v.LiteralSchema<true, undefined>;
834
+ declare const grantPermissionsRequestMessageSchema: v.ObjectSchema<{
835
+ readonly method: v.LiteralSchema<"wallet_requestPermissions", undefined>;
831
836
  readonly params: v.UndefinedSchema<undefined>;
832
837
  readonly id: v.StringSchema<undefined>;
833
838
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
834
839
  }, undefined>;
835
- type Connect = MethodParamsAndResult<v.InferOutput<typeof connectParamsSchema>, v.InferOutput<typeof connectResultSchema>>;
836
- declare const disconnectMethodName = "wallet_disconnect";
837
- declare const disconnectParamsSchema: v.UndefinedSchema<undefined>;
838
- declare const disconnectResultSchema: v.LiteralSchema<true, undefined>;
839
- declare const disconnectSchema: v.ObjectSchema<{
840
- readonly method: v.LiteralSchema<"wallet_disconnect", undefined>;
840
+ type RequestPermissions = MethodParamsAndResult<v.InferOutput<typeof grantPermissionsParamsSchema>, v.InferOutput<typeof grantPermissionsResultSchema>>;
841
+ declare const renouncePermissionsMethodName = "wallet_renouncePermissions";
842
+ declare const renouncePermissionsParamsSchema: v.UndefinedSchema<undefined>;
843
+ declare const renouncePermissionsResultSchema: v.LiteralSchema<true, undefined>;
844
+ declare const renouncePermissionsRequestMessageSchema: v.ObjectSchema<{
845
+ readonly method: v.LiteralSchema<"wallet_renouncePermissions", undefined>;
841
846
  readonly params: v.UndefinedSchema<undefined>;
842
847
  readonly id: v.StringSchema<undefined>;
843
848
  readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
844
849
  }, undefined>;
845
- type Disconnect = MethodParamsAndResult<v.InferOutput<typeof disconnectParamsSchema>, v.InferOutput<typeof disconnectResultSchema>>;
850
+ type RenouncePermissions = MethodParamsAndResult<v.InferOutput<typeof renouncePermissionsParamsSchema>, v.InferOutput<typeof renouncePermissionsResultSchema>>;
846
851
 
847
852
  interface StxRequests {
848
853
  stx_callContract: StxCallContract;
@@ -877,8 +882,8 @@ interface RunesRequests {
877
882
  }
878
883
  type RunesRequestMethod = keyof RunesRequests;
879
884
  interface WalletMethods {
880
- wallet_connect: Connect;
881
- wallet_disconnect: Disconnect;
885
+ wallet_requestPermissions: RequestPermissions;
886
+ wallet_renouncePermissions: RenouncePermissions;
882
887
  }
883
888
  type Requests = BtcRequests & StxRequests & RunesRequests & WalletMethods;
884
889
  type Return<Method> = Method extends keyof Requests ? Requests[Method]['result'] : never;
@@ -908,4 +913,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
908
913
  declare const DefaultAdaptersInfo: Record<string, Provider>;
909
914
  declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
910
915
 
911
- export { type Address$1 as Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type CallContractParams, type CallContractResult, type Capability, type Connect, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type DeployContractParams, type DeployContractResult, type Disconnect, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, type GetAccounts, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesResult, type GetBalance, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetInfo, type GetOrder, type GetRunesBalance, type InputToSign, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type Params, type Provider, type PsbtPayload, type RbfOrder, type Recipient$2 as Recipient, type RequestOptions, type RequestPayload, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendTransfer, type SendTransferParams, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessagePayload, type SignMessageResponse, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtResult, type SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionParams, type SignTransactionPayload, type SignTransactionResponse, type SignTransactionResult, type StxCallContract, type StxDeployContract, type StxGetAccounts, type StxGetAddresses, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxTransferStx, type SupportedWallet, type TransferStxParams, type TransferStxResult, type WalletMethods, addressSchema, connectMethodName, connectParamsSchema, connectResultSchema, connectSchema, createInscription, createRepeatInscriptions, defaultAdapters, disconnectMethodName, disconnectParamsSchema, disconnectResultSchema, disconnectSchema, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoResultSchema, getInfoSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, isProviderInstalled, removeDefaultProvider, request, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signTransaction };
916
+ export { type Address$1 as Address, AddressPurpose, AddressType, BaseAdapter, type BitcoinNetwork, BitcoinNetworkType, type BitcoinProvider, type BtcRequestMethod, type BtcRequests, type CallContractParams, type CallContractResult, type Capability, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type DeployContractParams, type DeployContractResult, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, type GetAccounts, type GetAccountsResult, type GetAddressOptions, type GetAddressPayload, type GetAddressResponse, type GetAddresses, type GetAddressesParams, type GetAddressesResult, type GetBalance, type GetCapabilitiesOptions, type GetCapabilitiesPayload, type GetCapabilitiesResponse, type GetInfo, type GetOrder, type GetRunesBalance, type InputToSign, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type Params, type Provider, type PsbtPayload, type RbfOrder, type Recipient$2 as Recipient, type RenouncePermissions, type RequestOptions, type RequestPayload, type RequestPermissions, type Requests, type Return, type RpcBase, type RpcError, RpcErrorCode, type RpcErrorResponse, type RpcErrorResponseMessage, type RpcId, RpcIdSchema, type RpcRequest, type RpcRequestMessage, type RpcResponse, type RpcResponseMessage, type RpcResult, type RpcSuccessResponse, type RpcSuccessResponseMessage, type RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendTransfer, type SendTransferParams, type SerializedRecipient, type SerializedSendBtcTransactionPayload, type SignMessage, type SignMessageOptions, type SignMessagePayload, type SignMessageResponse, type SignMultiplePsbtPayload, type SignMultipleTransactionOptions, type SignMultipleTransactionsPayload, type SignMultipleTransactionsResponse, type SignPsbt, type SignPsbtParams, type SignPsbtResult, type SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionParams, type SignTransactionPayload, type SignTransactionResponse, type SignTransactionResult, type StxCallContract, type StxDeployContract, type StxGetAccounts, type StxGetAddresses, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxTransferStx, type SupportedWallet, type TransferStxParams, type TransferStxResult, type WalletMethods, addressSchema, createInscription, createRepeatInscriptions, defaultAdapters, getAccountsMethodName, getAccountsParamsSchema, getAccountsRequestMessageSchema, getAccountsResultSchema, getAddress, getAddressesMethodName, getAddressesParamsSchema, getAddressesRequestMessageSchema, getAddressesResultSchema, getBalanceMethodName, getBalanceParamsSchema, getBalanceRequestMessageSchema, getBalanceResultSchema, getCapabilities, getDefaultProvider, getInfoMethodName, getInfoParamsSchema, getInfoResultSchema, getInfoSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, grantPermissionsMethodName, grantPermissionsParamsSchema, grantPermissionsRequestMessageSchema, grantPermissionsResultSchema, isProviderInstalled, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signTransaction };
package/dist/index.mjs CHANGED
@@ -672,18 +672,23 @@ var getBalanceMethodName = "getBalance";
672
672
  var getBalanceParamsSchema = v3.undefined();
673
673
  var getBalanceResultSchema = v3.object({
674
674
  /**
675
- * The confirmed balance of the wallet in sats.
675
+ * The confirmed balance of the wallet in sats. Using a string due to chrome
676
+ * messages not supporting bigint
677
+ * (https://issues.chromium.org/issues/40116184).
676
678
  */
677
- confirmed: v3.bigint(),
679
+ confirmed: v3.string(),
678
680
  /**
679
- * The unconfirmed balance of the wallet in sats.
681
+ * The unconfirmed balance of the wallet in sats. Using a string due to chrome
682
+ * messages not supporting bigint
683
+ * (https://issues.chromium.org/issues/40116184).
680
684
  */
681
- unconfirmed: v3.bigint(),
685
+ unconfirmed: v3.string(),
682
686
  /**
683
687
  * The total balance (both confirmed and unconfrimed UTXOs) of the wallet in
684
- * sats.
688
+ * sats. Using a string due to chrome messages not supporting bigint
689
+ * (https://issues.chromium.org/issues/40116184).
685
690
  */
686
- total: v3.bigint()
691
+ total: v3.string()
687
692
  });
688
693
  var getBalanceRequestMessageSchema = v3.object({
689
694
  ...rpcRequestMessageSchema.entries,
@@ -695,25 +700,25 @@ var getBalanceRequestMessageSchema = v3.object({
695
700
 
696
701
  // src/request/types/walletMethods.ts
697
702
  import * as v4 from "valibot";
698
- var connectMethodName = "wallet_connect";
699
- var connectParamsSchema = v4.undefined();
700
- var connectResultSchema = v4.literal(true);
701
- var connectSchema = v4.object({
703
+ var grantPermissionsMethodName = "wallet_requestPermissions";
704
+ var grantPermissionsParamsSchema = v4.undefined();
705
+ var grantPermissionsResultSchema = v4.literal(true);
706
+ var grantPermissionsRequestMessageSchema = v4.object({
702
707
  ...rpcRequestMessageSchema.entries,
703
708
  ...v4.object({
704
- method: v4.literal(connectMethodName),
705
- params: connectParamsSchema,
709
+ method: v4.literal(grantPermissionsMethodName),
710
+ params: grantPermissionsParamsSchema,
706
711
  id: v4.string()
707
712
  }).entries
708
713
  });
709
- var disconnectMethodName = "wallet_disconnect";
710
- var disconnectParamsSchema = v4.undefined();
711
- var disconnectResultSchema = v4.literal(true);
712
- var disconnectSchema = v4.object({
714
+ var renouncePermissionsMethodName = "wallet_renouncePermissions";
715
+ var renouncePermissionsParamsSchema = v4.undefined();
716
+ var renouncePermissionsResultSchema = v4.literal(true);
717
+ var renouncePermissionsRequestMessageSchema = v4.object({
713
718
  ...rpcRequestMessageSchema.entries,
714
719
  ...v4.object({
715
- method: v4.literal(disconnectMethodName),
716
- params: disconnectParamsSchema,
720
+ method: v4.literal(renouncePermissionsMethodName),
721
+ params: renouncePermissionsParamsSchema,
717
722
  id: v4.string()
718
723
  }).entries
719
724
  });
@@ -1194,17 +1199,9 @@ export {
1194
1199
  RpcIdSchema,
1195
1200
  SatsConnectAdapter,
1196
1201
  addressSchema,
1197
- connectMethodName,
1198
- connectParamsSchema,
1199
- connectResultSchema,
1200
- connectSchema,
1201
1202
  createInscription,
1202
1203
  createRepeatInscriptions,
1203
1204
  defaultAdapters,
1204
- disconnectMethodName,
1205
- disconnectParamsSchema,
1206
- disconnectResultSchema,
1207
- disconnectSchema,
1208
1205
  getAccountsMethodName,
1209
1206
  getAccountsParamsSchema,
1210
1207
  getAccountsRequestMessageSchema,
@@ -1232,8 +1229,16 @@ export {
1232
1229
  getRunesBalanceRequestMessageSchema,
1233
1230
  getRunesBalanceResultSchema,
1234
1231
  getSupportedWallets,
1232
+ grantPermissionsMethodName,
1233
+ grantPermissionsParamsSchema,
1234
+ grantPermissionsRequestMessageSchema,
1235
+ grantPermissionsResultSchema,
1235
1236
  isProviderInstalled,
1236
1237
  removeDefaultProvider,
1238
+ renouncePermissionsMethodName,
1239
+ renouncePermissionsParamsSchema,
1240
+ renouncePermissionsRequestMessageSchema,
1241
+ renouncePermissionsResultSchema,
1237
1242
  request,
1238
1243
  rpcErrorResponseMessageSchema,
1239
1244
  rpcRequestMessageSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.0.11-65f0852",
3
+ "version": "0.0.11-6cb912b",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",