Skip to content

Commit

Permalink
trie: export "Path" interface (#3292)
Browse files Browse the repository at this point in the history
* trie: export "Path" interface

* Move over Path interface export to types for consistency

---------

Co-authored-by: Holger Drewes <Holger.Drewes@gmail.com>
  • Loading branch information
2 people authored and jochem-brouwer committed Mar 1, 2024
1 parent 1c413fa commit d5a6ca8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 1 addition & 6 deletions packages/trie/src/trie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import type {
EmbeddedNode,
FoundNodeFunction,
Nibbles,
Path,
Proof,
TrieNode,
TrieOpts,
Expand All @@ -47,12 +48,6 @@ import type { OnFound } from './util/asyncWalk.js'
import type { BatchDBOp, DB, PutBatch } from '@ethereumjs/util'
import type { Debugger } from 'debug'

interface Path {
node: TrieNode | null
remaining: Nibbles
stack: TrieNode[]
}

/**
* The basic trie interface, use with `import { Trie } from '@ethereumjs/trie'`.
*/
Expand Down
6 changes: 6 additions & 0 deletions packages/trie/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export interface CommonInterface {
}
}

export interface Path {
node: TrieNode | null
remaining: Nibbles
stack: TrieNode[]
}

export type FoundNodeFunction = (
nodeRef: Uint8Array,
node: TrieNode | null,
Expand Down

0 comments on commit d5a6ca8

Please sign in to comment.