Documentation

    Aws KMS Signer integrates AWS Key Management Service (KMS) with the Sui blockchain to provide signing capabilities using AWS-managed cryptographic keys.

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    • 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);
      

      Parameters

      Returns AwsKmsSigner

      Will throw an error if required AWS credentials or region are not provided.

    Methods

    • Retrieves the key scheme used by this signer.

      Returns "Secp256k1" | "Secp256r1" | "ED25519" | "MultiSig" | "ZkLogin" | "Passkey"

      AWS supports only Secp256k1 and Secp256r1 schemes.

    • Retrieves the public key associated with this signer.

      Returns PublicKey

      The Secp256k1PublicKey instance.

      Will throw an error if the public key has not been initialized.

    • Signs the given data using AWS KMS.

      Parameters

      • bytes: Uint8Array

        The data to be signed as a Uint8Array.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      A promise that resolves to the signature as a Uint8Array.

      Will throw an error if the public key is not initialized or if signing fails.

    • Synchronous signing is not supported by AWS KMS.

      Returns never

      Always throws an error indicating synchronous signing is unsupported.

    • Signs provided personal message by calling signWithIntent() with a PersonalMessage provided as intent scope

      Parameters

      • bytes: Uint8Array

      Returns Promise<{ bytes: string; signature: string }>

    • Signs provided transaction by calling signWithIntent() with a TransactionData provided as intent scope

      Parameters

      • bytes: Uint8Array

      Returns Promise<SignatureWithBytes>

    • Sign messages with a specific intent. By combining the message bytes with the intent before hashing and signing, it ensures that a signed message is tied to a specific purpose and domain separator is provided

      Parameters

      Returns Promise<SignatureWithBytes>

    • Returns string

    • Prepares the signer by fetching and setting the public key from AWS KMS. It is recommended to initialize an AwsKmsSigner instance using this function.

      Parameters

      Returns Promise<AwsKmsSigner>

      A promise that resolves once a AwsKmsSigner instance is prepared (public key is set).

    MMNEPVFCICPMFPCPTTAAATR