基于区块链的毕业设计Ethereum-KMS – 以太坊KMS

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Ethereum-KMS – 以太坊KMS 是一篇很好的国外资料

Ethereum-KMS

Ethereum-KMS is a javascript library to allow applications to use Amazon Key Management Service (KMS) as a signer. This ensures that the private key never leaves a hardware store managed by AWS, achieving enterprise grade security.

Use this library when your application will be managing the signing process for your users.

Installation

yarn add ethereum-kms 

Usage

You will need an amazon aws account, and you are required to create an assymetric key, used for signing and verifying in the KMS dashboard. Select the secp256k1 implementation in the KMS console. Add an IAM user to be able to access this key.

To use simply:

import { TxData } from "ethereumjs-tx"; import { KMSSigner } from "ethereum-kms"; const main = async () => {   const signer = new KMSSigner(     "access_key_id",   // acess_key_id of your IAM user with access to the key.     "access_secret",   // acess_secret.      "ap-southeast-1",  //region      "KEY_ID",          //key id of the KMS key for your application user.     "INFURA_PROVIDER", //Node provider        "CHAIN_NAME"       // Chain name. mainnet, kovan or ropsten   );    // The payload we want to sign with the private   const payload: TxData = {     nonce: 0,     gasPrice: "0x0918400000",     gasLimit: 160000,     to: "0x0000000000000000000000000000000000000000",     value: "0x00",     data: "0x00",   };   signer.sendPayload(payload); };  main(); 

以太坊ethKMS

以太坊ethKMS是一个javascript库,允许应用程序使用Amazon密钥管理服务(KMS)作为签名者。这确保了私钥永远不会离开由AWS管理的硬件存储,实现了企业级的安全性。

当应用程序将为用户管理签名过程时,请使用此库。

安装

yarn add ethereum-kms 

用法

您需要一个amazon aws帐户,并且需要创建一个非对称密钥,用于在KMS仪表板中签名和验证。在KMS控制台中选择secp256k1实现。添加IAM用户以访问此密钥。

简单使用:

import { TxData } from "ethereumjs-tx"; import { KMSSigner } from "ethereum-kms"; const main = async () => {   const signer = new KMSSigner(     "access_key_id",   // acess_key_id of your IAM user with access to the key.     "access_secret",   // acess_secret.      "ap-southeast-1",  //region      "KEY_ID",          //key id of the KMS key for your application user.     "INFURA_PROVIDER", //Node provider        "CHAIN_NAME"       // Chain name. mainnet, kovan or ropsten   );    // The payload we want to sign with the private   const payload: TxData = {     nonce: 0,     gasPrice: "0x0918400000",     gasLimit: 160000,     to: "0x0000000000000000000000000000000000000000",     value: "0x00",     data: "0x00",   };   signer.sendPayload(payload); };  main(); 

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20995.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Ethereum-KMS – 以太坊KMS

提供最优质的资源集合

立即查看 了解详情