LOADING...
LOADING...
LOADING...
当前位置:主页 > 知识列表 >

console

1. 墨客区块链(MOAC BlockChain) 数据签名及验证

...ounts[0];var sha3Msg = chain3.sha3("HELLO MOAC!");var signedData = chain3.mc.sign(account, sha3Msg);console.log("account: " + account);console.log("sha3Msg: " + sha3Msg);console.log("Signed data: " + signedData);在上面的代码中,先将要签名的数据"HELLO MOAC!"生成哈希串,使用chain3.sha3("HELLO MOAC!")。接着我们使用当前连接节点的第一个默认帐户进行签名...

知识:智能合约,私钥,合约,公钥

2. 墨客科普| MOAC区块链 SDK接口

...Chain;try{var vc = new VnodeChain("http://47.106.69.61:8989");var blockNumber = vc.getBlockNumber();console.log(blockNumber);}catch (e){console.log(e);}   2.钱包模块   2.1 注册   参数:   pwd:钱包账户密码   代码:   var account = require("moac-api").account;var wallet = account.register(pwd);   返回:   wallet:{ address: '钱包地址....',private...

知识:钱包,合约,参数

3. 区块链钱包技术分享

...数种植let?password?=?'123456'; ????let?seedAsHex?=?bip39.mnemonicToSeedHex(words,?password); ????console.log("random?deed?is?"?=?seedAsHex);这里生成的随机数种子可以当作私钥字符串拿去生成keystore2. 生成 keystore,并导出私钥这里需要用到 keythereum 库,Keythereum 是一个生成、导入和导出以太坊 keys 的一个 javascript 工具。这个库提供了...

知识:钱包,私钥,区块链钱包,以太坊

4. 区块链轻钱包技术分享

...数种植let?password?=?'123456'; ????let?seedAsHex?=?bip39.mnemonicToSeedHex(words,?password); ????console.log("random?deed?is?"?=?seedAsHex);这里生成的随机数种子可以当作私钥字符串拿去生成keystore2. 生成 keystore,并导出私钥这里需要用到 keythereum 库,Keythereum 是一个生成、导入和导出以太坊 keys 的一个 javascript 工具。这个库提供了...

知识:钱包,私钥,区块链钱包,以太坊

5. MOAC区块链 SDK接口

... new VnodeChain("http://47.106.69.61:8989");</li><li>var blockNumber = vc.getBlockNumber();</li><li>console.log(blockNumber);</li><li>}catch (e){</li><li>console.log(e);</li><li>}</li></ol> <h2>2.钱包模块</h2> <h3>2.1 注册</h3> 参数:pwd:钱包账户密码 代码: <ol><li>var account = require("moac-api").account;</li><li>var wallet = account.register(pwd);</li></ol> 返回: <ol><li>walle...

知识:钱包,合约,参数

6. 基于solidity智能合约在tron网络中进行异步调用

...PJajS"; ... function RunTest() { var Budget = ToTRX(0.01); var Transfer = ToTRX(0.5); console.log("RunTest / Budget = " + Budget + ", Transfer Value = " + Transfer); SeamansContract.Run(1, "math:log2(16)", "", "mathjs", 1, Budget). send({shouldPollResponse: true, callValue: Transfer}).catch(function( err) { console.log(err); }).then( console.log("RUN EXECUTED") ); } function Se...

知识:合约,以太坊,智能

7. Sony PlayStation 5 Launch Date Revealed

Sales of the new Sony PlayStation 5 game console will start on December 4, 2020, Nation News reports citing insiders. Employees of the Pro Gaming Shop online store mistakenly (or intentionally) posted information on the start date of sales and the price of the console on the network.? According to published data, the price of new console will start at 500 euros. The new information contradicts p...

知识:插图,console,start,December

8. 雅达利下个月启动Crypto Game Console!

家用视频游戏的先驱之一,雅达利(Atari),准备在20多年后再次推出其首个硬件。 新的Atari VCS将具有内置的加密货币功能。即使与新游戏机同时发布,Atari也会针对不同的市场。 该公司希望借助其最新的游戏系统,使其在逐渐成长为玩Atari游戏的玩家中广受欢迎。可以访问100多个经典街机游戏!Atari出...

