-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(monorepo): create a monorepo structure
- Loading branch information
1 parent
3120df4
commit 06f95ad
Showing
121 changed files
with
29,447 additions
and
32,889 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,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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 @@ | ||
*.md |
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,55 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
'root': true, | ||
'parser': '@typescript-eslint/parser', | ||
'env': { | ||
'es6': true, | ||
}, | ||
'ignorePatterns': [ | ||
'node_modules', | ||
'build', | ||
'coverage', | ||
'src/contracts/ethers-typechain', | ||
], | ||
'plugins': [ | ||
'import', | ||
'eslint-comments', | ||
], | ||
'extends': [ | ||
'eslint:recommended', | ||
'plugin:eslint-comments/recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/typescript', | ||
'prettier', | ||
], | ||
'globals': { | ||
'BigInt': true, | ||
'console': true, | ||
'WebAssembly': true, | ||
}, | ||
'rules': { | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'eslint-comments/disable-enable-pair': [ | ||
'error', | ||
{ | ||
'allowWholeFile': true, | ||
}, | ||
], | ||
'import/order': [ | ||
'error', | ||
{ | ||
'newlines-between': 'always', | ||
'alphabetize': { | ||
'order': 'asc', | ||
}, | ||
}, | ||
], | ||
'sort-imports': [ | ||
'error', | ||
{ | ||
'ignoreDeclarationSort': true, | ||
'ignoreCase': true, | ||
}, | ||
], | ||
}, | ||
}; |
This file was deleted.
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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
*.log | ||
.DS_Store | ||
node_modules | ||
build | ||
dist | ||
*.log | ||
*.tsbuildinfo | ||
.DS_Store | ||
coverage | ||
example/dist | ||
.husky | ||
.env | ||
types | ||
dist | ||
.nvmrc | ||
!examples/**/.env | ||
src/contracts/ethers-typechain | ||
contracts/compiled | ||
examples/*/pnpm-lock.yaml | ||
pnpm-debug.log | ||
docs-json | ||
docs |
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
16 |
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,5 +1,8 @@ | ||
# package.json is formatted by package managers, so we ignore it here | ||
package.json | ||
coverage | ||
build | ||
types/ethers-contracts | ||
**/dist/** | ||
**/types/** | ||
**/build/** | ||
CHANGELOG.md | ||
**/*.sol | ||
README.md | ||
/packages/nucypher-ts/src/contracts/ethers-typechain/ |
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,8 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"proseWrap": "always" | ||
} |
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,37 +1 @@ | ||
# nucypher-ts | ||
|
||
A TypeScript library for interacting with access control functionality in the browser. | ||
|
||
Full documentation can be found [here](https://docs.threshold.network/app-development/threshold-access-control-tac). | ||
|
||
> **Warning** | ||
> | ||
> `nucypher-ts` is under [active development](https://github.com/nucypher/nucypher-ts/pulls): | ||
> | ||
> - SDK does not support policy revocation. | ||
> - We expect breaking changes. | ||
## Installation | ||
|
||
``` | ||
yarn add @nucypher/nucypher-ts | ||
``` | ||
|
||
## Tutorial | ||
|
||
To learn more, follow the tutorial at Threshold Network's [docs](https://docs.threshold.network/app-development/threshold-access-control-tac/get-started-with-tac). | ||
|
||
## Examples | ||
|
||
See [`nucypher-ts/examples`](https://github.com/nucypher/nucypher-ts/tree/main/examples) to find out how to integrate `nucypher-ts` into your favorite web framework. | ||
|
||
We also provide two code samples of TAC applications: | ||
|
||
- [nucypher/tdec-sandbox](https://github.com/nucypher/tdec-sandbox) | ||
- [nucypher/tdec-nft-example](https://github.com/nucypher/tdec-nft-example) | ||
|
||
These examples showcase integration with React-based web application and an end-to-end flow of creating conditioned encryption, and encrypting & decrypting data. | ||
|
||
# Contributing | ||
|
||
If you would like to contribute to the development of `nucypher-ts`, please see our [Contributing Guide](CONTRIBUTING.md). You can also join our [Discord](http://discord.gg/threshold) and say hello! | ||
# nucypher-ts-mono |
This file was deleted.
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,25 +1,25 @@ | ||
const bodyParser = require('body-parser'); | ||
const cors = require('cors'); | ||
const express = require('express'); | ||
const router = require('express').Router(); | ||
const nucypher = require('@nucypher/nucypher-ts'); | ||
|
||
router.get('/', (req, res) => { | ||
const config = { | ||
// Public Porter endpoint on Tapir network | ||
porterUri: 'https://porter-tapir.nucypher.community', | ||
}; | ||
|
||
const secretKey = nucypher.SecretKey.fromBytes(Buffer.from('fake-secret-key-32-bytes-bob-xxx')); | ||
const bob = nucypher.Bob.fromSecretKey(config, secretKey); | ||
|
||
res.send(bob.decryptingKey.toString()); | ||
}); | ||
|
||
const app = express(); | ||
app.use(bodyParser.json()); | ||
app.use(cors()); | ||
app.use(router); | ||
|
||
const port = 3000; | ||
app.listen(port, () => console.log(`Listening on port ${port}!`)); | ||
const bodyParser = require('body-parser'); | ||
const cors = require('cors'); | ||
const express = require('express'); | ||
const router = require('express').Router(); | ||
const nucypher = require('@nucypher/nucypher-ts'); | ||
|
||
router.get('/', (req, res) => { | ||
const config = { | ||
// Public Porter endpoint on Tapir network | ||
porterUri: 'https://porter-tapir.nucypher.community', | ||
}; | ||
|
||
const secretKey = nucypher.SecretKey.fromBytes(Buffer.from('fake-secret-key-32-bytes-bob-xxx')); | ||
const bob = nucypher.Bob.fromSecretKey(config, secretKey); | ||
|
||
res.send(bob.decryptingKey.toString()); | ||
}); | ||
|
||
const app = express(); | ||
app.use(bodyParser.json()); | ||
app.use(cors()); | ||
app.use(router); | ||
|
||
const port = 3000; | ||
app.listen(port, () => console.log(`Listening on port ${port}!`)); |
Oops, something went wrong.