signet.js 0.0.11 → 0.0.12-beta.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signet.js",
3
- "version": "0.0.11",
3
+ "version": "0.0.12-beta.1",
4
4
  "description": "A TypeScript library for handling multi-chain transactions and signatures using Signet MPC",
5
5
  "type": "module",
6
6
  "exports": {
@@ -82,6 +82,7 @@
82
82
  "vocs": "1.0.0-alpha.62"
83
83
  },
84
84
  "dependencies": {
85
+ "@coral-xyz/anchor": "^0.31.0",
85
86
  "@cosmjs/amino": "^0.32.4",
86
87
  "@cosmjs/crypto": "^0.32.4",
87
88
  "@cosmjs/encoding": "^0.32.4",
@@ -95,6 +96,7 @@
95
96
  "@near-js/types": "^0.3.1",
96
97
  "@near-wallet-selector/core": "^8.9.5",
97
98
  "@scure/base": "^1.2.4",
99
+ "@solana/web3.js": "^1.98.0",
98
100
  "bech32": "^2.0.0",
99
101
  "bitcoinjs-lib": "^6.1.5",
100
102
  "bn.js": "^5.2.1",
package/types/index.d.cts CHANGED
@@ -8,6 +8,9 @@ import { Action as Action$1 } from '@near-js/transactions';
8
8
  import { TxExecutionStatus } from '@near-js/types';
9
9
  import { NetworkId, Action, FinalExecutionOutcome } from '@near-wallet-selector/core';
10
10
  import { KeyPair as KeyPair$1 } from 'near-api-js';
11
+ import * as _solana_web3_js from '@solana/web3.js';
12
+ import { PublicKey, AccountMeta, TransactionInstruction } from '@solana/web3.js';
13
+ import { AnchorProvider } from '@coral-xyz/anchor';
11
14
 
12
15
  interface SignArgs {
13
16
  /** The payload to sign as an array of 32 bytes */
@@ -46,7 +49,7 @@ declare abstract class BaseChainSignatureContract {
46
49
  /**
47
50
  * Full contract interface that extends BaseChainSignatureContract to provide all Sig Network Smart Contract capabilities.
48
51
  */
49
- declare abstract class ChainSignatureContract$2 extends BaseChainSignatureContract {
52
+ declare abstract class ChainSignatureContract$3 extends BaseChainSignatureContract {
50
53
  /**
51
54
  * Signs a payload using Sig Network MPC.
52
55
  *
@@ -108,6 +111,7 @@ declare const ENVS: {
108
111
  declare const CHAINS: {
109
112
  readonly ETHEREUM: "ETHEREUM";
110
113
  readonly NEAR: "NEAR";
114
+ readonly SOLANA: "SOLANA";
111
115
  };
112
116
  /**
113
117
  * Root public keys for the Sig Network Smart Contracts across different environments.
@@ -124,6 +128,7 @@ declare const ROOT_PUBLIC_KEYS: Record<keyof typeof ENVS, NajPublicKey>;
124
128
  declare const KDF_CHAIN_IDS: {
125
129
  readonly ETHEREUM: "0x1";
126
130
  readonly NEAR: "0x18d";
131
+ readonly SOLANA: "0x800001f5";
127
132
  };
128
133
  /**
129
134
  * Contract addresses for different chains and environments.
@@ -182,9 +187,9 @@ declare namespace cryptography {
182
187
  export { cryptography_compressPubKey as compressPubKey, cryptography_deriveChildPublicKey as deriveChildPublicKey, cryptography_najToUncompressedPubKeySEC1 as najToUncompressedPubKeySEC1, cryptography_toRSV as toRSV };
183
188
  }
184
189
 
185
- declare const index$7_cryptography: typeof cryptography;
186
- declare namespace index$7 {
187
- export { index$7_cryptography as cryptography };
190
+ declare const index$8_cryptography: typeof cryptography;
191
+ declare namespace index$8 {
192
+ export { index$8_cryptography as cryptography };
188
193
  }
189
194
 
190
195
  declare abstract class ChainAdapter<TransactionRequest, UnsignedTransaction> {
@@ -382,15 +387,15 @@ interface EVMFeeProperties {
382
387
  }
383
388
  declare function fetchEVMFeeProperties(client: PublicClient, transaction: TransactionRequest): Promise<EVMFeeProperties>;
384
389
 
385
- type index$6_EVM = EVM;
386
- declare const index$6_EVM: typeof EVM;
387
- type index$6_EVMMessage = EVMMessage;
388
- type index$6_EVMTransactionRequest = EVMTransactionRequest;
389
- type index$6_EVMTypedData = EVMTypedData;
390
- type index$6_EVMUnsignedTransaction = EVMUnsignedTransaction;
391
- declare const index$6_fetchEVMFeeProperties: typeof fetchEVMFeeProperties;
392
- declare namespace index$6 {
393
- export { index$6_EVM as EVM, type index$6_EVMMessage as EVMMessage, type index$6_EVMTransactionRequest as EVMTransactionRequest, type index$6_EVMTypedData as EVMTypedData, type index$6_EVMUnsignedTransaction as EVMUnsignedTransaction, index$6_fetchEVMFeeProperties as fetchEVMFeeProperties };
390
+ type index$7_EVM = EVM;
391
+ declare const index$7_EVM: typeof EVM;
392
+ type index$7_EVMMessage = EVMMessage;
393
+ type index$7_EVMTransactionRequest = EVMTransactionRequest;
394
+ type index$7_EVMTypedData = EVMTypedData;
395
+ type index$7_EVMUnsignedTransaction = EVMUnsignedTransaction;
396
+ declare const index$7_fetchEVMFeeProperties: typeof fetchEVMFeeProperties;
397
+ declare namespace index$7 {
398
+ export { index$7_EVM as EVM, type index$7_EVMMessage as EVMMessage, type index$7_EVMTransactionRequest as EVMTransactionRequest, type index$7_EVMTypedData as EVMTypedData, type index$7_EVMUnsignedTransaction as EVMUnsignedTransaction, index$7_fetchEVMFeeProperties as fetchEVMFeeProperties };
394
399
  }
395
400
 
396
401
  interface BTCTransaction$1 {
@@ -528,18 +533,18 @@ declare class Bitcoin extends ChainAdapter<BTCTransactionRequest, BTCUnsignedTra
528
533
  broadcastTx(txSerialized: string): Promise<string>;
529
534
  }
530
535
 
531
- type index$5_BTCInput = BTCInput;
532
- type index$5_BTCNetworkIds = BTCNetworkIds;
533
- type index$5_BTCOutput = BTCOutput;
534
- type index$5_BTCRpcAdapter = BTCRpcAdapter;
535
- declare const index$5_BTCRpcAdapter: typeof BTCRpcAdapter;
536
- declare const index$5_BTCRpcAdapters: typeof BTCRpcAdapters;
537
- type index$5_BTCTransactionRequest = BTCTransactionRequest;
538
- type index$5_BTCUnsignedTransaction = BTCUnsignedTransaction;
539
- type index$5_Bitcoin = Bitcoin;
540
- declare const index$5_Bitcoin: typeof Bitcoin;
541
- declare namespace index$5 {
542
- export { type index$5_BTCInput as BTCInput, type index$5_BTCNetworkIds as BTCNetworkIds, type index$5_BTCOutput as BTCOutput, index$5_BTCRpcAdapter as BTCRpcAdapter, index$5_BTCRpcAdapters as BTCRpcAdapters, type BTCTransaction$1 as BTCTransaction, type index$5_BTCTransactionRequest as BTCTransactionRequest, type index$5_BTCUnsignedTransaction as BTCUnsignedTransaction, index$5_Bitcoin as Bitcoin };
536
+ type index$6_BTCInput = BTCInput;
537
+ type index$6_BTCNetworkIds = BTCNetworkIds;
538
+ type index$6_BTCOutput = BTCOutput;
539
+ type index$6_BTCRpcAdapter = BTCRpcAdapter;
540
+ declare const index$6_BTCRpcAdapter: typeof BTCRpcAdapter;
541
+ declare const index$6_BTCRpcAdapters: typeof BTCRpcAdapters;
542
+ type index$6_BTCTransactionRequest = BTCTransactionRequest;
543
+ type index$6_BTCUnsignedTransaction = BTCUnsignedTransaction;
544
+ type index$6_Bitcoin = Bitcoin;
545
+ declare const index$6_Bitcoin: typeof Bitcoin;
546
+ declare namespace index$6 {
547
+ export { type index$6_BTCInput as BTCInput, type index$6_BTCNetworkIds as BTCNetworkIds, type index$6_BTCOutput as BTCOutput, index$6_BTCRpcAdapter as BTCRpcAdapter, index$6_BTCRpcAdapters as BTCRpcAdapters, type BTCTransaction$1 as BTCTransaction, type index$6_BTCTransactionRequest as BTCTransactionRequest, type index$6_BTCUnsignedTransaction as BTCUnsignedTransaction, index$6_Bitcoin as Bitcoin };
543
548
  }
544
549
 
545
550
  type CosmosNetworkIds = string;
@@ -601,19 +606,19 @@ declare class Cosmos extends ChainAdapter<CosmosTransactionRequest, CosmosUnsign
601
606
  broadcastTx(txSerialized: string): Promise<string>;
602
607
  }
603
608
 
604
- type index$4_Cosmos = Cosmos;
605
- declare const index$4_Cosmos: typeof Cosmos;
606
- type index$4_CosmosNetworkIds = CosmosNetworkIds;
607
- type index$4_CosmosTransactionRequest = CosmosTransactionRequest;
608
- type index$4_CosmosUnsignedTransaction = CosmosUnsignedTransaction;
609
- declare namespace index$4 {
610
- export { index$4_Cosmos as Cosmos, type index$4_CosmosNetworkIds as CosmosNetworkIds, type index$4_CosmosTransactionRequest as CosmosTransactionRequest, type index$4_CosmosUnsignedTransaction as CosmosUnsignedTransaction };
609
+ type index$5_Cosmos = Cosmos;
610
+ declare const index$5_Cosmos: typeof Cosmos;
611
+ type index$5_CosmosNetworkIds = CosmosNetworkIds;
612
+ type index$5_CosmosTransactionRequest = CosmosTransactionRequest;
613
+ type index$5_CosmosUnsignedTransaction = CosmosUnsignedTransaction;
614
+ declare namespace index$5 {
615
+ export { index$5_Cosmos as Cosmos, type index$5_CosmosNetworkIds as CosmosNetworkIds, type index$5_CosmosTransactionRequest as CosmosTransactionRequest, type index$5_CosmosUnsignedTransaction as CosmosUnsignedTransaction };
611
616
  }
612
617
 
613
- type index$3_ChainAdapter<TransactionRequest, UnsignedTransaction> = ChainAdapter<TransactionRequest, UnsignedTransaction>;
614
- declare const index$3_ChainAdapter: typeof ChainAdapter;
615
- declare namespace index$3 {
616
- export { index$3_ChainAdapter as ChainAdapter, index$5 as btc, index$4 as cosmos, index$6 as evm };
618
+ type index$4_ChainAdapter<TransactionRequest, UnsignedTransaction> = ChainAdapter<TransactionRequest, UnsignedTransaction>;
619
+ declare const index$4_ChainAdapter: typeof ChainAdapter;
620
+ declare namespace index$4 {
621
+ export { index$4_ChainAdapter as ChainAdapter, index$6 as btc, index$5 as cosmos, index$7 as evm };
617
622
  }
618
623
 
619
624
  type ChainSignatureContractIds = string;
@@ -734,7 +739,7 @@ interface ChainSignatureContractArgs {
734
739
  *
735
740
  * @extends AbstractChainSignatureContract
736
741
  */
737
- declare class ChainSignatureContract$1 extends ChainSignatureContract$2 {
742
+ declare class ChainSignatureContract$2 extends ChainSignatureContract$3 {
738
743
  private readonly networkId;
739
744
  private readonly contractId;
740
745
  private readonly accountId;
@@ -766,13 +771,13 @@ declare class ChainSignatureContract$1 extends ChainSignatureContract$2 {
766
771
  private requireAccount;
767
772
  }
768
773
 
769
- declare const utils$1: {
774
+ declare const utils$2: {
770
775
  transaction: typeof transaction;
771
776
  signAndSend: typeof signAndSend;
772
777
  };
773
778
 
774
- declare namespace index$2 {
775
- export { ChainSignatureContract$1 as ChainSignatureContract, utils$1 as utils };
779
+ declare namespace index$3 {
780
+ export { ChainSignatureContract$2 as ChainSignatureContract, utils$2 as utils };
776
781
  }
777
782
 
778
783
  declare const abi: ({
@@ -893,56 +898,46 @@ declare class ChainSignatureError extends Error {
893
898
  receipt: TransactionReceipt;
894
899
  constructor(message: string, requestId: `0x${string}`, receipt: TransactionReceipt);
895
900
  }
896
- declare class SignatureNotFoundError extends ChainSignatureError {
901
+ declare class SignatureNotFoundError$1 extends ChainSignatureError {
897
902
  constructor(requestId: `0x${string}`, receipt: TransactionReceipt);
898
903
  }
899
- declare class SignatureContractError extends ChainSignatureError {
904
+ declare class SignatureContractError$1 extends ChainSignatureError {
900
905
  errorCode: string;
901
906
  constructor(errorCode: string, requestId: `0x${string}`, receipt: TransactionReceipt);
902
907
  }
903
- declare class SigningError extends ChainSignatureError {
908
+ declare class SigningError$1 extends ChainSignatureError {
904
909
  originalError?: Error;
905
910
  constructor(requestId: `0x${string}`, receipt: TransactionReceipt, originalError?: Error);
906
911
  }
907
912
 
908
- type errors_ChainSignatureError = ChainSignatureError;
909
- declare const errors_ChainSignatureError: typeof ChainSignatureError;
910
- type errors_SignatureContractError = SignatureContractError;
911
- declare const errors_SignatureContractError: typeof SignatureContractError;
912
- type errors_SignatureNotFoundError = SignatureNotFoundError;
913
- declare const errors_SignatureNotFoundError: typeof SignatureNotFoundError;
914
- type errors_SigningError = SigningError;
915
- declare const errors_SigningError: typeof SigningError;
916
- declare namespace errors {
917
- export { errors_ChainSignatureError as ChainSignatureError, errors_SignatureContractError as SignatureContractError, errors_SignatureNotFoundError as SignatureNotFoundError, errors_SigningError as SigningError };
913
+ type errors$1_ChainSignatureError = ChainSignatureError;
914
+ declare const errors$1_ChainSignatureError: typeof ChainSignatureError;
915
+ declare namespace errors$1 {
916
+ export { errors$1_ChainSignatureError as ChainSignatureError, SignatureContractError$1 as SignatureContractError, SignatureNotFoundError$1 as SignatureNotFoundError, SigningError$1 as SigningError };
918
917
  }
919
918
 
919
+ interface RetryOptions {
920
+ delay?: number;
921
+ retryCount?: number;
922
+ }
920
923
  interface SignOptions {
921
924
  sign: {
922
925
  algo?: string;
923
926
  dest?: string;
924
927
  params?: string;
925
928
  };
926
- retry: {
927
- delay?: number;
928
- retryCount?: number;
929
+ retry: RetryOptions;
930
+ transaction?: {
931
+ gas?: bigint;
932
+ maxFeePerGas?: bigint;
933
+ maxPriorityFeePerGas?: bigint;
934
+ nonce?: number;
929
935
  };
930
936
  }
931
937
  interface SignatureErrorData {
932
938
  requestId: string;
933
- responder: string;
934
939
  error: string;
935
940
  }
936
- interface RequestIdArgs {
937
- address: Address;
938
- payload: Hex;
939
- path: string;
940
- keyVersion: number;
941
- chainId: bigint;
942
- algo: string;
943
- dest: string;
944
- params: string;
945
- }
946
941
 
947
942
  /**
948
943
  * Implementation of the ChainSignatureContract for EVM chains.
@@ -952,7 +947,7 @@ interface RequestIdArgs {
952
947
  * once it's available. The sign method handles this process automatically by polling
953
948
  * for the signature using the requestId.
954
949
  */
955
- declare class ChainSignatureContract extends ChainSignatureContract$2 {
950
+ declare class ChainSignatureContract$1 extends ChainSignatureContract$3 {
956
951
  private readonly publicClient;
957
952
  private readonly walletClient;
958
953
  private readonly contractAddress;
@@ -986,7 +981,7 @@ declare class ChainSignatureContract extends ChainSignatureContract$2 {
986
981
  * @param options - The signing options
987
982
  * @returns The transaction hash
988
983
  */
989
- createSignatureRequest(args: SignArgs, options?: Pick<SignOptions, 'sign'>): Promise<{
984
+ createSignatureRequest(args: SignArgs, options?: Pick<SignOptions, 'sign' | 'transaction'>): Promise<{
990
985
  txHash: Hex;
991
986
  requestId: Hex;
992
987
  }>;
@@ -996,36 +991,42 @@ declare class ChainSignatureContract extends ChainSignatureContract$2 {
996
991
  * parameters, it will throw an error.
997
992
  */
998
993
  sign(args: SignArgs, options?: SignOptions): Promise<RSVSignature>;
994
+ pollForRequestId({ requestId, payload, path, fromBlock, options, }: {
995
+ requestId: Hex;
996
+ payload: number[];
997
+ path: string;
998
+ fromBlock: bigint;
999
+ options?: RetryOptions;
1000
+ }): Promise<RSVSignature | SignatureErrorData | undefined>;
1001
+ getSignRequestParams(args: SignArgs, options?: SignOptions['sign']): Promise<{
1002
+ target: Hex;
1003
+ data: Hex;
1004
+ value: bigint;
1005
+ }>;
999
1006
  /**
1000
1007
  * Generates the request ID for a signature request allowing to track the response.
1001
1008
  *
1002
- * @param request - The signature request object containing:
1003
- * @param request.address - The contract/wallet address calling the signing contract
1004
- * @param request.payload - The data payload to be signed as a hex string
1005
- * @param request.path - The derivation path for the key
1006
- * @param request.keyVersion - The version of the key to use
1007
- * @param request.chainId - The chain ID as a bigint
1008
- * @param request.algo - The signing algorithm to use
1009
- * @param request.dest - The destination for the signature
1010
- * @param request.params - Additional parameters for the signing process
1009
+ * @param args - The signature request object containing:
1010
+ * @param args.payload - The data payload to be signed as a hex string
1011
+ * @param args.path - The derivation path for the key
1012
+ * @param args.keyVersion - The version of the key to use
1013
+ * @param options - The signature request object containing:
1014
+ * @param options.algo - The signing algorithm to use
1015
+ * @param options.dest - The destination for the signature
1016
+ * @param options.params - Additional parameters for the signing process
1011
1017
  * @returns A hex string representing the unique request ID
1012
1018
  *
1013
1019
  * @example
1014
1020
  * ```typescript
1015
1021
  * const requestId = ChainSignatureContract.getRequestId({
1016
- * address: walletClient.account.address,
1017
1022
  * payload: payload: `0x${Buffer.from(args.payload).toString('hex')}`,,
1018
1023
  * path: '',
1019
- * keyVersion: 0,
1020
- * chainId: 1n,
1021
- * algo: '',
1022
- * dest: '',
1023
- * params: ''
1024
+ * keyVersion: 0
1024
1025
  * });
1025
1026
  * console.log(requestId); // 0x...
1026
1027
  * ```
1027
1028
  */
1028
- getRequestId(request: RequestIdArgs): Hex;
1029
+ getRequestId(args: SignArgs, options?: SignOptions['sign']): Hex;
1029
1030
  getErrorFromEvents(requestId: Hex, fromBlock: bigint): Promise<SignatureErrorData | undefined>;
1030
1031
  /**
1031
1032
  * Searches for SignatureResponded events that match the given requestId.
@@ -1039,8 +1040,325 @@ declare class ChainSignatureContract extends ChainSignatureContract$2 {
1039
1040
  getSignatureFromEvents(requestId: Hex, fromBlock: bigint): Promise<RSVSignature | undefined>;
1040
1041
  }
1041
1042
 
1042
- declare const utils: {
1043
+ declare const utils$1: {
1043
1044
  ChainSignaturesContractABI: typeof ChainSignaturesContractABI;
1045
+ errors: typeof errors$1;
1046
+ };
1047
+
1048
+ declare namespace index$2 {
1049
+ export { ChainSignatureContract$1 as ChainSignatureContract, utils$1 as utils };
1050
+ }
1051
+
1052
+ declare class SignatureNotFoundError extends Error {
1053
+ readonly requestId?: string;
1054
+ readonly hash?: string;
1055
+ constructor(requestId?: string, metadata?: {
1056
+ hash?: string;
1057
+ });
1058
+ }
1059
+ declare class SignatureContractError extends Error {
1060
+ readonly requestId?: string;
1061
+ readonly hash?: string;
1062
+ readonly originalError?: {
1063
+ hash: string;
1064
+ };
1065
+ constructor(message: string, requestId?: string, metadata?: {
1066
+ hash?: string;
1067
+ });
1068
+ }
1069
+ declare class SigningError extends Error {
1070
+ readonly requestId: string;
1071
+ readonly hash?: string;
1072
+ readonly originalError?: Error;
1073
+ constructor(requestId: string, metadata?: {
1074
+ hash?: string;
1075
+ }, originalError?: Error);
1076
+ }
1077
+ declare class ResponseError extends Error {
1078
+ constructor(message: string);
1079
+ }
1080
+
1081
+ type errors_ResponseError = ResponseError;
1082
+ declare const errors_ResponseError: typeof ResponseError;
1083
+ type errors_SignatureContractError = SignatureContractError;
1084
+ declare const errors_SignatureContractError: typeof SignatureContractError;
1085
+ type errors_SignatureNotFoundError = SignatureNotFoundError;
1086
+ declare const errors_SignatureNotFoundError: typeof SignatureNotFoundError;
1087
+ type errors_SigningError = SigningError;
1088
+ declare const errors_SigningError: typeof SigningError;
1089
+ declare namespace errors {
1090
+ export { errors_ResponseError as ResponseError, errors_SignatureContractError as SignatureContractError, errors_SignatureNotFoundError as SignatureNotFoundError, errors_SigningError as SigningError };
1091
+ }
1092
+
1093
+ declare class ChainSignatureContract extends ChainSignatureContract$3 {
1094
+ private readonly provider;
1095
+ private readonly program;
1096
+ private readonly programId;
1097
+ private readonly rootPublicKey;
1098
+ private readonly requesterAddress;
1099
+ /**
1100
+ * Creates a new instance of the ChainSignatureContract for Solana chains.
1101
+ *
1102
+ * @param args - Configuration options for the contract
1103
+ * @param args.provider - An Anchor Provider for interacting with Solana
1104
+ * @param args.programId - The program ID as a string or PublicKey
1105
+ * @param args.rootPublicKey - Optional root public key. If not provided, it will be derived from the program ID
1106
+ * @param args.requesterAddress - Provider wallet address is always the fee payer but requester can be overridden
1107
+ */
1108
+ constructor(args: {
1109
+ provider: AnchorProvider;
1110
+ programId: string | PublicKey;
1111
+ rootPublicKey?: NajPublicKey;
1112
+ requesterAddress?: string;
1113
+ });
1114
+ /**
1115
+ * Gets the connection from the provider
1116
+ */
1117
+ get connection(): _solana_web3_js.Connection;
1118
+ getCurrentSignatureDeposit(): Promise<BN>;
1119
+ /**
1120
+ * Get the Program State PDA
1121
+ */
1122
+ getProgramStatePDA(): Promise<PublicKey>;
1123
+ getDerivedPublicKey(args: {
1124
+ path: string;
1125
+ predecessor: string;
1126
+ }): Promise<UncompressedPubKeySEC1>;
1127
+ getPublicKey(): Promise<UncompressedPubKeySEC1>;
1128
+ getSignRequestInstruction(args: SignArgs, options?: Pick<SignOptions, 'sign'> & {
1129
+ remainingAccounts?: Array<AccountMeta>;
1130
+ }): Promise<TransactionInstruction>;
1131
+ /**
1132
+ * Sends a transaction to the program to request a signature, then
1133
+ * polls for the signature result. If the signature is not found within the retry
1134
+ * parameters, it will throw an error.
1135
+ */
1136
+ sign(args: SignArgs, options?: Partial<SignOptions> & {
1137
+ remainingAccounts?: Array<AccountMeta>;
1138
+ }): Promise<RSVSignature>;
1139
+ /**
1140
+ * Listens for signature or error events matching the given requestId.
1141
+ * Sets up listeners for both event types and returns a promise that resolves when
1142
+ * either a valid signature or an error is received.
1143
+ */
1144
+ listenForSignatureEvents({ requestId, payload, path, options, }: {
1145
+ requestId: string;
1146
+ payload: number[];
1147
+ path: string;
1148
+ options?: RetryOptions;
1149
+ }): Promise<RSVSignature | SignatureErrorData | undefined>;
1150
+ /**
1151
+ * Generates the request ID for a signature request allowing to track the response.
1152
+ */
1153
+ getRequestId(args: SignArgs, options?: SignOptions['sign']): string;
1154
+ }
1155
+
1156
+ declare const utils: {
1157
+ ChainSignaturesContractIdl: {
1158
+ address: string;
1159
+ metadata: {
1160
+ name: string;
1161
+ version: string;
1162
+ spec: string;
1163
+ description: string;
1164
+ };
1165
+ instructions: ({
1166
+ name: string;
1167
+ discriminator: number[];
1168
+ accounts: {
1169
+ name: string;
1170
+ signer: boolean;
1171
+ }[];
1172
+ args: ({
1173
+ name: string;
1174
+ type: {
1175
+ vec: {
1176
+ array: (string | number)[];
1177
+ defined?: undefined;
1178
+ };
1179
+ };
1180
+ } | {
1181
+ name: string;
1182
+ type: {
1183
+ vec: {
1184
+ defined: {
1185
+ name: string;
1186
+ };
1187
+ array?: undefined;
1188
+ };
1189
+ };
1190
+ })[];
1191
+ } | {
1192
+ name: string;
1193
+ discriminator: number[];
1194
+ accounts: {
1195
+ name: string;
1196
+ signer: boolean;
1197
+ }[];
1198
+ args: ({
1199
+ name: string;
1200
+ type: {
1201
+ vec: {
1202
+ array: (string | number)[];
1203
+ };
1204
+ };
1205
+ } | {
1206
+ name: string;
1207
+ type: {
1208
+ vec: string;
1209
+ };
1210
+ })[];
1211
+ } | {
1212
+ name: string;
1213
+ discriminator: number[];
1214
+ accounts: ({
1215
+ name: string;
1216
+ writable: boolean;
1217
+ pda: {
1218
+ seeds: {
1219
+ kind: string;
1220
+ value: number[];
1221
+ }[];
1222
+ };
1223
+ signer?: undefined;
1224
+ optional?: undefined;
1225
+ address?: undefined;
1226
+ } | {
1227
+ name: string;
1228
+ writable: boolean;
1229
+ signer: boolean;
1230
+ pda?: undefined;
1231
+ optional?: undefined;
1232
+ address?: undefined;
1233
+ } | {
1234
+ name: string;
1235
+ writable: boolean;
1236
+ signer: boolean;
1237
+ optional: boolean;
1238
+ pda?: undefined;
1239
+ address?: undefined;
1240
+ } | {
1241
+ name: string;
1242
+ address: string;
1243
+ writable?: undefined;
1244
+ pda?: undefined;
1245
+ signer?: undefined;
1246
+ optional?: undefined;
1247
+ })[];
1248
+ args: ({
1249
+ name: string;
1250
+ type: {
1251
+ array: (string | number)[];
1252
+ };
1253
+ } | {
1254
+ name: string;
1255
+ type: string;
1256
+ })[];
1257
+ } | {
1258
+ name: string;
1259
+ discriminator: number[];
1260
+ accounts: ({
1261
+ name: string;
1262
+ writable: boolean;
1263
+ pda: {
1264
+ seeds: {
1265
+ kind: string;
1266
+ value: number[];
1267
+ }[];
1268
+ };
1269
+ signer?: undefined;
1270
+ relations?: undefined;
1271
+ docs?: undefined;
1272
+ address?: undefined;
1273
+ } | {
1274
+ name: string;
1275
+ writable: boolean;
1276
+ signer: boolean;
1277
+ relations: string[];
1278
+ pda?: undefined;
1279
+ docs?: undefined;
1280
+ address?: undefined;
1281
+ } | {
1282
+ name: string;
1283
+ docs: string[];
1284
+ writable: boolean;
1285
+ pda?: undefined;
1286
+ signer?: undefined;
1287
+ relations?: undefined;
1288
+ address?: undefined;
1289
+ } | {
1290
+ name: string;
1291
+ address: string;
1292
+ writable?: undefined;
1293
+ pda?: undefined;
1294
+ signer?: undefined;
1295
+ relations?: undefined;
1296
+ docs?: undefined;
1297
+ })[];
1298
+ args: {
1299
+ name: string;
1300
+ type: string;
1301
+ }[];
1302
+ })[];
1303
+ accounts: {
1304
+ name: string;
1305
+ discriminator: number[];
1306
+ }[];
1307
+ events: {
1308
+ name: string;
1309
+ discriminator: number[];
1310
+ }[];
1311
+ errors: {
1312
+ code: number;
1313
+ name: string;
1314
+ msg: string;
1315
+ }[];
1316
+ types: ({
1317
+ name: string;
1318
+ type: {
1319
+ kind: string;
1320
+ fields: ({
1321
+ name: string;
1322
+ type: {
1323
+ defined: {
1324
+ name: string;
1325
+ };
1326
+ array?: undefined;
1327
+ };
1328
+ } | {
1329
+ name: string;
1330
+ type: {
1331
+ array: (string | number)[];
1332
+ defined?: undefined;
1333
+ };
1334
+ } | {
1335
+ name: string;
1336
+ type: string;
1337
+ })[];
1338
+ };
1339
+ } | {
1340
+ name: string;
1341
+ type: {
1342
+ kind: string;
1343
+ fields: ({
1344
+ name: string;
1345
+ type: string;
1346
+ } | {
1347
+ name: string;
1348
+ type: {
1349
+ array: (string | number)[];
1350
+ option?: undefined;
1351
+ };
1352
+ } | {
1353
+ name: string;
1354
+ type: {
1355
+ option: string;
1356
+ array?: undefined;
1357
+ };
1358
+ })[];
1359
+ };
1360
+ })[];
1361
+ };
1044
1362
  errors: typeof errors;
1045
1363
  };
1046
1364
 
@@ -1053,7 +1371,7 @@ declare namespace index$1 {
1053
1371
 
1054
1372
  type index_SignArgs = SignArgs;
1055
1373
  declare namespace index {
1056
- export { ChainSignatureContract$2 as ChainSignatureContract, type index_SignArgs as SignArgs, index$1 as evm, index$2 as near };
1374
+ export { ChainSignatureContract$3 as ChainSignatureContract, type index_SignArgs as SignArgs, index$2 as evm, index$3 as near, index$1 as solana };
1057
1375
  }
1058
1376
 
1059
- export { type CompressedPubKeySEC1, type HashToSign, type KeyDerivationPath, type MPCSignature, type NajPublicKey, type NearNearMpcSignature, type RSVSignature, type SigNetEvmMpcSignature, type SigNetNearMpcSignature, type UncompressedPubKeySEC1, index$3 as chainAdapters, constants, index as contracts, index$7 as utils };
1377
+ export { type CompressedPubKeySEC1, type HashToSign, type KeyDerivationPath, type MPCSignature, type NajPublicKey, type NearNearMpcSignature, type RSVSignature, type SigNetEvmMpcSignature, type SigNetNearMpcSignature, type UncompressedPubKeySEC1, index$4 as chainAdapters, constants, index as contracts, index$8 as utils };