zswjs-tencent-cloud-kms
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

zswjs-tencent-cloud-kms

中数文联盟链JS SDK - 腾讯云KMS密钥管理系统Plugin

Usage

const { JsonRpc, API } = require("zswjs");
const { TencentCloudKMSignatureProvider } = require("zswjs-tencent-cloud-kms");

function signTransactionDemo() {
  
  const rpc = new JsonRpc('http://127.0.0.1:8888', { fetch });
  const clientConfig = {
    credential: {
      secretId: "<your-secret-id>",
      secretKey: "<your-secret-key>",
    },
    region: "<your-region", // example: "ap-shanghai"
  };
  const signatureProvider = new TencentCloudKMSignatureProvider(clientConfig, [
    "<key-id>",
  ])
  const api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });
}

Readme

Keywords

none

Package Sidebar

Install

npm i zswjs-tencent-cloud-kms

Weekly Downloads

0

Version

0.3.1

License

MIT

Unpacked Size

277 kB

Total Files

20

Last publish

Collaborators

  • zhongshuwen