0.3.1 • Published 2 years ago

zswjs-tencent-cloud-kms v0.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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() });
}
0.3.0

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.3.1

2 years ago

0.2.2

2 years ago

0.1.0

2 years ago