Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## For Developers

* [Integrate TACo Into Apps](for-developers/taco-integration/README.md)
* [Testnets](for-developers/taco-integration/get-started-with-tac.md)
* [Get Started with TACo Domains](for-developers/taco-integration/get-started-with-tac.md)
* [Mainnet Access](for-developers/taco-integration/mainnet-taco-beta-program.md)
* [Mainnet Deployment](for-developers/taco-integration/deploying-to-mainnet.md)
* [Ecosystem Integrations](for-developers/integrations/README.md)
Expand Down
209 changes: 186 additions & 23 deletions for-developers/taco-integration/get-started-with-tac.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Testnets
# Get Started with TACo Domains

{% hint style="warning" %}
Testnets exist to help developers familiarize themselves with the taco-web API, and prototype an integration before deploying on TACo Mainnet. \
Expand All @@ -8,43 +8,206 @@ Testnets exist to help developers familiarize themselves with the taco-web API,
Hence, the trust assumptions are strictly worse than the Mainnet version, particularly with respect to the node array managing decryption fragments and validating condition fulfillment. Testnet nodes are are operated primarily by members of the NuCypher core developer team, and are not subject to a cryptoeconomic protocol nor required to stake any collateral.
{% endhint %}

## Testnet domains
## Domain Overview

TACo supports three domains for different use cases:

<table>
<thead>
<tr>
<th width="12%">TACo Domain</th>
<th width="12%">Network Type</th>
<th width="10%">Production</th>
<th width="15%">Chain (chain id)</th>
<th width="*">Open Rituals</th>
</tr>
</thead>
<tbody>
<tr>
<td>lynx</td>
<td>DEVNET</td>
<td>❌ No</td>
<td>Amoy (80002)</td>
<td><strong>Ritual 27</strong>: 🟢 Open with no encryptor restrictions - Cohort 2-of-3</td>
</tr>
<tr>
<td>tapir</td>
<td>TESTNET</td>
<td>❌ No</td>
<td>Amoy (80002)</td>
<td><strong>Ritual 6</strong>: 🟢 Open with no encryptor restrictions - Cohort 3-of-5</td>
</tr>
<tr>
<td>mainnet</td>
<td>MAINNET</td>
<td>✅ Yes</td>
<td>Polygon (137)</td>
<td>No open rituals freely available<br/>🔒 <strong>Custom setup required</strong> - <em><a href="http://discord.gg/buildwithtaco">Contact TACo team for ritual setup</a></em></td>
</tr>
</tbody>
</table>

To run TACo on testnet, it needs to be configured to use one of the two available domains:
{% hint style="info" %}
**Open ritualID** refers to a DKG cohort & public key with no restrictions on encryptors – i.e. any device or address can use the public key to encrypt data. See the [encryptor allowlist](../references/encryptor-allowlist.md) section to learn more.
{% endhint %}

{% hint style="info" %}
It should be noted that the blockchains used as L1 and L2 in the various TACo domains (DEVNET, TESTNET, MAINNET) do not determine the blockchains supported by the TACo conditions. For example, the TESTNET and MAINNET domains can be used to define conditions on the Ethereum mainnet.
{% endhint %}

To configure TACo for different domains:

```typescript
import { domains } from '@nucypher/taco';
import { domains } from "@nucypher/taco";

domains.DEVNET // "lynx" network
domains.TESTNET // "tapir" network
domains.DEVNET; // "lynx" domain
domains.TESTNET; // "tapir" domain
domains.MAINNET; // "mainnet" domain
```

* `DEVNET` domain, or `lynx`, is a bleeding-edge developer network that supports upcoming `taco` release.
* `TESTNET` domain, or `tapir`, is a stable testnet environment that supports the current `taco` release.
## Domain Details

We encourage you to use the `TESTNET` domain for developing `taco` based apps, and to use `DEVNET` to test compatibility with the upcoming `taco` release and new, experimental features.
### DEVNET Domain: `lynx`

{% hint style="warning" %}
Both `DEVNET` and `TESTNET` domains are unsuitable for use in a production setting. Testnet domains have no trust minimization or stability guarantees, which makes them unfit for production or real-world data payloads. Learn more about this in the trust assumptions [section](../../for-product-leads/trust-assumptions/).
{% endhint %}
**Bleeding-edge developer network**

## Testnet configuration
- **Network Type:** DEVNET
- **Production:** ❌ No
- **Chain:** Polygon Amoy (80002) - Your provider needs to be connected to this chain.
- **L1 Chain:** Sepolia (11155111) - For you, this is just a metadata info.
- **Status:** Testnet (Development) - May have breaking changes

<table><thead><tr><th width="121">Domain</th><th width="96">Network</th><th width="132">L1 (chain id)</th><th width="126">L2 (chain id)</th><th width="134" data-type="number">Open ritualID</th><th>Cohort</th></tr></thead><tbody><tr><td>DEVNET</td><td><a href="https://lynx-3.nucypher.network:9151/status">lynx</a></td><td>Sepolia<br>(11155111)</td><td>Amoy (80002)</td><td>27</td><td>2-of-3</td></tr><tr><td>TESTNET</td><td><a href="https://tapir-3.nucypher.network:9151/status">tapir</a></td><td>Sepolia<br>(11155111)</td><td>Amoy (80002)</td><td>6</td><td>3-of-5</td></tr></tbody></table>
**Connectivity:**

