import { AwsClientOptions, AwsKmsClient } from "./aws-client.mjs"; import { PublicKey, Signer } from "@mysten/sui/cryptography"; //#region src/aws/aws-kms-signer.d.ts /** * Configuration options for initializing the AwsKmsSigner. */ interface AwsKmsSignerOptions { /** AWS KMS Key ID used for signing */ kmsKeyId: string; /** Options for setting up the AWS KMS client */ client: AwsKmsClient; /** Public key */ publicKey: PublicKey; } /** * Aws KMS Signer integrates AWS Key Management Service (KMS) with the Sui blockchain * to provide signing capabilities using AWS-managed cryptographic keys. */ declare class AwsKmsSigner extends Signer { #private; /** * Creates an instance of AwsKmsSigner. It's expected to call the static `fromKeyId` method to create an instance. * For example: * ``` * const signer = await AwsKmsSigner.fromKeyId(keyId, options); * ``` * @throws Will throw an error if required AWS credentials or region are not provided. */ constructor({ kmsKeyId, client, publicKey }: AwsKmsSignerOptions); /** * Retrieves the key scheme used by this signer. * @returns AWS supports only Secp256k1 and Secp256r1 schemes. */ getKeyScheme(): "ED25519" | "Secp256r1" | "Secp256k1" | "MultiSig" | "ZkLogin" | "Passkey"; /** * Retrieves the public key associated with this signer. * @returns The Secp256k1PublicKey instance. * @throws Will throw an error if the public key has not been initialized. */ getPublicKey(): PublicKey; /** * Signs the given data using AWS KMS. * @param bytes - The data to be signed as a Uint8Array. * @returns A promise that resolves to the signature as a Uint8Array. * @throws Will throw an error if the public key is not initialized or if signing fails. */ sign(bytes: Uint8Array): Promise>; /** * Prepares the signer by fetching and setting the public key from AWS KMS. * It is recommended to initialize an `AwsKmsSigner` instance using this function. * @returns A promise that resolves once a `AwsKmsSigner` instance is prepared (public key is set). */ static fromKeyId(keyId: string, options: AwsClientOptions): Promise; } //#endregion export { AwsKmsSigner, AwsKmsSignerOptions }; //# sourceMappingURL=aws-kms-signer.d.mts.map