From d5a6ca8702a7199baf530388cb74f3d066402316 Mon Sep 17 00:00:00 2001 From: Scotty <66335769+ScottyPoi@users.noreply.github.com> Date: Mon, 26 Feb 2024 03:09:32 -0700 Subject: [PATCH] trie: export "Path" interface (#3292) * trie: export "Path" interface * Move over Path interface export to types for consistency --------- Co-authored-by: Holger Drewes --- packages/trie/src/trie.ts | 7 +------ packages/trie/src/types.ts | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/trie/src/trie.ts b/packages/trie/src/trie.ts index 6ced72adcb..b63036cf5b 100644 --- a/packages/trie/src/trie.ts +++ b/packages/trie/src/trie.ts @@ -37,6 +37,7 @@ import type { EmbeddedNode, FoundNodeFunction, Nibbles, + Path, Proof, TrieNode, TrieOpts, @@ -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'`. */ diff --git a/packages/trie/src/types.ts b/packages/trie/src/types.ts index 9aa2d96e75..5928c2ee8a 100644 --- a/packages/trie/src/types.ts +++ b/packages/trie/src/types.ts @@ -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,