import { Principal } from "@dfinity/principal"; /** * Address bytes used by the IC canisters. * @remarks This is the 20-byte EVM address in binary form. */ export type Address = Uint8Array; /** * Derive an EVM address (20 bytes) from a secp256k1 private key (32 bytes). * @throws If the private key is not 32 bytes. */ export declare function deriveAddress(privateKey: Uint8Array): Address; /** * Build the human-readable authorization message for IC stealth key requests. * @remarks This text is wrapped with EIP-191 prefixing in {@link authorizationMessage}. */ export declare function authorizationMessageText(canisterId: Principal, address: Address, transportPublicKey: Uint8Array, expiryNs: bigint, nonce: bigint): string; /** * Build the EIP-191 encoded authorization message bytes to sign. */ export declare function authorizationMessage(canisterId: Principal, address: Address, transportPublicKey: Uint8Array, expiryNs: bigint, nonce: bigint): Uint8Array; /** * Sign an authorization message using secp256k1. * @remarks * Returns a 65-byte signature where the last byte is the recovery id + 27. * @throws If `message` is empty or `privateKey` is not 32 bytes. */ export declare function signAuthorization(message: Uint8Array, privateKey: Uint8Array): Uint8Array; /** * Current unix timestamp in nanoseconds. * @remarks Intended for use with canister request expiries. */ export declare function unixTimeNs(): bigint; export declare function addressToHex(address: Address): string; /** * Decode bytes into a UTF-8 string. */ export declare function messageToString(message: Uint8Array): string; //# sourceMappingURL=authorization.d.ts.map