@constellation-labs/key-manager
Version:
[Constellation] Keys and secrets management
19 lines (18 loc) • 921 B
TypeScript
import { KMS } from 'aws-sdk';
import BN from 'bn.js';
import { AwsKmsSignerCredentials } from '../index';
export declare const sign: (digest: Buffer, kmsCredentials: AwsKmsSignerCredentials) => Promise<import("aws-sdk/lib/request").PromiseResult<KMS.SignResponse, import("aws-sdk").AWSError>>;
export declare const getPublicKey: (kmsCredentials: AwsKmsSignerCredentials) => Promise<import("aws-sdk/lib/request").PromiseResult<KMS.GetPublicKeyResponse, import("aws-sdk").AWSError>>;
export declare const getEthereumAddress: (publicKey: Buffer) => string;
export declare const findEthereumSig: (signature: Buffer) => {
r: BN;
s: BN;
};
export declare const requestKmsSignature: (plaintext: Buffer, kmsCredentials: AwsKmsSignerCredentials) => Promise<{
r: BN;
s: BN;
}>;
export declare const determineCorrectV: (msg: Buffer, r: BN, s: BN, expectedEthAddr: string) => {
pubKey: string;
v: number;
};