Creates a new Node.
Object
serialize function
By default is JSON.stringify
deserialize function
By default is JSON.parse
rpcFilter function
Can be used to block or manipulate the rpc that is going to be created.
Object
A new Node instance.
import { createNode } from 'dop'
const node = createNode({
serialize: JSON.stringify,
deserialize: JSON.parse,
rpcFilter: ({ rpc }) => rpc,
})