diff --git a/.changeset/config.json b/.changeset/config.json
index 3e35728fe..f26533d60 100644
--- a/.changeset/config.json
+++ b/.changeset/config.json
@@ -2,12 +2,7 @@
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
- "fixed": [
- [
- "@nucypher/shared",
- "@nucypher/taco"
- ]
- ],
+ "fixed": [["@nucypher/shared", "@nucypher/taco"]],
"linked": [],
"access": "public",
"baseBranch": "main",
diff --git a/.eslintrc.js b/.eslintrc.js
index 616ae2ece..e0c43f7a3 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,54 +1,51 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
- 'root': true,
- 'parser': '@typescript-eslint/parser',
- 'env': {
- 'es6': true,
+ root: true,
+ parser: '@typescript-eslint/parser',
+ env: {
+ es6: true,
},
- 'ignorePatterns': [
+ ignorePatterns: [
'node_modules',
'build',
'coverage',
'src/contracts/ethers-typechain',
],
- 'plugins': [
- 'import',
- 'eslint-comments',
- ],
- 'extends': [
+ 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,
+ globals: {
+ BigInt: true,
+ console: true,
+ WebAssembly: true,
},
- 'rules': {
+ rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'eslint-comments/disable-enable-pair': [
'error',
{
- 'allowWholeFile': true,
+ allowWholeFile: true,
},
],
'import/order': [
'error',
{
'newlines-between': 'always',
- 'alphabetize': {
- 'order': 'asc',
+ alphabetize: {
+ order: 'asc',
},
},
],
'sort-imports': [
'error',
{
- 'ignoreDeclarationSort': true,
- 'ignoreCase': true,
+ ignoreDeclarationSort: true,
+ ignoreCase: true,
},
],
},
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index c8838257a..e9f170d8d 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -9,19 +9,23 @@
- [ ] 1
- [ ] 2
-- [X] 3
+- [x] 3
**What this does:**
-> High-level idea of the changes introduced in this PR.
-> List relevant API changes (if any), as well as related PRs and issues.
+
+> High-level idea of the changes introduced in this PR. List relevant API
+> changes (if any), as well as related PRs and issues.
**Issues fixed/closed:**
+
> - Fixes #...
**Why it's needed:**
-> Explain how this PR fits in the greater context of the NuCypher Network.
-> E.g., if this PR address a `nucypher/productdev` issue, let reviewers know!
+
+> Explain how this PR fits in the greater context of the NuCypher Network. E.g.,
+> if this PR address a `nucypher/productdev` issue, let reviewers know!
**Notes for reviewers:**
-> What should reviewers focus on?
-> Is there a particular commit/function/section of your PR that requires more attention from reviewers?
+
+> What should reviewers focus on? Is there a particular commit/function/section
+> of your PR that requires more attention from reviewers?
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 279bdd8a8..1e6bc2d70 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,12 +1,12 @@
version: 2
updates:
- - package-ecosystem: "github-actions"
- directory: "/"
+ - package-ecosystem: 'github-actions'
+ directory: '/'
schedule:
- interval: "monthly"
+ interval: 'monthly'
open-pull-requests-limit: 5
- - package-ecosystem: "npm"
- directory: "/"
+ - package-ecosystem: 'npm'
+ directory: '/'
schedule:
- interval: "monthly"
+ interval: 'monthly'
open-pull-requests-limit: 5
diff --git a/.github/workflows/lynx.yml b/.github/workflows/lynx.yml
index 375ad718f..d6de9fed5 100644
--- a/.github/workflows/lynx.yml
+++ b/.github/workflows/lynx.yml
@@ -2,26 +2,27 @@ name: '🔎 Lynx Testnet Example'
on:
schedule:
- - cron: "0 * * * *" # Every hour
+ - cron: '0 * * * *' # Every hour
pull_request:
workflow_dispatch:
# TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
env:
- RPC_PROVIDER_URL: "https://rpc-amoy.polygon.technology"
- ENCRYPTOR_PRIVATE_KEY: "0x900edb9e8214b2353f82aa195e915128f419a92cfb8bbc0f4784f10ef4112b86"
- CONSUMER_PRIVATE_KEY: "0xf307e165339cb5deb2b8ec59c31a5c0a957b8e8453ce7fe8a19d9a4c8acf36d4"
- RITUAL_ID: "0"
+ RPC_PROVIDER_URL: 'https://rpc-amoy.polygon.technology'
+ ENCRYPTOR_PRIVATE_KEY: '0x900edb9e8214b2353f82aa195e915128f419a92cfb8bbc0f4784f10ef4112b86'
+ CONSUMER_PRIVATE_KEY: '0xf307e165339cb5deb2b8ec59c31a5c0a957b8e8453ce7fe8a19d9a4c8acf36d4'
+ RITUAL_ID: '0'
jobs:
networks:
- name: '🔎 Lynx Testnet Example on Node ${{ matrix.node }} and ${{ matrix.os }}'
+ name:
+ '🔎 Lynx Testnet Example on Node ${{ matrix.node }} and ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
- node: [ '18.x' ]
- os: [ ubuntu-latest ]
+ node: ['18.x']
+ os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9495688d6..dfa70bb48 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,5 +1,5 @@
name: CI
-on: [ push, pull_request ]
+on: [push, pull_request]
concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -9,8 +9,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- node: [ '18.x', '20.x', '22.x' ]
- os: [ ubuntu-latest ]
+ node: ['18.x', '20.x', '22.x']
+ os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
@@ -41,7 +41,6 @@ jobs:
with:
# https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954/21
fail_ci_if_error: false
-
# TODO: Fix or replace bundlemon on CI
# - name: Analyze bundle size
# uses: lironer/bundlemon-action@v1
diff --git a/.github/workflows/mainnet.yml b/.github/workflows/mainnet.yml
index 3d66516e6..c8aaaa80c 100644
--- a/.github/workflows/mainnet.yml
+++ b/.github/workflows/mainnet.yml
@@ -2,15 +2,15 @@ name: '🔎 Mainnet Example'
on:
schedule:
- - cron: "0 * * * *" # Every hour
+ - cron: '0 * * * *' # Every hour
workflow_dispatch:
# TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
env:
- RPC_PROVIDER_URL: "https://polygon.llamarpc.com"
+ RPC_PROVIDER_URL: 'https://polygon.llamarpc.com'
ENCRYPTOR_PRIVATE_KEY: ${{ secrets.MAINNET_ENCRYPTOR_PRIVATE_KEY }}
CONSUMER_PRIVATE_KEY: ${{ secrets.MAINNET_CONSUMER_PRIVATE_KEY }}
- RITUAL_ID: "9"
+ RITUAL_ID: '9'
jobs:
networks:
@@ -19,8 +19,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- node: [ '18.x' ]
- os: [ ubuntu-latest ]
+ node: ['18.x']
+ os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml
index 1fff3059f..6a5df4521 100644
--- a/.github/workflows/npm.yml
+++ b/.github/workflows/npm.yml
@@ -2,7 +2,7 @@ name: 'Test npmjs.com package'
on:
schedule:
- - cron: "0 * * * *" # Every hour
+ - cron: '0 * * * *' # Every hour
workflow_dispatch:
jobs:
@@ -10,8 +10,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- node: [ '18.x' ]
- version: [ 'latest', 'mainnet', 'devnet', 'testnet' ]
+ node: ['18.x']
+ version: ['latest', 'mainnet', 'devnet', 'testnet']
steps:
- uses: pnpm/action-setup@v4
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5ef22b9a4..fa55a0060 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -2,14 +2,14 @@ name: Release
on:
push:
branches:
- - "main"
+ - 'main'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish:
name: Publish NPM package using changesets
- runs-on: "ubuntu-latest"
+ runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
diff --git a/.github/workflows/tapir.yml b/.github/workflows/tapir.yml
index 2b546a2bd..6813c8c6b 100644
--- a/.github/workflows/tapir.yml
+++ b/.github/workflows/tapir.yml
@@ -2,7 +2,7 @@ name: '🔎 Tapir Testnet Example'
on:
schedule:
- - cron: "0 * * * *" # Every hour
+ - cron: '0 * * * *' # Every hour
pull_request:
branches:
- main
@@ -10,20 +10,21 @@ on:
# TODO: Use variables when GH supports it for forks. See https://github.com/orgs/community/discussions/44322
env:
- RPC_PROVIDER_URL: "https://rpc-amoy.polygon.technology"
- ENCRYPTOR_PRIVATE_KEY: "0x900edb9e8214b2353f82aa195e915128f419a92cfb8bbc0f4784f10ef4112b86"
- CONSUMER_PRIVATE_KEY: "0xf307e165339cb5deb2b8ec59c31a5c0a957b8e8453ce7fe8a19d9a4c8acf36d4"
- RITUAL_ID: "0"
+ RPC_PROVIDER_URL: 'https://rpc-amoy.polygon.technology'
+ ENCRYPTOR_PRIVATE_KEY: '0x900edb9e8214b2353f82aa195e915128f419a92cfb8bbc0f4784f10ef4112b86'
+ CONSUMER_PRIVATE_KEY: '0xf307e165339cb5deb2b8ec59c31a5c0a957b8e8453ce7fe8a19d9a4c8acf36d4'
+ RITUAL_ID: '0'
jobs:
networks:
- name: '🔎 Tapir Testnet Example on Node ${{ matrix.node }} and ${{ matrix.os }}'
+ name:
+ '🔎 Tapir Testnet Example on Node ${{ matrix.node }} and ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
- node: [ '18.x' ]
- os: [ ubuntu-latest ]
+ node: ['18.x']
+ os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
diff --git a/demos/taco-demo/src/App.tsx b/demos/taco-demo/src/App.tsx
index 05b2e4110..2aa5f07a8 100644
--- a/demos/taco-demo/src/App.tsx
+++ b/demos/taco-demo/src/App.tsx
@@ -78,7 +78,9 @@ export default function App() {
setDecryptedMessage('');
setDecryptionErrors([]);
- const encryptedMessageHex = await downloadData(encryptedMessageId) as string;
+ const encryptedMessageHex = (await downloadData(
+ encryptedMessageId,
+ )) as string;
const encryptedMessage = ThresholdMessageKit.fromBytes(
Buffer.from(encryptedMessageHex, 'hex'),
);
@@ -119,7 +121,7 @@ export default function App() {
Notice
In production (mainnet domain), your wallet address (encryptor) will also have
- to be allow-listed for this specific ritual. However, we have
+ to be allow-listed for this specific ritual. However, we have
publicly available testnet rituals
for use when developing your apps.
diff --git a/demos/taco-nft-demo/src/App.tsx b/demos/taco-nft-demo/src/App.tsx
index 1dd2be201..48f934dc0 100644
--- a/demos/taco-nft-demo/src/App.tsx
+++ b/demos/taco-nft-demo/src/App.tsx
@@ -11,11 +11,11 @@ import { useEthers } from '@usedapp/core';
import { ethers } from 'ethers';
import React, { useEffect, useState } from 'react';
+import { DEFAULT_DOMAIN, DEFAULT_RITUAL_ID } from './config';
import { Decrypt } from './Decrypt';
import { Encrypt } from './Encrypt';
import { NFTConditionBuilder } from './NFTConditionBuilder';
import { Spinner } from './Spinner';
-import { DEFAULT_DOMAIN, DEFAULT_RITUAL_ID } from './config';
const chainIdForDomain = {
[domains.DEVNET]: 80002,
@@ -43,7 +43,6 @@ export default function App() {
switchNetwork(chainId);
}, [chainId]);
-
const encryptMessage = async (message: string) => {
if (!condition) {
return;
diff --git a/demos/taco-nft-demo/src/NFTConditionBuilder.tsx b/demos/taco-nft-demo/src/NFTConditionBuilder.tsx
index 9f74b7de3..a4ba8c788 100644
--- a/demos/taco-nft-demo/src/NFTConditionBuilder.tsx
+++ b/demos/taco-nft-demo/src/NFTConditionBuilder.tsx
@@ -1,5 +1,5 @@
import { conditions } from '@nucypher/taco';
-import { Sepolia, useEthers} from '@usedapp/core';
+import { Sepolia, useEthers } from '@usedapp/core';
import React, { useState } from 'react';
interface Props {
@@ -97,8 +97,8 @@ export const NFTConditionBuilder = ({
You can mint an NFT{' '}
- here or use your own
- contract.
+ here or use
+ your own contract.