import { RecoverableSignature, RecoveryId, Secp256k1 } from './secp256k1-types'; export { RecoverableSignature, RecoveryId, Secp256k1 }; /** * This method is like `instantiateSecp256k1`, but requires the consumer to * `Window.fetch` or `fs.readFile` the `secp256k1.wasm` binary and provide it to * this method as `webassemblyBytes`. This skips a base64 decoding of an * embedded binary. * * ### Randomizing the Context with `randomSeed` * This method also accepts an optional, 32-byte `randomSeed`, which is passed * to the `contextRandomize` method in the underlying WebAssembly. * * The value of this precaution is debatable, especially in the context of * javascript and WebAssembly. * * In the secp256k1 C library, context randomization is an additional layer of * security from side-channel attacks which attempt to extract private key * information by analyzing things like a CPU's emitted radio frequencies or * power usage. * * In this library, these attacks seem even less likely, since the "platform" * on which this code will be executed (e.g. V8) is likely to obscure any * such signals. * * Still, out of an abundance of caution (and because no one has produced a * definitive proof indicating that this is not helpful), this library exposes * the ability to randomize the context like the C library. Depending on the * intended application, consumers can decide whether or not to randomize. * * @param webassemblyBytes - an ArrayBuffer containing the bytes from Libauth's * `secp256k1.wasm` binary. Providing this buffer manually may be faster than * the internal base64 decode which happens in `instantiateSecp256k1`. * @param randomSeed - a 32-byte random seed used to randomize the secp256k1 * context after creation. See above for details. */ export declare const instantiateSecp256k1Bytes: (webassemblyBytes: ArrayBuffer, randomSeed?: Uint8Array | undefined) => Promise; /** * Create and wrap a Secp256k1 WebAssembly instance to expose a set of * purely-functional Secp256k1 methods. For slightly faster initialization, use * `instantiateSecp256k1Bytes`. * * @param randomSeed - a 32-byte random seed used to randomize the secp256k1 * context after creation. See the description in `instantiateSecp256k1Bytes` * for details. */ export declare const instantiateSecp256k1: (randomSeed?: Uint8Array | undefined) => Promise; //# sourceMappingURL=secp256k1.d.ts.map