Generates an account signature to be used in backend-to-backend requests.

Usage

import { generateAccountSignature } from "@treasure-dev/tdk-core";

const signature = await generateAccountSignature({
  accountAddress: "...",
  kmsKey: "...",
});

Returns

Promise<string>

  • Signature with the accountAddress encoded for use in backend-to-backend requests.

Parameters

accountAddress

string

  • The smart account address to be used in the backend-to-backend request.

kmsKey

string

  • AWS Key Management Services (KMS) key ARN for the backend wallet provided by the Treasure team.

kmsClientConfig

KMSClientConfig | undefined (see AWS docs)

  • Optional configuration for the AWS KMS client, as required by the implementing backend.
import { generateAccountSignature } from "@treasure-dev/tdk-core";

const signature = await generateAccountSignature({
  accountAddress: "...",
  kmsKey: "...",
  kmsClientConfig: {
    region: "us-west-2",
    credentials: {
      accessKeyId: "...",
      secretAccessKey: "...",
    },
  },
});