-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* signing lib running * removed unused packages * really removed unused packages
- Loading branch information
Showing
19 changed files
with
708 additions
and
0 deletions.
There are no files selected for viewing
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
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,3 @@ | ||
{ | ||
"presets": [["@nrwl/js/babel", { "useBuiltIns": "usage" }]] | ||
} |
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,18 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
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,29 @@ | ||
TRI_PROJECT_NAME := signature-verifier | ||
TRI_PROJECT_DIR := ./packages/signature-verifier | ||
|
||
# == Code format == | ||
|
||
signature-verifier/format: | ||
npx nx format:write --projects ${TRI_PROJECT_NAME} | ||
|
||
signature-verifier/lint: | ||
npx nx lint ${TRI_PROJECT_NAME} -- --fix | ||
|
||
signature-verifier/format/check: | ||
npx nx format:check --projects ${TRI_PROJECT_NAME} | ||
|
||
signature-verifier/lint/check: | ||
npx nx lint ${TRI_PROJECT_NAME} | ||
|
||
# == Testing == | ||
|
||
signature-verifier/test/type: | ||
npx tsc \ | ||
--project ${TRI_PROJECT_DIR}/tsconfig.lib.json \ | ||
--noEmit | ||
|
||
signature-verifier/test/unit: | ||
npx nx test:unit ${TRI_PROJECT_NAME} -- ${ARGS} | ||
|
||
signature-verifier/test/unit/watch: | ||
make signature-verifier/test/unit ARGS=--watch |
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,24 @@ | ||
# Transaction Request Intent | ||
|
||
[![Transaction Request Intent CI](https://github.com/narval-xyz/narval/actions/workflows/transaction_request_intent_ci.yml/badge.svg?branch=main)](https://github.com/narval-xyz/narval/actions/workflows/transaction_request_intent_ci.yml) | ||
|
||
Library to decode a | ||
[TransactionRequest](https://viem.sh/docs/glossary/types#transactionrequest) | ||
into an object with granular information. | ||
|
||
## Testing | ||
|
||
```bash | ||
make signature-verifier/test/unit | ||
make signature-verifier/test/unit/watch | ||
``` | ||
|
||
## Formatting | ||
|
||
```bash | ||
make signature-verifier/format | ||
make signature-verifier/lint | ||
|
||
make signature-verifier/format/check | ||
make signature-verifier/lint/check | ||
``` |
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,18 @@ | ||
import type { Config } from 'jest' | ||
|
||
const config: Config = { | ||
displayName: 'signature-verifier', | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], | ||
preset: '../../jest.preset.js', | ||
testEnvironment: 'node', | ||
transform: { | ||
'^.+\\.[tj]sx?$': [ | ||
'ts-jest', | ||
{ | ||
tsconfig: '<rootDir>/tsconfig.spec.json' | ||
} | ||
] | ||
} | ||
} | ||
|
||
export default config |
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,9 @@ | ||
import type { Config } from 'jest' | ||
import sharedConfig from './jest.config' | ||
|
||
const config: Config = { | ||
...sharedConfig, | ||
testMatch: ['<rootDir>/**/__test__/unit/**/*.spec.ts'] | ||
} | ||
|
||
export default config |
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,24 @@ | ||
{ | ||
"name": "signature-verifier", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "packages/signature-verifier/src", | ||
"projectType": "library", | ||
"targets": { | ||
"lint": { | ||
"executor": "@nx/eslint:lint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["packages/signature-verifier/**/*.ts"] | ||
} | ||
}, | ||
"test:unit": { | ||
"executor": "@nx/jest:jest", | ||
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"], | ||
"options": { | ||
"jestConfig": "packages/signature-verifier/jest.unit.ts", | ||
"verbose": true | ||
} | ||
} | ||
}, | ||
"tags": [] | ||
} |
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,2 @@ | ||
export { sign } from './src/lib/signature/signRequest' | ||
export { verify } from './src/lib/signature/verifySignature' |
Oops, something went wrong.