/// import { Constructor } from '@neo-one/utils-esnext-esm'; import { ECPoint, PrivateKey, UInt160, UInt256 } from './common'; import { WitnessModel } from './models'; export interface HDNode { readonly privateKey?: PrivateKey; readonly publicKey: Buffer; readonly version: number; readonly depth: number; readonly parentFingerprint?: Buffer; readonly index: number; readonly chainCode: Buffer; } export declare const crypto: { addPublicKey: (privateKey: PrivateKey, publicKey: ECPoint) => void; sha1: (value: Buffer) => Buffer; sha256: (value: Buffer) => Buffer; hash160: (value: Buffer) => UInt160; hash256: (value: Buffer) => UInt256; sign: ({ message, privateKey }: { readonly message: Buffer; readonly privateKey: PrivateKey; }) => Buffer; verify: ({ message, signature: signatureIn, publicKey, }: { readonly message: Buffer; readonly signature: Buffer; readonly publicKey: ECPoint; }) => any; privateKeyToPublicKey: (privateKey: PrivateKey) => ECPoint; toScriptHash: (value: Buffer) => UInt160; toECPoint: (publicKey: Buffer) => ECPoint; createKeyPair: () => { readonly privateKey: PrivateKey; readonly publicKey: ECPoint; }; scriptHashToAddress: ({ addressVersion, scriptHash, }: { readonly addressVersion: number; readonly scriptHash: UInt160; }) => string; addressToScriptHash: ({ addressVersion, address, }: { readonly addressVersion: number; readonly address: string; }) => UInt160; createInvocationScript: (message: Buffer, privateKey: PrivateKey) => Buffer; createVerificationScript: (publicKey: ECPoint) => Buffer; createWitness: (message: Buffer, privateKey: PrivateKey, Witness: Constructor) => TWitness; createWitnessForSignature: (signature: Buffer, publicKey: ECPoint, Witness: Constructor) => TWitness_1; getVerificationScriptHash: (publicKey: ECPoint) => UInt160; createMultiSignatureInvocationScript: (signatures: readonly Buffer[]) => Buffer; createMultiSignatureVerificationScript: (mIn: number, publicKeys: readonly ECPoint[]) => Buffer; createMultiSignatureWitness: (mIn: number, publicKeys: readonly ECPoint[], publicKeyToSignature: { readonly [key: string]: Buffer; }, Witness: Constructor) => TWitness_2; getConsensusAddress: (validators: readonly ECPoint[]) => UInt160; privateKeyToWIF: (privateKey: PrivateKey, privateKeyVersion: number) => string; wifToPrivateKey: (wif: string, privateKeyVersion: number) => PrivateKey; publicKeyToScriptHash: (publicKey: ECPoint) => UInt160; privateKeyToScriptHash: (privateKey: PrivateKey) => UInt160; privateKeyToAddress: ({ addressVersion, privateKey, }: { readonly addressVersion: number; readonly privateKey: PrivateKey; }) => string; isNEP2: (encryptedKey: string) => boolean; encryptNEP2: ({ addressVersion, password, privateKey, }: { readonly addressVersion: number; readonly password: string; readonly privateKey: PrivateKey; }) => Promise; decryptNEP2: ({ addressVersion, encryptedKey, password, }: { readonly addressVersion: number; readonly encryptedKey: string; readonly password: string; }) => Promise; createPrivateKey: () => PrivateKey; isMultiSigContract: (script: Buffer) => boolean; isSignatureContract: (script: Buffer) => boolean; isStandardContract: (script: Buffer) => boolean; parseExtendedKey: (key: string) => HDNode; parseMasterSeed: (seedIn: string | Buffer) => HDNode; deriveChildKey: (node: HDNode, index: number, hardened: boolean) => HDNode; serializeHDNode: (node: HDNode, privateNode?: boolean) => string; };