We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17fce44 commit 53f7711Copy full SHA for 53f7711
1 file changed
README.md
@@ -64,15 +64,15 @@ npm install keychain.js
64
const { Keychain, KeychainWeb3 } = require('keychain.js');
65
const Web3 = require('web3');
66
const web3 = new Web3('YOUR_API_URL'); // https://ropsten.infura.io/v3/046804e3dd3240b09834531326f310cf
67
-const transactionParams = {
+const tx = {
68
to: '0xE8899BA12578d60e4D0683a596EDaCbC85eC18CC',
69
value: 100,
70
gas: 21000
71
};
72
const keychain = new Keychain();
73
const keychainWeb3 = new KeychainWeb3(keychain, web3);
74
keychain.selectKey()
75
- .then(publicKey => keychainWeb3.signTransaction(transactionParams, publicKey))
+ .then(publicKey => keychainWeb3.signTransaction(tx, publicKey))
76
.then(result => web3.eth.sendSignedTransaction(result.rawTransaction));
77
```
78
0 commit comments