feat(bb.js): initial API#232
Merged
Merged
Conversation
9ea1a07 to
754781a
Compare
754781a to
db55a4c
Compare
ludamad
commented
Mar 10, 2023
| "solidity.compileUsingRemoteVersion": "v0.6.10+commit.00c0fcaf", | ||
| "search.exclude": { | ||
| "**/.yarn": true, | ||
| "**/.pnp.*": true |
Collaborator
Author
There was a problem hiding this comment.
Settings for tsdk (at least if we decided to keep using PNP), prettier, eslint
ludamad
commented
Mar 10, 2023
| $<TARGET_OBJECTS:stdlib_pedersen_objects> | ||
| $<TARGET_OBJECTS:stdlib_blake2s_objects> | ||
| $<TARGET_OBJECTS:stdlib_blake3s_objects> | ||
| $<TARGET_OBJECTS:stdlib_sha256_objects> |
Collaborator
Author
There was a problem hiding this comment.
Missing from wasm build
ludamad
commented
Mar 10, 2023
| #!/usr/bin/env node | ||
| /* eslint-disable */ | ||
| "use strict"; | ||
|
|
ludamad
commented
Mar 10, 2023
| // If not done already, precompute constants. | ||
| wasm.call("pedersen__init"); | ||
| const inputVectors = serializeBufferArrayToVector(inputs); | ||
| wasm.writeMemory(inputVectors, 0); |
Collaborator
Author
There was a problem hiding this comment.
Hm. Should we be writing to 0 instead of using bbmalloc?
There was a problem hiding this comment.
For data we can't control how big it will be should be written to allocated memory?
Collaborator
Author
There was a problem hiding this comment.
My thought too. I did a straight refactor for now, but some stuff has overflow risks
sirasistant
reviewed
Mar 10, 2023
| * @param rhs - The second hash. | ||
| * @returns The new 32-byte hash. | ||
| */ | ||
| export function pedersenCompress( |
There was a problem hiding this comment.
I like the function format a lot for these wasm calls
* feat(b.js): bundle yalc dependencies * doc: running instructions in README --------- Co-authored-by: Adam Domurad <adam@aztecprotocol.com>
This was referenced Mar 14, 2023
ludamad
added a commit
to AztecProtocol/aztec-packages
that referenced
this pull request
Jul 22, 2023
* fix: wasm build * feat: vscode settings * feat(b.js): initial typescript bindings * doc: running instructions in README * build: fix lint * Adam/feat/typescript bindings yalc (AztecProtocol/barretenberg#241) * feat(b.js): bundle yalc dependencies * doc: running instructions in README --------- Co-authored-by: Adam Domurad <adam@aztecprotocol.com> --------- Co-authored-by: Adam Domurad <adam@aztecprotocol.com>
ludamad
added a commit
to AztecProtocol/aztec-packages
that referenced
this pull request
Jul 24, 2023
* fix: wasm build * feat: vscode settings * feat(b.js): initial typescript bindings * doc: running instructions in README * build: fix lint * Adam/feat/typescript bindings yalc (AztecProtocol/barretenberg#241) * feat(b.js): bundle yalc dependencies * doc: running instructions in README --------- Co-authored-by: Adam Domurad <adam@aztecprotocol.com> --------- Co-authored-by: Adam Domurad <adam@aztecprotocol.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Barretenberg.js initial bindings. Mainly exposes pedersen. To make this work you should also merge
adam/feat/typescript-bindings-yalcinto the repo. It is not included here as it is many files that would distract the review. They should probably be merged together.Checklist:
/markdown/specshave been updated.@briefdescribing the intended functionality.