0.6.0 • Published 7 months ago
@nucypher/taco v0.6.0
@nucypher/taco
nucypher/taco-web
Supported taco versions
To use taco, you need to connect with a proper network: mainnet, testnet, or devnet. You can find a proper version for each network in the npmjs.com package tags.
Visit our documentation to learn more.
Usage
First, install the package:
$ yarn add @nucypher/taco ethers@5.7.2Encrypt your data
import { conditions, domains, encrypt, initialize } from '@nucypher/taco';
import { ethers } from 'ethers';
// We have to initialize the TACo library first
await initialize();
const web3Provider = new ethers.providers.Web3Provider(window.ethereum);
const ownsNFT = new conditions.predefined.ERC721Ownership({
contractAddress: '0x1e988ba4692e52Bc50b375bcC8585b95c48AaD77',
parameters: [3591],
chain: 5,
});
const message = 'my secret message';
const messageKit = await encrypt(
web3Provider,
domains.TESTNET,
message,
ownsNFT,
ritualId,
web3Provider.getSigner(),
);Decrypt your data
import { decrypt, domains, getPorterUri, initialize } from '@nucypher/taco';
import { ethers } from 'ethers';
// We have to initialize the TACo library first
await initialize();
const web3Provider = new ethers.providers.Web3Provider(window.ethereum);
const decryptedMessage = await decrypt(
web3Provider,
domains.TESTNET,
messageKit,
web3Provider.getSigner(),
);Learn more
Please find developer documentation for TACo here.
0.6.0-alpha.1
1 year ago
0.6.0-alpha.2
11 months ago
0.6.0-alpha.0
1 year ago
0.6.0-alpha.3
8 months ago
0.6.0
7 months ago
0.5.0
1 year ago
0.4.0
1 year ago
0.3.0
1 year ago
0.2.7
1 year ago
0.2.6
2 years ago
0.2.5
2 years ago
0.2.3
2 years ago
0.2.4
2 years ago
0.2.1
2 years ago
0.2.0
2 years ago
0.2.2
2 years ago
0.1.0
2 years ago
0.1.0-rc.7
2 years ago
0.1.0-rc.6
2 years ago
0.1.0-rc.5
2 years ago
0.1.0-rc.4
2 years ago
0.1.0-rc.3
2 years ago
0.1.0-rc.2
2 years ago
0.1.0-rc.1
2 years ago
0.1.0-rc.0
2 years ago