跳到主要内容

privateKey

配置项介绍

此配置项为 Node 环境下, ethereum 钱包私钥,对发起的交易进行签名。

privateKey: 由 '0x' + 64 位私钥组成,共 66 位。

import HyMatrix from 'hymatrix-js'

const privateKey = '0x...' // 以 0x 开头 + 64位 = 66位
const hyMatrix = new HyMatrix({
privateKey: privateKey
})
私钥泄漏风险

此方式在代码中明文传递私钥,存在安全风险