0.0.3 • Published 8 months ago
@mysten/kms v0.0.3
Sui KMS Signers
The Sui KMS Signers package provides a set of tools for securely signing transactions using Key Management Services (KMS) like AWS KMS.
Table of Contents
AWS KMS Signer
The AWS KMS Signer allows you to leverage AWS's Key Management Service to sign Sui transactions.
Usage
import { AwsKmsSigner } from '@mysten/kms/aws';
const prepareSigner = async () => {
const { AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION, AWS_KMS_KEY_ID } = process.env;
return AwsKmsSigner.fromKeyId(AWS_KMS_KEY_ID, {
region: AWS_REGION,
accessKeyId: AWS_ACCESS_KEY_ID,
secretAccessKey: AWS_SECRET_ACCESS_KEY,
});
};
API
fromKeyId
Create an AWS KMS signer from AWS Key ID and AWS credentials. This method initializes the signer with the necessary AWS credentials and region information, allowing it to interact with AWS KMS to perform cryptographic operations.
Parameters
Examples
const signer = await AwsKmsSigner.fromKeyId('your-kms-key-id', {
region: 'us-west-2',
accessKeyId: 'your-access-key-id',
secretAccessKey: 'your-secret-access-key',
});
Returns Promise<AwsKmsSigner> An instance of AwsKmsSigner.
Notice: AWS Signer requires Node >=20 due to dependency on crypto
0.0.3
8 months ago
0.0.0-experimental-20241031213948
8 months ago
0.0.2
8 months ago
0.0.0-experimental-20241031162314
8 months ago