Skip to content

Commit

Permalink
Document builder field structure (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
HDegroote authored Nov 27, 2024
1 parent 0b1b881 commit a168e3c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@ When you flush this one, it updates the main instance also.

Close the database. You have to close any snapshots you use also.

## Builder API

See [example](./builder/example.js).

Each field in the builder file is an object:
```
{
name: 'field-name',
type: 'uint', // a compact-encoding type, or a reference to another encoding defined in the builder file
required: true, // false for optional
array: false // Store an array of 'type', instead of just one (default false)
}
```

## License

Apache-2.0

0 comments on commit a168e3c

Please sign in to comment.