知识:加密货币,代币,货币,游戏

9. 【Substrate开发教程】14 - 使用polkadot-js API获取链上信息

...t api.query.timestamp.now(); const { nonce, data: balance } = await api.query.system.account(ADDR); console.log(`${now}: balance of ${balance.free} and a nonce of ${nonce}`);RPC查询(RPC queries)api.rpc使用api.query相同的样式,如获取Substrate区块链名和最后一个区块头的编号和哈希值:const chain = await api.rpc.system.chain(); const lastHeader = await api.rpc.chain...

知识:区块,区块链,链上,本地节点

10. 如何压缩pchain的旧数据

...容用‘#’注释掉,保存之后退出2. 导出chainblock在pchain运行的情况下,进入console,执行admin.exportChain(“filename”)导出对应主/子链的全部区块信息导出的文件会生成在启动pchain的目录下若需导出主链,则连接到主链的console后执行admin.exportChain(“filename”)若需导出子链,则连接到子链的console后执行admin.expo...

知识:区块信息,区块,硬分叉升级,主链和子链

11. FIBOS 100%纯小白从0开始兑换教程

...pubkey = FIBOS.modules.ecc.privateToPublic(prikey);var account = "输入你自己的FIBOS账号名";console.log('prikey', prikey);console.log('pubkey', pubkey);var httpClient = new http.Client();var httpServerHost = "http://tunnel.fibos.io/1.0/app/token/create";var rep = httpClient.post(httpServerHost, {json: {account: account,pubkey: pubkey}}).json()console.log(rep);拷贝之后,检查代码是...

知识:私钥,提现地址,币安,区块链

12. 如何使用node.js语言实现PBFT协议 part3

...ind(t =&gt; t.id === transaction.id); return exists; } // empties the pool clear() { console.log("TRANSACTION POOL CLEARED"); this.transactions = []; } } module.exports = TransactionPool; pbft-txn-pool.js BlockPool类 为了临时存储块,我们还将生成块池。创建一个block-pool.js文件,其中blockpool类保存块,直到将其添加到链中。当收到PRE...

知识:区块,消息,创建一个

13. 供应链用例:Merkle Tree之链下资产交易

...ft.treeString(layer+1)}${this.right.treeString(layer+1)}`}/***Printthetreestringofthenode.*/print(){console.log(this.treeString())}所以整个类应该是:importhashfrom'../hash.utils'import{isString}from'./utils'exportdefaultclassNode{/***Nodeconstructor.*@param{Node|String}lefttheleftchildrenofthenode.*@param{Node}righttherightchildrenofthenode.*/constructor(left,right=null){if(isString(left)...

知识:节点

14. 墨客科普 | MOAC区块链钱包账号管理

...rypto'); const identity = EthCrypto.createIdentity(); //可以直接显示私钥、公钥和地址console.log('privateKey:'+identity.privateKey);console.log('publicKey: '+identity.publicKey);console.log('address: '+identity.address); /* > privateKey:0xafd2fa1a57103993c16e2318f45206417c5cf840bb204603912b8dc54b7d8800publicKey: 37b7d6b1b7bc05947d42ecfd3b63dee6cd54ff3ebfd5c6637f3224f45d05c2f4ad0b...

知识:私钥,钱包,区块,公钥

15. 墨客科普 | MOAC区块链钱包账号管理

...rypto'); const identity = EthCrypto.createIdentity(); //可以直接显示私钥、公钥和地址console.log('privateKey:'+identity.privateKey);console.log('publicKey: '+identity.publicKey);console.log('address: '+identity.address); /* &gt; privateKey:0xafd2fa1a57103993c16e2318f45206417c5cf840bb204603912b8dc54b7d8800publicKey: 37b7d6b1b7bc05947d42ecfd3b63dee6cd54ff3ebfd5c6637f3224f45d05c2f4a...

知识:私钥,钱包,区块,公钥