-
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.
- Loading branch information
1 parent
137b7a3
commit fcd8c39
Showing
7 changed files
with
39 additions
and
32 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const baseConfig = require('../../.eslintrc.js') | ||
const baseConfig = require('../../.eslintrc.js'); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
} | ||
}; |
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 |
---|---|---|
|
@@ -13,8 +13,8 @@ $ yarn add @nucypher/taco [email protected] | |
### Encrypt your data | ||
|
||
```typescript | ||
import {initialize, encrypt, conditions, domains} from '@nucypher/taco'; | ||
import {ethers} from "ethers"; | ||
import { conditions, domains, encrypt, initialize } from '@nucypher/taco'; | ||
import { ethers } from 'ethers'; | ||
|
||
// We have to initialize the TACo library first | ||
await initialize(); | ||
|
@@ -27,23 +27,23 @@ const ownsNFT = new conditions.predefined.ERC721Ownership({ | |
chain: 5, | ||
}); | ||
|
||
const message = "my secret message"; | ||
const message = 'my secret message'; | ||
|
||
const messageKit = await encrypt( | ||
web3Provider, | ||
domains.TESTNET, | ||
message, | ||
ownsNFT, | ||
ritualId, | ||
web3Provider.getSigner() | ||
web3Provider.getSigner(), | ||
); | ||
``` | ||
|
||
### Decrypt your data | ||
|
||
```typescript | ||
import {initialize, decrypt, domains, getPorterUri} from '@nucypher/taco'; | ||
import {ethers} from "ethers"; | ||
import { decrypt, domains, getPorterUri, initialize } from '@nucypher/taco'; | ||
import { ethers } from 'ethers'; | ||
|
||
// We have to initialize the TACo library first | ||
await initialize(); | ||
|
@@ -55,6 +55,6 @@ const decryptedMessage = await decrypt( | |
domains.TESTNET, | ||
messageKit, | ||
getPorterUri(domains.TESTNET), | ||
web3Provider.getSigner() | ||
web3Provider.getSigner(), | ||
); | ||
``` |
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,7 @@ | ||
# `examples/taco` | ||
|
||
These examples are not tested, but are typechecked with `pnpm type-check` instead. | ||
These examples are not tested, but are typechecked with `pnpm type-check` | ||
instead. | ||
|
||
Some of these examples are used in the documentation. Others, are provided as an API reference. | ||
Some of these examples are used in the documentation. Others, are provided as an | ||
API reference. |
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
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