Skip to content

Commit 2134dc8

Browse files
committed
move StandardMerkleTree.load docs to top of readme
1 parent b1e25b8 commit 2134dc8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ const verified = StandardMerkleTree.verify(root, ['address', 'uint'], [alice, '1
157157

158158
Returns a boolean that is `true` when the proof verifies that the value is contained in the tree given only the proof, merkle root, and encoding.
159159

160+
### `StandardMerkleTree.load`
161+
162+
```typescript
163+
StandardMerkleTree.load(JSON.parse(fs.readFileSync('tree.json')));
164+
```
165+
166+
Loads the tree from a description previously returned by `tree.dump`.
167+
160168
### `tree.root`
161169

162170
```typescript
@@ -173,14 +181,6 @@ fs.writeFileSync('tree.json', JSON.stringify(tree.dump()));
173181

174182
Returns a description of the merkle tree for distribution. It contains all the necessary information to reproduce the tree, find the relevant leaves, and generate proofs. You should distribute this to users in a web application or command line interface so they can generate proofs for their leaves of interest.
175183

176-
### `StandardMerkleTree.load`
177-
178-
```typescript
179-
StandardMerkleTree.load(JSON.parse(fs.readFileSync('tree.json')));
180-
```
181-
182-
Loads the tree from a description previously returned by `dump`.
183-
184184
### `tree.getProof`
185185

186186
```typescript

0 commit comments

Comments
 (0)