@safe-global/protocol-kit
Version:
SDK that facilitates the interaction with Safe Smart Accounts
25 lines • 1.51 kB
TypeScript
import { PasskeyArgType, PasskeyClient } from '../src';
import { WebAuthnCredentials } from './webauthnShim';
import { WalletClient, Transport, Chain, Account } from 'viem';
/**
* This needs to be a singleton by default. The reason for that is that we are adding it to a global reference in the tests.
* Should only be used if running the tests with a randomly generated private key.
* For testing with a static private key, create a new WebAuthnCredentials instance instead and pass the private key as argument to the constructor.
* @returns WebAuthnCredentials singleton instance
*/
export declare function getWebAuthnCredentials(): WebAuthnCredentials;
/**
* Deploys the passkey contract for each of the signers.
* @param passkeys An array of PasskeyClient representing the passkeys to deploy.
* @param signer A signer to deploy the passkey contracts.
* @returns Passkey deployment transactions
*/
export declare function deployPasskeysContract(passkeys: PasskeyClient[], signer: WalletClient<Transport, Chain, Account>): Promise<`0x${string}`[]>;
/**
* Creates a mock passkey for testing purposes.
* @param name User name used for passkey mock
* @param webAuthnCredentials The credentials instance to use instead of the singleton. This is useful when mocking the passkey with a static private key.
* @returns Passkey arguments
*/
export declare function createMockPasskey(name: string, webAuthnCredentials?: WebAuthnCredentials): Promise<PasskeyArgType>;
//# sourceMappingURL=passkeys.d.ts.map