0x278f6702c5972724d90ef49b7693aa46ec78ecee67687060ea7e7040db8dd6d7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ConnectionMachine = Machine({ | |
id: 'connection', | |
initial: 'inactive', | |
context: {}, | |
on: { | |
CONNECT: { | |
actions: ['assignConnector'], | |
target: '#active', | |
}, | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const parentWalletConnectionMachine = Machine( | |
{ | |
id: 'walletConnector', | |
initial: 'disconnected', | |
context: {}, | |
states: { | |
disconnected: { | |
entry: ['disconnect'], | |
on: { | |
CONNECT: 'connecting', |
I hereby claim:
- I am gabrocheleau on github.
- I am gabrocheleau (https://keybase.io/gabrocheleau) on keybase.
- I have a public key ASBRsfQHcfvytgJSe3IjYZ4nRvfGJLvhfEVq1uSJtdh0EAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const walletConnectionMachine = Machine({ | |
id: 'walletConnection', | |
initial: 'idle', | |
states: { | |
idle: { | |
on: { | |
SUBMIT: 'loading', | |
}, | |
}, | |
loading: { on: { CONNECTED: 'connected', ERROR: 'error' } }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root1 = trie1.root | |
root2 = trie2.root | |
console.log(root1) | |
console.log(root2) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var node2 = await trie._lookupNode(Buffer.from(node1.node._branches[3])) // Looking up the child node from its hash (using _lookupNode) | |
console.log(node2) // An extension node! | |
// RESULT | |
ExtensionNode { | |
_nibbles: [ 0, 3, 0, 3, 0 ], | |
_value: | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Transaction hash: ', keccak256(rlp.encode(transactionNode))) | |
// RESULT | |
Transaction hash: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(Buffer.from('testKey')) | |
console.log(Buffer.from('testKey0001')) | |
console.log(Buffer.from('testKey000A')) | |
// RESULT | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Our computed hash: ', keccak256(rlp.encode(node2.raw()))) | |
console.log('The extension node hash: ', node1.node._branches[3]) | |
// RESULT | |
Our computed hash: | |
The extension node hash: |
NewerOlder