@tunghm/relay-kit
Version:
SDK for Safe Smart Accounts with support for ERC-4337 and Relay
37 lines • 1.51 kB
TypeScript
/**
* Passkey Dummy client data JSON fields. This can be used for gas estimations, as it pads the fields enough
* to account for variations in WebAuthn implementations.
*/
export declare const DUMMY_CLIENT_DATA_FIELDS: string;
/**
* Dummy authenticator data. This can be used for gas estimations, as it ensures that the correct
* authenticator flags are set.
*/
export declare const DUMMY_AUTHENTICATOR_DATA: Uint8Array;
/**
* This method creates a dummy signature for the SafeOperation based on the Safe threshold. We assume that all owners are passkeys
* This is useful for gas estimations
* @param signer - The signer
* @param threshold - The Safe threshold
* @returns The user operation with the dummy passkey signature
*/
export declare function getDummySignature(signer: string, threshold: number): string;
/**
* Encodes the given WebAuthn signature into a string. This computes the ABI-encoded signature parameters:
* ```solidity
* abi.encode(authenticatorData, clientDataFields, r, s);
* ```
*
* @param authenticatorData - The authenticator data as a Uint8Array.
* @param clientDataFields - The client data fields as a string.
* @param r - The value of r as a bigint.
* @param s - The value of s as a bigint.
* @returns The encoded string.
*/
export declare function getSignatureBytes({ authenticatorData, clientDataFields, r, s }: {
authenticatorData: Uint8Array;
clientDataFields: string;
r: bigint;
s: bigint;
}): string;
//# sourceMappingURL=signing.d.ts.map