/// export declare class SimpleKeypair { secret: string; publicKey: string; } /** * `Keypair` represents public (and secret) keys of the account. * * Currently `Keypair` only supports ed25519 but in a future this class can be abstraction layer for other * public-key signature systems. * * Use more convenient methods to create `Keypair` object: * * `{@link Keypair.fromPublicKey}` * * `{@link Keypair.fromSecret}` * * `{@link Keypair.random}` * * @constructor * @param {object} keys At least one of keys must be provided. * @param {string} keys.type Public-key signature system name. (currently only `ed25519` keys are supported) * @param {Buffer} [keys.publicKey] Raw public key * @param {Buffer} [keys.secretKey] Raw secret key (32-byte secret seed in ed25519`) */ export declare class Keypair { private readonly type; private readonly _secretSeed; private readonly _secretKey; private readonly _publicKey; constructor(keys: any); /** * Creates a new `Keypair` instance from secret. This can either be secret key or secret seed depending * on underlying public-key signature system. Currently `Keypair` only supports ed25519. * @param {string} secret secret key (ex. `SDAKFNYEIAORZKKCYRILFQKLLOCNPL5SWJ3YY5NM3ZH6GJSZGXHZEPQS`) * @returns {Keypair} */ static fromSecretKeypair(secret: any): Keypair; static fromSecret(secret: any): SimpleKeypair; /** * Creates a new `Keypair` object from ed25519 secret key seed raw bytes. * * @param {Buffer} rawSeed Raw 32-byte ed25519 secret key seed * @returns {Keypair} */ static fromRawEd25519Seed(rawSeed: any): Keypair; /** * Creates a new `Keypair` object from public key. * @param {string} publicKey public key (ex. `GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA`) * @returns {Keypair} */ static fromPublicKey(publicKey: any): Keypair; /** * Create a random `Keypair` object. * @returns {Keypair} */ static random(): Keypair; /** * Create a random `Keypair` object. * @returns {Keypair} */ static randomKeys(): SimpleKeypair; /** * Returns raw public key * @returns {Buffer} */ rawPublicKey(): Buffer; /** * Returns public key associated with this `Keypair` object. * @returns {string} */ publicKey(): any; /** * Returns secret key associated with this `Keypair` object * @returns {string} */ secret(): any; /** * Returns raw secret key. * @returns {Buffer} */ rawSecretKey(): any; /** * Returns `true` if this `Keypair` object contains secret key and can sign. * @returns {boolean} */ canSign(): boolean; /** * Signs data. * @param {Buffer} data Data to sign * @returns {Buffer} */ sign(data: any): Buffer; /** * Verifies if `signature` for `data` is valid. * @param {Buffer} data Signed data * @param {Buffer} signature Signature * @returns {boolean} */ verify(data: any, signature: any): boolean; }