-
Notifications
You must be signed in to change notification settings - Fork 381
feat: Add noir types package #2893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
5ca20f7
Copy from Kobys Branch
kevaundray e120e24
revert to previous definition
kevaundray 15ebc21
remove unused ignore file
kevaundray 29d7f94
revert: group tooling workspace packages
kevaundray 190f011
format
kevaundray c053aac
update yarn.lock
kevaundray 9dcbbca
Import types into noir_js
kevaundray bbcf611
replace anonymous object with CompiledCircuit type
kevaundray 7959844
export Noir
kevaundray ebaa551
lint fix
kevaundray 894162d
update lockfile
kevaundray ef6ad1c
remove prettier
kevaundray 01aee47
lint fix
kevaundray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| // Since this is a simple function, we can use feature detection to | ||
| // see if we are in the nodeJs environment or the browser environment. | ||
| export function base64Decode(input: string): Uint8Array { | ||
| if (typeof Buffer !== 'undefined') { | ||
| if (typeof Buffer !== "undefined") { | ||
| // Node.js environment | ||
| return Buffer.from(input, 'base64'); | ||
| } else if (typeof atob === 'function') { | ||
| return Buffer.from(input, "base64"); | ||
| } else if (typeof atob === "function") { | ||
| // Browser environment | ||
| return Uint8Array.from(atob(input), (c) => c.charCodeAt(0)); | ||
| } else { | ||
| throw new Error('No implementation found for base64 decoding.'); | ||
| throw new Error("No implementation found for base64 decoding."); | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| import * as acvm from '@noir-lang/acvm_js'; | ||
| import * as abi from '@noir-lang/noirc_abi'; | ||
| import * as acvm from "@noir-lang/acvm_js"; | ||
| import * as abi from "@noir-lang/noirc_abi"; | ||
|
|
||
| export { acvm, abi }; | ||
|
|
||
| export { generateWitness } from './witness_generation.js'; | ||
| export { acirToUint8Array, witnessMapToUint8Array } from './serialize.js'; | ||
| export { generateWitness } from "./witness_generation.js"; | ||
| export { acirToUint8Array, witnessMapToUint8Array } from "./serialize.js"; | ||
|
|
||
| export { Noir } from "./program.js"; |
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| node_modules |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| module.exports = { | ||
| extends: ['../../.eslintrc.js'], | ||
| }; |
Empty file.
File renamed without changes.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "name": "@noir-lang/types", | ||
kevaundray marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "collaborators": [ | ||
| "The Noir Team <team@noir-lang.org>" | ||
| ], | ||
| "version": "0.14.1", | ||
| "packageManager": "yarn@3.5.1", | ||
| "license": "(MIT OR Apache-2.0)", | ||
| "files": [ | ||
| "lib", | ||
| "package.json" | ||
| ], | ||
| "types": "lib/types.ts" | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.