signet.js 0.0.10-beta1 → 0.0.10-beta3
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 +10 -26
- package/types/index.d.ts +10 -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.
|
|
@@ -1001,33 +991,27 @@ declare class ChainSignatureContract extends ChainSignatureContract$2 {
|
|
|
1001
991
|
/**
|
|
1002
992
|
* Generates the request ID for a signature request allowing to track the response.
|
|
1003
993
|
*
|
|
1004
|
-
* @param
|
|
1005
|
-
* @param
|
|
1006
|
-
* @param
|
|
1007
|
-
* @param
|
|
1008
|
-
*
|
|
1009
|
-
* @param
|
|
1010
|
-
* @param
|
|
1011
|
-
* @param
|
|
1012
|
-
* @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
|
|
1013
1002
|
* @returns A hex string representing the unique request ID
|
|
1014
1003
|
*
|
|
1015
1004
|
* @example
|
|
1016
1005
|
* ```typescript
|
|
1017
1006
|
* const requestId = ChainSignatureContract.getRequestId({
|
|
1018
|
-
* address: walletClient.account.address,
|
|
1019
1007
|
* payload: payload: `0x${Buffer.from(args.payload).toString('hex')}`,,
|
|
1020
1008
|
* path: '',
|
|
1021
|
-
* keyVersion: 0
|
|
1022
|
-
* chainId: 1n,
|
|
1023
|
-
* algo: '',
|
|
1024
|
-
* dest: '',
|
|
1025
|
-
* params: ''
|
|
1009
|
+
* keyVersion: 0
|
|
1026
1010
|
* });
|
|
1027
1011
|
* console.log(requestId); // 0x...
|
|
1028
1012
|
* ```
|
|
1029
1013
|
*/
|
|
1030
|
-
getRequestId(
|
|
1014
|
+
getRequestId(args: SignArgs, options?: SignOptions['sign']): Hex;
|
|
1031
1015
|
getErrorFromEvents(requestId: Hex, fromBlock: bigint): Promise<SignatureErrorData | undefined>;
|
|
1032
1016
|
/**
|
|
1033
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.
|
|
@@ -1001,33 +991,27 @@ declare class ChainSignatureContract extends ChainSignatureContract$2 {
|
|
|
1001
991
|
/**
|
|
1002
992
|
* Generates the request ID for a signature request allowing to track the response.
|
|
1003
993
|
*
|
|
1004
|
-
* @param
|
|
1005
|
-
* @param
|
|
1006
|
-
* @param
|
|
1007
|
-
* @param
|
|
1008
|
-
*
|
|
1009
|
-
* @param
|
|
1010
|
-
* @param
|
|
1011
|
-
* @param
|
|
1012
|
-
* @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
|
|
1013
1002
|
* @returns A hex string representing the unique request ID
|
|
1014
1003
|
*
|
|
1015
1004
|
* @example
|
|
1016
1005
|
* ```typescript
|
|
1017
1006
|
* const requestId = ChainSignatureContract.getRequestId({
|
|
1018
|
-
* address: walletClient.account.address,
|
|
1019
1007
|
* payload: payload: `0x${Buffer.from(args.payload).toString('hex')}`,,
|
|
1020
1008
|
* path: '',
|
|
1021
|
-
* keyVersion: 0
|
|
1022
|
-
* chainId: 1n,
|
|
1023
|
-
* algo: '',
|
|
1024
|
-
* dest: '',
|
|
1025
|
-
* params: ''
|
|
1009
|
+
* keyVersion: 0
|
|
1026
1010
|
* });
|
|
1027
1011
|
* console.log(requestId); // 0x...
|
|
1028
1012
|
* ```
|
|
1029
1013
|
*/
|
|
1030
|
-
getRequestId(
|
|
1014
|
+
getRequestId(args: SignArgs, options?: SignOptions['sign']): Hex;
|
|
1031
1015
|
getErrorFromEvents(requestId: Hex, fromBlock: bigint): Promise<SignatureErrorData | undefined>;
|
|
1032
1016
|
/**
|
|
1033
1017
|
* Searches for SignatureResponded events that match the given requestId.
|