signet.js 0.0.10-beta → 0.0.10-beta2
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/browser/index.browser.cjs +1 -1
- package/browser/index.browser.cjs.map +1 -1
- package/browser/index.browser.js +1 -1
- package/browser/index.browser.js.map +1 -1
- package/node/index.node.cjs +1 -1
- package/node/index.node.cjs.map +1 -1
- package/node/index.node.js +1 -1
- package/node/index.node.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.cts +15 -26
- package/types/index.d.ts +15 -26
package/package.json
CHANGED
package/types/index.d.cts
CHANGED
|
@@ -934,16 +934,6 @@ interface SignatureErrorData {
|
|
|
934
934
|
responder: string;
|
|
935
935
|
error: string;
|
|
936
936
|
}
|
|
937
|
-
interface RequestIdArgs {
|
|
938
|
-
address: Address;
|
|
939
|
-
payload: Hex;
|
|
940
|
-
path: string;
|
|
941
|
-
keyVersion: number;
|
|
942
|
-
chainId: bigint;
|
|
943
|
-
algo: string;
|
|
944
|
-
dest: string;
|
|
945
|
-
params: string;
|
|
946
|
-
}
|
|
947
937
|
|
|
948
938
|
/**
|
|
949
939
|
* Implementation of the ChainSignatureContract for EVM chains.
|
|
@@ -993,36 +983,35 @@ declare class ChainSignatureContract extends ChainSignatureContract$2 {
|
|
|
993
983
|
fromBlock: bigint;
|
|
994
984
|
options?: RetryOptions;
|
|
995
985
|
}): Promise<RSVSignature | SignatureErrorData | undefined>;
|
|
986
|
+
getCallData(args: SignArgs, options?: SignOptions['sign']): Promise<{
|
|
987
|
+
target: Hex;
|
|
988
|
+
data: Hex;
|
|
989
|
+
value: bigint;
|
|
990
|
+
}>;
|
|
996
991
|
/**
|
|
997
992
|
* Generates the request ID for a signature request allowing to track the response.
|
|
998
993
|
*
|
|
999
|
-
* @param
|
|
1000
|
-
* @param
|
|
1001
|
-
* @param
|
|
1002
|
-
* @param
|
|
1003
|
-
*
|
|
1004
|
-
* @param
|
|
1005
|
-
* @param
|
|
1006
|
-
* @param
|
|
1007
|
-
* @param request.params - Additional parameters for the signing process
|
|
994
|
+
* @param args - The signature request object containing:
|
|
995
|
+
* @param args.payload - The data payload to be signed as a hex string
|
|
996
|
+
* @param args.path - The derivation path for the key
|
|
997
|
+
* @param args.keyVersion - The version of the key to use
|
|
998
|
+
* @param options - The signature request object containing:
|
|
999
|
+
* @param options.algo - The signing algorithm to use
|
|
1000
|
+
* @param options.dest - The destination for the signature
|
|
1001
|
+
* @param options.params - Additional parameters for the signing process
|
|
1008
1002
|
* @returns A hex string representing the unique request ID
|
|
1009
1003
|
*
|
|
1010
1004
|
* @example
|
|
1011
1005
|
* ```typescript
|
|
1012
1006
|
* const requestId = ChainSignatureContract.getRequestId({
|
|
1013
|
-
* address: walletClient.account.address,
|
|
1014
1007
|
* payload: payload: `0x${Buffer.from(args.payload).toString('hex')}`,,
|
|
1015
1008
|
* path: '',
|
|
1016
|
-
* keyVersion: 0
|
|
1017
|
-
* chainId: 1n,
|
|
1018
|
-
* algo: '',
|
|
1019
|
-
* dest: '',
|
|
1020
|
-
* params: ''
|
|
1009
|
+
* keyVersion: 0
|
|
1021
1010
|
* });
|
|
1022
1011
|
* console.log(requestId); // 0x...
|
|
1023
1012
|
* ```
|
|
1024
1013
|
*/
|
|
1025
|
-
getRequestId(
|
|
1014
|
+
getRequestId(args: SignArgs, options?: SignOptions['sign']): Hex;
|
|
1026
1015
|
getErrorFromEvents(requestId: Hex, fromBlock: bigint): Promise<SignatureErrorData | undefined>;
|
|
1027
1016
|
/**
|
|
1028
1017
|
* Searches for SignatureResponded events that match the given requestId.
|
package/types/index.d.ts
CHANGED
|
@@ -934,16 +934,6 @@ interface SignatureErrorData {
|
|
|
934
934
|
responder: string;
|
|
935
935
|
error: string;
|
|
936
936
|
}
|
|
937
|
-
interface RequestIdArgs {
|
|
938
|
-
address: Address;
|
|
939
|
-
payload: Hex;
|
|
940
|
-
path: string;
|
|
941
|
-
keyVersion: number;
|
|
942
|
-
chainId: bigint;
|
|
943
|
-
algo: string;
|
|
944
|
-
dest: string;
|
|
945
|
-
params: string;
|
|
946
|
-
}
|
|
947
937
|
|
|
948
938
|
/**
|
|
949
939
|
* Implementation of the ChainSignatureContract for EVM chains.
|
|
@@ -993,36 +983,35 @@ declare class ChainSignatureContract extends ChainSignatureContract$2 {
|
|
|
993
983
|
fromBlock: bigint;
|
|
994
984
|
options?: RetryOptions;
|
|
995
985
|
}): Promise<RSVSignature | SignatureErrorData | undefined>;
|
|
986
|
+
getCallData(args: SignArgs, options?: SignOptions['sign']): Promise<{
|
|
987
|
+
target: Hex;
|
|
988
|
+
data: Hex;
|
|
989
|
+
value: bigint;
|
|
990
|
+
}>;
|
|
996
991
|
/**
|
|
997
992
|
* Generates the request ID for a signature request allowing to track the response.
|
|
998
993
|
*
|
|
999
|
-
* @param
|
|
1000
|
-
* @param
|
|
1001
|
-
* @param
|
|
1002
|
-
* @param
|
|
1003
|
-
*
|
|
1004
|
-
* @param
|
|
1005
|
-
* @param
|
|
1006
|
-
* @param
|
|
1007
|
-
* @param request.params - Additional parameters for the signing process
|
|
994
|
+
* @param args - The signature request object containing:
|
|
995
|
+
* @param args.payload - The data payload to be signed as a hex string
|
|
996
|
+
* @param args.path - The derivation path for the key
|
|
997
|
+
* @param args.keyVersion - The version of the key to use
|
|
998
|
+
* @param options - The signature request object containing:
|
|
999
|
+
* @param options.algo - The signing algorithm to use
|
|
1000
|
+
* @param options.dest - The destination for the signature
|
|
1001
|
+
* @param options.params - Additional parameters for the signing process
|
|
1008
1002
|
* @returns A hex string representing the unique request ID
|
|
1009
1003
|
*
|
|
1010
1004
|
* @example
|
|
1011
1005
|
* ```typescript
|
|
1012
1006
|
* const requestId = ChainSignatureContract.getRequestId({
|
|
1013
|
-
* address: walletClient.account.address,
|
|
1014
1007
|
* payload: payload: `0x${Buffer.from(args.payload).toString('hex')}`,,
|
|
1015
1008
|
* path: '',
|
|
1016
|
-
* keyVersion: 0
|
|
1017
|
-
* chainId: 1n,
|
|
1018
|
-
* algo: '',
|
|
1019
|
-
* dest: '',
|
|
1020
|
-
* params: ''
|
|
1009
|
+
* keyVersion: 0
|
|
1021
1010
|
* });
|
|
1022
1011
|
* console.log(requestId); // 0x...
|
|
1023
1012
|
* ```
|
|
1024
1013
|
*/
|
|
1025
|
-
getRequestId(
|
|
1014
|
+
getRequestId(args: SignArgs, options?: SignOptions['sign']): Hex;
|
|
1026
1015
|
getErrorFromEvents(requestId: Hex, fromBlock: bigint): Promise<SignatureErrorData | undefined>;
|
|
1027
1016
|
/**
|
|
1028
1017
|
* Searches for SignatureResponded events that match the given requestId.
|