{% hint style="info" %}
**Open ritualID** refers to a DKG cohort & public key with no restrictions on encryptors – i.e. any device or address can use the public key to encrypt data. See the [encryptor allowlist](../references/encryptor-allowlist.md) section to learn more.
{% endhint %}
- RPC URL: Use an RPC provider that is connected to Polygon Amoy (80002).
- Monitoring Portal: [lynx status](https://lynx-3.nucypher.network:9151/status)

{% hint style="info" %}
It should be noted that the blockchains used as L1 and L2 in the various TACo domains (DEVNET, TESTNET, MAINNET) do not determine the blockchains supported by the TACo conditions. For example, the TESTNET and MAINNET domains can be used to define conditions on the Ethereum mainnet.
**Rituals:**

- **Ritual 27:** 🟢 Open | Cohort: 2-of-3 | No encryptor restrictions

**Usage Example:**

```typescript
import { encrypt, decrypt, domains } from "@nucypher/taco";

// Encrypt data
const messageKit = await encrypt(
provider,
domains.DEVNET, // "lynx"
message,
condition,
27, // ritualId
signer
);

// Decrypt data
const decryptedMessage = await decrypt(
provider,
domains.DEVNET, // "lynx"
messageKit,
signer
);
```

### TESTNET Domain: `tapir`

**Stable testnet for current TACo release** _(Recommended for development)_

- **Network Type:** TESTNET
- **Production:** ❌ No
- **Chain:** Polygon Amoy (80002) - Your provider needs to be connected to this chain.
- **L1 Chain:** Sepolia (11155111) - For you, this is just a metadata info.
- **Status:** Testnet (Stable) - Recommended for development and testing

**Connectivity:**

- RPC URL: Use an RPC provider that is connected to Polygon Amoy (80002).
- Monitoring Portal: [tapir status](https://tapir-3.nucypher.network:9151/status)

**Rituals:**

- **Ritual 6:** 🟢 Open | Cohort: 3-of-5 | No encryptor restrictions

**Usage Example:**

```typescript
import { encrypt, decrypt, domains } from "@nucypher/taco";

// Encrypt data
const messageKit = await encrypt(
provider,
domains.TESTNET, // "tapir"
message,
condition,
6, // ritualId
signer
);

// Decrypt data
const decryptedMessage = await decrypt(
provider,
domains.TESTNET, // "tapir"
messageKit,
signer
);
```

### MAINNET Domain: `mainnet`

**Production network**

- **Network Type:** MAINNET
- **Production:** ✅ Yes
- **Chain:** Polygon (137) - Your provider needs to be connected to this chain.
- **L1 Chain:** Ethereum (1) - For you, this is just a metadata info.
- **Status:** Production - Requires custom ritual setup and payment

**Connectivity:**

- RPC URL: Use an RPC provider that is connected to Polygon (137).
- Monitoring Portal: Contact TACo team for production monitoring portal

**Rituals:**

- No open free rituals - Every dapp needs to have a custom ritual setup - Contact TACo team for custom ritual setup

**Usage Example:**

```typescript
import { encrypt, decrypt, domains } from "@nucypher/taco";

// Encrypt data
const messageKit = await encrypt(
provider,
domains.MAINNET, // "mainnet"
message,
condition,
YOUR_RITUAL_ID, // Your DApp Custom ritual ID
signer
);

// Decrypt data
const decryptedMessage = await decrypt(
provider,
domains.MAINNET, // "mainnet"
messageKit,
signer
);
```

{% hint style="warning" %}
Both `lynx (DEVNET)` and `tapir (TESTNET)` domains are unsuitable for use in a production setting. Testnet domains have no trust minimization or stability guarantees, which makes them unfit for production or real-world data payloads. Learn more about this in the trust assumptions [section](../../for-product-leads/trust-assumptions/).
{% endhint %}

## Contracts

The source code for contracts used on testnet can be found in [`nucypher/nucypher-contracts`](https://github.com/nucypher/nucypher-contracts) repository.&#x20;
You do not need to check the contracts to integrate TACo into your DApp. The magic happens under the hood. However, if you are curious, you can take a look at them.

The source code for contracts used on the various TACo domains can be found in [`nucypher/nucypher-contracts`](https://github.com/nucypher/nucypher-contracts) repository.

Contract addresses for testnets can be found in their respective contract registries:
And the contract addresses can be found in their respective contract registries:

* [`lynx.json`](https://github.com/nucypher/nucypher-contracts/blob/main/deployment/artifacts/lynx.json)
* [`tapir.json`](https://github.com/nucypher/nucypher-contracts/blob/main/deployment/artifacts/tapir.json)
- [`lynx.json`](https://github.com/nucypher/nucypher-contracts/blob/main/deployment/artifacts/lynx.json)
- [`tapir.json`](https://github.com/nucypher/nucypher-contracts/blob/main/deployment/artifacts/tapir.json)
- [`mainnet.json`](https://github.com/nucypher/nucypher-contracts/blob/main/deployment/artifacts/mainnet.json)