-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:ethereum-attestation-service/eas-sdk
- Loading branch information
Showing
11 changed files
with
7,110 additions
and
5,348 deletions.
There are no files selected for viewing
This file contains 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,22 @@ | ||
# Dependencies | ||
/node_modules | ||
pnpm-lock.yaml | ||
|
||
# Testing | ||
/coverage | ||
.hardhat-dependency-compiler | ||
|
||
# Production | ||
/build | ||
/dist | ||
typechain-types | ||
typechain | ||
|
||
# Ignore all .env files | ||
.env* | ||
!.env | ||
!.env.template | ||
|
||
# Misc | ||
.DS_Store | ||
.vscode/ |
This file contains 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 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 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,37 @@ | ||
export type FullMerkleDataTree = { | ||
root: string; | ||
values: MerkleValueWithSalt[]; | ||
}; | ||
export interface MerkleMultiProof { | ||
leaves: Leaf[]; | ||
proof: string[]; | ||
proofFlags: boolean[]; | ||
} | ||
export interface Leaf { | ||
type: string; | ||
name: string; | ||
value: unknown; | ||
salt: string; | ||
} | ||
export interface MerkleValue { | ||
type: string; | ||
name: string; | ||
value: unknown; | ||
} | ||
export type MerkleValueWithSalt = MerkleValue & { | ||
salt: string; | ||
}; | ||
export type EncodedMerkleValue = [string, string, string, string]; | ||
export declare class PrivateData { | ||
private tree; | ||
private values; | ||
constructor(values: MerkleValue[] | MerkleValueWithSalt[]); | ||
private encodeValuesToMerkleTree; | ||
private encodeMerkleValues; | ||
private decodeMerkleValues; | ||
getFullTree(): FullMerkleDataTree; | ||
generateMultiProof(indexes: number[]): MerkleMultiProof; | ||
static verifyMultiProof(root: string, proof: MerkleMultiProof): boolean; | ||
private static encodeMerkleValues; | ||
static verifyFullTree(tree: FullMerkleDataTree): string; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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,6 +1,6 @@ | ||
{ | ||
"name": "@ethereum-attestation-service/eas-sdk", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Ethereum Attestation Service - TypeScript/JavaScript SDK", | ||
"repository": "[email protected]:ethereum-attestation-service/eas-sdk.git", | ||
"author": "Leonid Beder <[email protected]>", | ||
|
@@ -14,11 +14,12 @@ | |
"build": "rm -rf dist && tsc --build tsconfig.json", | ||
"test": "cd test && pnpm test", | ||
"lint": "eslint -c .eslintrc --ext .ts src test", | ||
"format": "prettier --check --write src/**/*.ts test/test/**/*.ts --config .prettierrc", | ||
"prepare:release": "pnpm lint && pnpm test && pnpm build" | ||
"format": "prettier --check --write . --config .prettierrc", | ||
"prepare:release": "pnpm lint && pnpm format && pnpm test && pnpm build" | ||
}, | ||
"dependencies": { | ||
"@ethereum-attestation-service/eas-contracts": "1.4.1", | ||
"@openzeppelin/merkle-tree": "^1.0.6", | ||
"ethers": "^6.11.1", | ||
"js-base64": "^3.7.7", | ||
"lodash": "^4.17.21", | ||
|
Oops, something went wrong.