Skip to content

Commit

Permalink
Merge pull request #59 from NillionNetwork/v0.3.0
Browse files Browse the repository at this point in the history
SDK release v0.3.0
  • Loading branch information
Davetbutler authored Jul 3, 2024
2 parents 01aa1ce + a243f08 commit bef644b
Show file tree
Hide file tree
Showing 25 changed files with 1,547 additions and 24,445 deletions.
7 changes: 0 additions & 7 deletions docs/_foundry-installation.mdx

This file was deleted.

18 changes: 18 additions & 0 deletions docs/_nada-venv-setup.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

1. Create a python [virtual environment](https://docs.python.org/3/library/venv.html)

```
python3 -m venv .venv
```

2. Activate the python virtual environment

```
source .venv/bin/activate
```

3. Install [nada-dsl](https://pypi.org/project/nada-dsl/)

```
pip install nada-dsl
```
57 changes: 56 additions & 1 deletion docs/compute-js.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,62 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Compute

Perform computation using secrets stored in the network.


## Get a Quote to Compute

<Tabs>

<TabItem value="getquote" label="Get quote to compute" default>
```ts reference showGithubLink
https://github.com/NillionNetwork/cra-nillion/blob/main/src/nillion/components/ComputeForm.tsx#L53-L60
```
</TabItem>

<TabItem value="getQuote" label="getQuote helper">
```ts reference showGithubLink
https://github.com/NillionNetwork/scaffold-nillion/blob/main/packages/nextjs/utils/nillion/compute.ts
https://github.com/NillionNetwork/cra-nillion/blob/main/src/nillion/helpers/getQuote.ts
```
</TabItem>
</Tabs>


## Pay to Compute and get Payment Receipt

<Tabs>

<TabItem value="receipt" label="Payment receipt" default>
```ts reference showGithubLink
https://github.com/NillionNetwork/cra-nillion/blob/main/src/nillion/components/ComputeForm.tsx#L74-L81
```
</TabItem>

<TabItem value="helpers" label="helper functions">
```ts reference showGithubLink
https://github.com/NillionNetwork/cra-nillion/blob/main/src/nillion/helpers/nillion.ts#L24-L71
```
</TabItem>

</Tabs>

## Compute

<Tabs>
<TabItem value="compute" label="compute" default>
```ts reference showGithubLink
https://github.com/NillionNetwork/cra-nillion/blob/main/src/nillion/components/ComputeForm.tsx#L85-L94
```
</TabItem>

<TabItem value="helpers" label="computeProgram helper">
```ts reference showGithubLink
https://github.com/NillionNetwork/cra-nillion/blob/main/src/nillion/helpers/compute.ts
```
</TabItem>

</Tabs>


4 changes: 2 additions & 2 deletions docs/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This page will help you take your first steps (~30 mins) as a Nillion developer. Once you have completed them, fill out the form for your chance to claim your $20 prize - each week we will review the submissions and pick the best to recieve a prize 🎉

1. Star & fork either the [Python](https://github.com/NillionNetwork/nillion-python-starter) or [JavaScript](https://github.com/NillionNetwork/scaffold-nillion) quickstart repos (bonus points for both)
1. Star & fork either the [Python](https://github.com/NillionNetwork/nillion-python-starter) or [JavaScript](https://github.com/NillionNetwork/cra-nillion) quickstart repos (bonus points for both)

🚨 Add the topic `nillion-nada` to this repo so we can find it easily

Expand All @@ -14,7 +14,7 @@ This page will help you take your first steps (~30 mins) as a Nillion developer.

3. Once you have completed the quickstart, add at least one new [nada program](/nada-lang-programs) to your repo (bonus points for creativity, but make sure it compiles and runs)
- Python quickstart: add your nada program in your repo's [programs](https://github.com/NillionNetwork/nillion-python-starter/tree/main/programs) folder
- JavaScript quickstart: add your program in your repo's [next-project-programs/src](https://github.com/NillionNetwork/scaffold-nillion/tree/main/packages/nillion/next-project-programs/src) folder
- JavaScript quickstart: add your program in your repo's [public/programs](https://github.com/NillionNetwork/cra-nillion/tree/main/public/programs) folder

4. Join our community:
- [Join our Discord server](https://discord.com/invite/nillionnetwork)
Expand Down
13 changes: 0 additions & 13 deletions docs/get-user-key-from-snap.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/hacker-house-goa-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Follow the steps below to complete the task:

🚨 Add the topic `nillion-nada` to this repo so we can find it easily

3. [Head to this Google Colab and complete the initial Nillion task](https://colab.research.google.com/drive/1Um3FgMHpH6FVn10qyMycz-EaBo9B2bt1?usp=sharing)
3. [Head to this Google Colab and complete the initial Nillion task](https://colab.research.google.com/drive/1EyFyLwAmwh1EoZkgCz7BWF0pIaXmCg2G?usp=sharing)
- All instructions are in the Google Colab, make sure you read them carefully, and follow the steps in order.
- There is a $20 prize for the best 50 new nada programs that are written in step 9.

Expand Down
4 changes: 2 additions & 2 deletions docs/hacker-house-goa.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Follow the steps below to complete the task:
- Once you fill out the form at the end of this task, we will add you to a dedicated `hacker-house-goa` Discord channel too.
- [Follow us on Twitter](https://x.com/nillionnetwork)

2. Star & fork either the [Python](https://github.com/NillionNetwork/nillion-python-starter) or [JavaScript](https://github.com/NillionNetwork/scaffold-nillion) quickstart repos (bonus points for both)
2. Star & fork either the [Python](https://github.com/NillionNetwork/nillion-python-starter) or [JavaScript](https://github.com/NillionNetwork/cra-nillion) quickstart repos (bonus points for both)

🚨 Add the topic `nillion-nada` to this repo so we can find it easily

Expand All @@ -26,7 +26,7 @@ Follow the steps below to complete the task:

4. Once you have completed the quickstart, add at least one new [nada program](/nada-lang-programs) to your repo (bonus points for creativity, but make sure it compiles and runs)
- Python quickstart: add your nada program in your repo's [programs](https://github.com/NillionNetwork/nillion-python-starter/tree/main/programs) folder.
- JavaScript quickstart: add your program in your repo's [next-project-programs/src](https://github.com/NillionNetwork/scaffold-nillion/tree/main/packages/nillion/next-project-programs/src) folder.
- JavaScript quickstart: add your program in your repo's [public/programs](https://github.com/NillionNetwork/cra-nillion/tree/main/public/programs) folder
- The Nillion team will review all your new nada programs and award $20 prizes to the best 50.

5. Fill out [this form](https://forms.gle/8mWZyvdirzc66B679) to complete the initial Nillion task for Hacker House Goa.
4 changes: 2 additions & 2 deletions docs/js-client-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import DocCardList from '@theme/DocCardList';

# JavaScript Client Examples

## Scaffold-Nillion Starter Repo
## CRA-Nillion Starter Repo

The [Scaffold-Nillion Starter Repo](https://github.com/NillionNetwork/scaffold-nillion) used in the [JavaScript Developer Quickstart](js-quickstart) contains storage, retrieval, compute, and permissions examples.
The [CRA-Nillion Starter Repo](https://github.com/NillionNetwork/cra-nillion) used in the [JavaScript Developer Quickstart](js-quickstart) contains storage, retrieval, compute, and permissions examples.

<DocCardList />
2 changes: 1 addition & 1 deletion docs/js-client-reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# JavaScript Client Reference

# @nillion/nillion-client-js-browser
# @nillion/client-web

> Javascript Nillion Client
Expand Down
Loading

0 comments on commit bef644b

Please sign in to comment.