diff --git a/@planetarium/account-aws-kms/src/AwsKmsAccount.ts b/@planetarium/account-aws-kms/src/AwsKmsAccount.ts index 1e54663fff9..5b775cc5044 100644 --- a/@planetarium/account-aws-kms/src/AwsKmsAccount.ts +++ b/@planetarium/account-aws-kms/src/AwsKmsAccount.ts @@ -35,10 +35,11 @@ export class AwsKmsAccount implements Account { return Promise.resolve(this.publicKey); } - async sign(message: Message): Promise { + async sign(message: Message, isDigest: boolean = false): Promise { const cmd = new SignCommand({ KeyId: this.keyId, Message: message, + MessageType: isDigest ? "DIGEST" : "RAW", SigningAlgorithm: "ECDSA_SHA_256", }); const response = await this.#client.send(cmd); diff --git a/@planetarium/account/src/Account.ts b/@planetarium/account/src/Account.ts index 087a2352320..f56e1ec29e7 100644 --- a/@planetarium/account/src/Account.ts +++ b/@planetarium/account/src/Account.ts @@ -7,7 +7,7 @@ import Signature from "./Signature.js"; export interface Account { getAddress(): Promise
; getPublicKey(): Promise; - sign(message: Message): Promise; + sign(message: Message, isDigest?: boolean): Promise; } export function isAccount(account: unknown): account is Account {