@sats-connect/core 0.4.0-e8e6a66 → 0.4.0-ff58e17

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
@@ -502,6 +502,7 @@ declare const signPsbtParamsSchema: v.ObjectSchema<{
502
502
  * The key is the address and the value is an array of indexes of the inputs to sign.
503
503
  */
504
504
  readonly signInputs: v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
505
+ readonly allowedSignHash: v.OptionalSchema<v.NumberSchema<undefined>, never>;
505
506
  /**
506
507
  * Whether to broadcast the transaction after signing.
507
508
  **/
@@ -532,6 +533,7 @@ declare const signPsbtRequestMessageSchema: v.ObjectSchema<{
532
533
  * The key is the address and the value is an array of indexes of the inputs to sign.
533
534
  */
534
535
  readonly signInputs: v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
536
+ readonly allowedSignHash: v.OptionalSchema<v.NumberSchema<undefined>, never>;
535
537
  /**
536
538
  * Whether to broadcast the transaction after signing.
537
539
  **/
@@ -939,20 +941,21 @@ interface Domain {
939
941
  */
940
942
  domain: string;
941
943
  }
942
- interface CallContractParams {
944
+ declare const stxCallContractMethodName = "stx_callContract";
945
+ declare const stxCallContractParamsSchema: v.ObjectSchema<{
943
946
  /**
944
- * The contract's Crockford base-32 encoded Stacks address and name.
947
+ * The contract principal.
945
948
  *
946
949
  * E.g. `"SPKE...GD5C.my-contract"`
947
950
  */
948
- contract: string;
951
+ readonly contract: v.StringSchema<undefined>;
949
952
  /**
950
953
  * The name of the function to call.
951
954
  *
952
955
  * Note: spec changes ongoing,
953
956
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
954
957
  */
955
- functionName: string;
958
+ readonly functionName: v.StringSchema<undefined>;
956
959
  /**
957
960
  * The function's arguments. The arguments are expected to be hex-encoded
958
961
  * strings of Clarity values.
@@ -967,10 +970,57 @@ interface CallContractParams {
967
970
  * const hexArgs = functionArgs.map(cvToString);
968
971
  * ```
969
972
  */
970
- arguments?: Array<string>;
971
- }
972
- type CallContractResult = TxId & Transaction;
973
- type StxCallContract = MethodParamsAndResult<CallContractParams, CallContractResult>;
973
+ readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
974
+ }, undefined>;
975
+ type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
976
+ declare const stxCallContractResultSchema: v.ObjectSchema<{
977
+ /**
978
+ * The ID of the transaction.
979
+ */
980
+ readonly txid: v.StringSchema<undefined>;
981
+ /**
982
+ * A Stacks transaction as a hex-encoded string.
983
+ */
984
+ readonly transaction: v.StringSchema<undefined>;
985
+ }, undefined>;
986
+ type StxCallContractResult = v.InferOutput<typeof stxCallContractResultSchema>;
987
+ declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
988
+ readonly method: v.LiteralSchema<"stx_callContract", undefined>;
989
+ readonly params: v.ObjectSchema<{
990
+ /**
991
+ * The contract principal.
992
+ *
993
+ * E.g. `"SPKE...GD5C.my-contract"`
994
+ */
995
+ readonly contract: v.StringSchema<undefined>;
996
+ /**
997
+ * The name of the function to call.
998
+ *
999
+ * Note: spec changes ongoing,
1000
+ * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1001
+ */
1002
+ readonly functionName: v.StringSchema<undefined>;
1003
+ /**
1004
+ * The function's arguments. The arguments are expected to be hex-encoded
1005
+ * strings of Clarity values.
1006
+ *
1007
+ * To convert Clarity values to their hex representation, the `cvToString`
1008
+ * helper from the `@stacks/transactions` package may be helpful.
1009
+ *
1010
+ * ```js
1011
+ * import { cvToString } from '@stacks/transactions';
1012
+ *
1013
+ * const functionArgs = [someClarityValue1, someClarityValue2];
1014
+ * const hexArgs = functionArgs.map(cvToString);
1015
+ * ```
1016
+ */
1017
+ readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1018
+ }, undefined>;
1019
+ readonly id: v.StringSchema<undefined>;
1020
+ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1021
+ }, undefined>;
1022
+ type StxCallContractRequestMessage = v.InferOutput<typeof stxCallContractRequestMessageSchema>;
1023
+ type StxCallContract = MethodParamsAndResult<StxCallContractParams, StxCallContractResult>;
974
1024
  type TransferStxParams = Amount & Recipient & Partial<Memo> & Partial<ParameterFormatVersion> & Partial<PostConditionMode> & Partial<PostConditions> & Partial<Pubkey>;
975
1025
  type TransferStxResult = TxId & Transaction;
976
1026
  type StxTransferStx = MethodParamsAndResult<TransferStxParams, TransferStxResult>;
@@ -1648,4 +1698,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
1648
1698
  declare const DefaultAdaptersInfo: Record<string, Provider>;
1649
1699
  declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
1650
1700
 
1651
- export { type AccountChangeEvent, type AddListener, 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 ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type DeployContractParams, type DeployContractResult, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, 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 GetOrder, type GetRunesBalance, type GetRunesBalanceParams, type GetRunesBalanceRequestMessage, type GetRunesBalanceResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, type PermissionWithoutClientId, type Provider, type PsbtPayload, type RbfOrder, type Recipient$1 as 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 RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, 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 SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxDeployContract, type StxGetAccounts, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type SupportedWallet, type TransferRunes, type TransferRunesParams, type TransferRunesRequest, type TransferRunesResult, TransferRunesResultSchema, type TransferStxParams, type TransferStxResult, type WalletEvent, type WalletRequests, type WalletType, accountChangeEventName, accountChangeSchema, 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, getInscriptionsResultSchema, getInscriptionsSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permissionTemplate, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsResultSchema, sendInscriptionsSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, transferRunesMethodName, transferRunesParamsSchema, transferRunesRequestSchema, walletEventSchema, walletTypeSchema, walletTypes };
1701
+ export { type AccountChangeEvent, type AddListener, type Address$1 as 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 DeployContractParams, type DeployContractResult, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, 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 GetOrder, type GetRunesBalance, type GetRunesBalanceParams, type GetRunesBalanceRequestMessage, type GetRunesBalanceResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, type PermissionWithoutClientId, type Provider, type PsbtPayload, type RbfOrder, type Recipient$1 as 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 RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, 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 SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxGetAccounts, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type SupportedWallet, type TransferRunes, type TransferRunesParams, type TransferRunesRequest, type TransferRunesResult, TransferRunesResultSchema, type TransferStxParams, type TransferStxResult, type WalletEvent, type WalletRequests, type WalletType, accountChangeEventName, accountChangeSchema, 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, getInscriptionsResultSchema, getInscriptionsSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permissionTemplate, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsResultSchema, sendInscriptionsSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxCallContractMethodName, stxCallContractParamsSchema, stxCallContractRequestMessageSchema, stxCallContractResultSchema, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, transferRunesMethodName, transferRunesParamsSchema, transferRunesRequestSchema, walletEventSchema, walletTypeSchema, walletTypes };
package/dist/index.d.ts CHANGED
@@ -502,6 +502,7 @@ declare const signPsbtParamsSchema: v.ObjectSchema<{
502
502
  * The key is the address and the value is an array of indexes of the inputs to sign.
503
503
  */
504
504
  readonly signInputs: v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
505
+ readonly allowedSignHash: v.OptionalSchema<v.NumberSchema<undefined>, never>;
505
506
  /**
506
507
  * Whether to broadcast the transaction after signing.
507
508
  **/
@@ -532,6 +533,7 @@ declare const signPsbtRequestMessageSchema: v.ObjectSchema<{
532
533
  * The key is the address and the value is an array of indexes of the inputs to sign.
533
534
  */
534
535
  readonly signInputs: v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
536
+ readonly allowedSignHash: v.OptionalSchema<v.NumberSchema<undefined>, never>;
535
537
  /**
536
538
  * Whether to broadcast the transaction after signing.
537
539
  **/
@@ -939,20 +941,21 @@ interface Domain {
939
941
  */
940
942
  domain: string;
941
943
  }
942
- interface CallContractParams {
944
+ declare const stxCallContractMethodName = "stx_callContract";
945
+ declare const stxCallContractParamsSchema: v.ObjectSchema<{
943
946
  /**
944
- * The contract's Crockford base-32 encoded Stacks address and name.
947
+ * The contract principal.
945
948
  *
946
949
  * E.g. `"SPKE...GD5C.my-contract"`
947
950
  */
948
- contract: string;
951
+ readonly contract: v.StringSchema<undefined>;
949
952
  /**
950
953
  * The name of the function to call.
951
954
  *
952
955
  * Note: spec changes ongoing,
953
956
  * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
954
957
  */
955
- functionName: string;
958
+ readonly functionName: v.StringSchema<undefined>;
956
959
  /**
957
960
  * The function's arguments. The arguments are expected to be hex-encoded
958
961
  * strings of Clarity values.
@@ -967,10 +970,57 @@ interface CallContractParams {
967
970
  * const hexArgs = functionArgs.map(cvToString);
968
971
  * ```
969
972
  */
970
- arguments?: Array<string>;
971
- }
972
- type CallContractResult = TxId & Transaction;
973
- type StxCallContract = MethodParamsAndResult<CallContractParams, CallContractResult>;
973
+ readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
974
+ }, undefined>;
975
+ type StxCallContractParams = v.InferOutput<typeof stxCallContractParamsSchema>;
976
+ declare const stxCallContractResultSchema: v.ObjectSchema<{
977
+ /**
978
+ * The ID of the transaction.
979
+ */
980
+ readonly txid: v.StringSchema<undefined>;
981
+ /**
982
+ * A Stacks transaction as a hex-encoded string.
983
+ */
984
+ readonly transaction: v.StringSchema<undefined>;
985
+ }, undefined>;
986
+ type StxCallContractResult = v.InferOutput<typeof stxCallContractResultSchema>;
987
+ declare const stxCallContractRequestMessageSchema: v.ObjectSchema<{
988
+ readonly method: v.LiteralSchema<"stx_callContract", undefined>;
989
+ readonly params: v.ObjectSchema<{
990
+ /**
991
+ * The contract principal.
992
+ *
993
+ * E.g. `"SPKE...GD5C.my-contract"`
994
+ */
995
+ readonly contract: v.StringSchema<undefined>;
996
+ /**
997
+ * The name of the function to call.
998
+ *
999
+ * Note: spec changes ongoing,
1000
+ * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
1001
+ */
1002
+ readonly functionName: v.StringSchema<undefined>;
1003
+ /**
1004
+ * The function's arguments. The arguments are expected to be hex-encoded
1005
+ * strings of Clarity values.
1006
+ *
1007
+ * To convert Clarity values to their hex representation, the `cvToString`
1008
+ * helper from the `@stacks/transactions` package may be helpful.
1009
+ *
1010
+ * ```js
1011
+ * import { cvToString } from '@stacks/transactions';
1012
+ *
1013
+ * const functionArgs = [someClarityValue1, someClarityValue2];
1014
+ * const hexArgs = functionArgs.map(cvToString);
1015
+ * ```
1016
+ */
1017
+ readonly arguments: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, never>;
1018
+ }, undefined>;
1019
+ readonly id: v.StringSchema<undefined>;
1020
+ readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
1021
+ }, undefined>;
1022
+ type StxCallContractRequestMessage = v.InferOutput<typeof stxCallContractRequestMessageSchema>;
1023
+ type StxCallContract = MethodParamsAndResult<StxCallContractParams, StxCallContractResult>;
974
1024
  type TransferStxParams = Amount & Recipient & Partial<Memo> & Partial<ParameterFormatVersion> & Partial<PostConditionMode> & Partial<PostConditions> & Partial<Pubkey>;
975
1025
  type TransferStxResult = TxId & Transaction;
976
1026
  type StxTransferStx = MethodParamsAndResult<TransferStxParams, TransferStxResult>;
@@ -1648,4 +1698,4 @@ declare class BaseAdapter extends SatsConnectAdapter {
1648
1698
  declare const DefaultAdaptersInfo: Record<string, Provider>;
1649
1699
  declare const defaultAdapters: Record<string, new () => SatsConnectAdapter>;
1650
1700
 
1651
- export { type AccountChangeEvent, type AddListener, 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 ConnectParams, type ConnectRequestMessage, type ConnectResult, type CreateInscriptionOptions, type CreateInscriptionPayload, type CreateInscriptionResponse, type CreateRepeatInscriptionsOptions, type CreateRepeatInscriptionsPayload, type CreateRepeatInscriptionsResponse, DefaultAdaptersInfo, type DeployContractParams, type DeployContractResult, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, 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 GetOrder, type GetRunesBalance, type GetRunesBalanceParams, type GetRunesBalanceRequestMessage, type GetRunesBalanceResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, type PermissionWithoutClientId, type Provider, type PsbtPayload, type RbfOrder, type Recipient$1 as 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 RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, 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 SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxDeployContract, type StxGetAccounts, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type SupportedWallet, type TransferRunes, type TransferRunesParams, type TransferRunesRequest, type TransferRunesResult, TransferRunesResultSchema, type TransferStxParams, type TransferStxResult, type WalletEvent, type WalletRequests, type WalletType, accountChangeEventName, accountChangeSchema, 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, getInscriptionsResultSchema, getInscriptionsSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permissionTemplate, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsResultSchema, sendInscriptionsSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, transferRunesMethodName, transferRunesParamsSchema, transferRunesRequestSchema, walletEventSchema, walletTypeSchema, walletTypes };
1701
+ export { type AccountChangeEvent, type AddListener, type Address$1 as 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 DeployContractParams, type DeployContractResult, type Disconnect, type DisconnectEvent, type DisconnectParams, type DisconnectRequestMessage, type DisconnectResult, type EstimateRbfOrder, type EstimateRunesEtch, type EstimateRunesEtchParams, type EstimateRunesEtchResult, type EstimateRunesMint, type EstimateRunesMintParams, type EstimateRunesMintResult, type EtchRunes, type EtchRunesParams, type EtchRunesResult, 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 GetOrder, type GetRunesBalance, type GetRunesBalanceParams, type GetRunesBalanceRequestMessage, type GetRunesBalanceResult, type GetWalletType, type GetWalletTypeParams, type GetWalletTypeRequestMessage, type GetWalletTypeResult, type InputToSign, MessageSigningProtocols, type MethodParamsAndResult, type MintRunes, type MintRunesParams, type MintRunesResult, type NetworkChangeEvent, type OrdinalsRequestMethod, type OrdinalsRequests, type Params, type PermissionWithoutClientId, type Provider, type PsbtPayload, type RbfOrder, type Recipient$1 as 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 RunesRequestMethod, type RunesRequests, SatsConnectAdapter, type SendBtcTransactionOptions, type SendBtcTransactionPayload, type SendBtcTransactionResponse, type SendInscriptions, 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 SignStructuredMessageResult, type SignStxMessageParams, type SignStxMessageResult, type SignTransactionOptions, type SignTransactionPayload, type SignTransactionResponse, type StxCallContract, type StxCallContractParams, type StxCallContractRequestMessage, type StxCallContractResult, type StxDeployContract, type StxGetAccounts, type StxGetAccountsResult, type StxGetAddresses, type StxGetAddressesParams, type StxGetAddressesRequestMessage, type StxGetAddressesResult, type StxRequestMethod, type StxRequests, type StxSignStructuredMessage, type StxSignStxMessage, type StxSignTransaction, type StxSignTransactionParams, type StxSignTransactionRequestMessage, type StxSignTransactionResult, type StxTransferStx, type SupportedWallet, type TransferRunes, type TransferRunesParams, type TransferRunesRequest, type TransferRunesResult, TransferRunesResultSchema, type TransferStxParams, type TransferStxResult, type WalletEvent, type WalletRequests, type WalletType, accountChangeEventName, accountChangeSchema, 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, getInscriptionsResultSchema, getInscriptionsSchema, getProviderById, getProviderOrThrow, getProviders, getRunesBalanceMethodName, getRunesBalanceParamsSchema, getRunesBalanceRequestMessageSchema, getRunesBalanceResultSchema, getSupportedWallets, getWalletTypeMethodName, getWalletTypeParamsSchema, getWalletTypeRequestMessageSchema, getWalletTypeResultSchema, isProviderInstalled, networkChangeEventName, networkChangeSchema, permissionTemplate, removeDefaultProvider, renouncePermissionsMethodName, renouncePermissionsParamsSchema, renouncePermissionsRequestMessageSchema, renouncePermissionsResultSchema, request, requestPermissionsMethodName, requestPermissionsParamsSchema, requestPermissionsRequestMessageSchema, requestPermissionsResultSchema, rpcErrorResponseMessageSchema, rpcRequestMessageSchema, rpcResponseMessageSchema, rpcSuccessResponseMessageSchema, sendBtcTransaction, sendInscriptionsMethodName, sendInscriptionsParamsSchema, sendInscriptionsResultSchema, sendInscriptionsSchema, sendTransferMethodName, sendTransferParamsSchema, sendTransferRequestMessageSchema, sendTransferResultSchema, setDefaultProvider, signMessage, signMessageMethodName, signMessageParamsSchema, signMessageRequestMessageSchema, signMessageResultSchema, signMultipleTransactions, signPsbtMethodName, signPsbtParamsSchema, signPsbtRequestMessageSchema, signPsbtResultSchema, signTransaction, stxCallContractMethodName, stxCallContractParamsSchema, stxCallContractRequestMessageSchema, stxCallContractResultSchema, stxGetAddressesMethodName, stxGetAddressesParamsSchema, stxGetAddressesRequestMessageSchema, stxGetAddressesResultSchema, stxSignTransactionMethodName, stxSignTransactionParamsSchema, stxSignTransactionRequestMessageSchema, stxSignTransactionResultSchema, transferRunesMethodName, transferRunesParamsSchema, transferRunesRequestSchema, walletEventSchema, walletTypeSchema, walletTypes };
package/dist/index.js CHANGED
@@ -139,6 +139,10 @@ __export(src_exports, {
139
139
  signPsbtRequestMessageSchema: () => signPsbtRequestMessageSchema,
140
140
  signPsbtResultSchema: () => signPsbtResultSchema,
141
141
  signTransaction: () => signTransaction,
142
+ stxCallContractMethodName: () => stxCallContractMethodName,
143
+ stxCallContractParamsSchema: () => stxCallContractParamsSchema,
144
+ stxCallContractRequestMessageSchema: () => stxCallContractRequestMessageSchema,
145
+ stxCallContractResultSchema: () => stxCallContractResultSchema,
142
146
  stxGetAddressesMethodName: () => stxGetAddressesMethodName,
143
147
  stxGetAddressesParamsSchema: () => stxGetAddressesParamsSchema,
144
148
  stxGetAddressesRequestMessageSchema: () => stxGetAddressesRequestMessageSchema,
@@ -321,6 +325,55 @@ var getAddress = async (options) => {
321
325
  };
322
326
 
323
327
  // src/request/types/stxMethods.ts
328
+ var stxCallContractMethodName = "stx_callContract";
329
+ var stxCallContractParamsSchema = v4.object({
330
+ /**
331
+ * The contract principal.
332
+ *
333
+ * E.g. `"SPKE...GD5C.my-contract"`
334
+ */
335
+ contract: v4.string(),
336
+ /**
337
+ * The name of the function to call.
338
+ *
339
+ * Note: spec changes ongoing,
340
+ * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
341
+ */
342
+ functionName: v4.string(),
343
+ /**
344
+ * The function's arguments. The arguments are expected to be hex-encoded
345
+ * strings of Clarity values.
346
+ *
347
+ * To convert Clarity values to their hex representation, the `cvToString`
348
+ * helper from the `@stacks/transactions` package may be helpful.
349
+ *
350
+ * ```js
351
+ * import { cvToString } from '@stacks/transactions';
352
+ *
353
+ * const functionArgs = [someClarityValue1, someClarityValue2];
354
+ * const hexArgs = functionArgs.map(cvToString);
355
+ * ```
356
+ */
357
+ arguments: v4.optional(v4.array(v4.string()))
358
+ });
359
+ var stxCallContractResultSchema = v4.object({
360
+ /**
361
+ * The ID of the transaction.
362
+ */
363
+ txid: v4.string(),
364
+ /**
365
+ * A Stacks transaction as a hex-encoded string.
366
+ */
367
+ transaction: v4.string()
368
+ });
369
+ var stxCallContractRequestMessageSchema = v4.object({
370
+ ...rpcRequestMessageSchema.entries,
371
+ ...v4.object({
372
+ method: v4.literal(stxCallContractMethodName),
373
+ params: stxCallContractParamsSchema,
374
+ id: v4.string()
375
+ }).entries
376
+ });
324
377
  var stxGetAddressesMethodName = "stx_getAddresses";
325
378
  var stxGetAddressesParamsSchema = v4.nullish(
326
379
  v4.object({
@@ -518,6 +571,7 @@ var signPsbtParamsSchema = v6.object({
518
571
  * The key is the address and the value is an array of indexes of the inputs to sign.
519
572
  */
520
573
  signInputs: v6.record(v6.string(), v6.array(v6.number())),
574
+ allowedSignHash: v6.optional(v6.number()),
521
575
  /**
522
576
  * Whether to broadcast the transaction after signing.
523
577
  **/
@@ -1871,6 +1925,10 @@ var signMultipleTransactions = async (options) => {
1871
1925
  signPsbtRequestMessageSchema,
1872
1926
  signPsbtResultSchema,
1873
1927
  signTransaction,
1928
+ stxCallContractMethodName,
1929
+ stxCallContractParamsSchema,
1930
+ stxCallContractRequestMessageSchema,
1931
+ stxCallContractResultSchema,
1874
1932
  stxGetAddressesMethodName,
1875
1933
  stxGetAddressesParamsSchema,
1876
1934
  stxGetAddressesRequestMessageSchema,
package/dist/index.mjs CHANGED
@@ -163,6 +163,55 @@ var getAddress = async (options) => {
163
163
  };
164
164
 
165
165
  // src/request/types/stxMethods.ts
166
+ var stxCallContractMethodName = "stx_callContract";
167
+ var stxCallContractParamsSchema = v4.object({
168
+ /**
169
+ * The contract principal.
170
+ *
171
+ * E.g. `"SPKE...GD5C.my-contract"`
172
+ */
173
+ contract: v4.string(),
174
+ /**
175
+ * The name of the function to call.
176
+ *
177
+ * Note: spec changes ongoing,
178
+ * https://github.com/stacksgov/sips/pull/166#pullrequestreview-1914236999
179
+ */
180
+ functionName: v4.string(),
181
+ /**
182
+ * The function's arguments. The arguments are expected to be hex-encoded
183
+ * strings of Clarity values.
184
+ *
185
+ * To convert Clarity values to their hex representation, the `cvToString`
186
+ * helper from the `@stacks/transactions` package may be helpful.
187
+ *
188
+ * ```js
189
+ * import { cvToString } from '@stacks/transactions';
190
+ *
191
+ * const functionArgs = [someClarityValue1, someClarityValue2];
192
+ * const hexArgs = functionArgs.map(cvToString);
193
+ * ```
194
+ */
195
+ arguments: v4.optional(v4.array(v4.string()))
196
+ });
197
+ var stxCallContractResultSchema = v4.object({
198
+ /**
199
+ * The ID of the transaction.
200
+ */
201
+ txid: v4.string(),
202
+ /**
203
+ * A Stacks transaction as a hex-encoded string.
204
+ */
205
+ transaction: v4.string()
206
+ });
207
+ var stxCallContractRequestMessageSchema = v4.object({
208
+ ...rpcRequestMessageSchema.entries,
209
+ ...v4.object({
210
+ method: v4.literal(stxCallContractMethodName),
211
+ params: stxCallContractParamsSchema,
212
+ id: v4.string()
213
+ }).entries
214
+ });
166
215
  var stxGetAddressesMethodName = "stx_getAddresses";
167
216
  var stxGetAddressesParamsSchema = v4.nullish(
168
217
  v4.object({
@@ -360,6 +409,7 @@ var signPsbtParamsSchema = v6.object({
360
409
  * The key is the address and the value is an array of indexes of the inputs to sign.
361
410
  */
362
411
  signInputs: v6.record(v6.string(), v6.array(v6.number())),
412
+ allowedSignHash: v6.optional(v6.number()),
363
413
  /**
364
414
  * Whether to broadcast the transaction after signing.
365
415
  **/
@@ -1712,6 +1762,10 @@ export {
1712
1762
  signPsbtRequestMessageSchema,
1713
1763
  signPsbtResultSchema,
1714
1764
  signTransaction,
1765
+ stxCallContractMethodName,
1766
+ stxCallContractParamsSchema,
1767
+ stxCallContractRequestMessageSchema,
1768
+ stxCallContractResultSchema,
1715
1769
  stxGetAddressesMethodName,
1716
1770
  stxGetAddressesParamsSchema,
1717
1771
  stxGetAddressesRequestMessageSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.4.0-e8e6a66",
3
+ "version": "0.4.0-ff58e17",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",