Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 738 Bytes

README.md

File metadata and controls

39 lines (31 loc) · 738 Bytes

beam-js-testnet

PoC of beam.js (createAddr, balance and send tx)

pm2 start beamjs_service.js

full api reference https://github.com/BeamMW/beam/wiki/Beam-wallet-protocol-API#create_address

use on dAPP side

//create address
rpcRequest = 
{
	"jsonrpc":"2.0", 
	"id": 1,
	"method":"create_address", 
	"params":
	{
		"expiration": "24h"
	}
}
 
$.ajax({
type: "POST",
url: "http://116.203.203.109:3000/rpc?ethereumAddress="+web3.eth.address&sign="+web3.sign(rpcRequest),
 data: JSON.stringify(rpcRequest),
success: function(data)
{
     console.log(data);
}
});

try to send txid from address of incorrect user

TODO close all other methods