Skip to content

Commit

Permalink
Merge pull request #401 from jaketarnow/feat/api-updates
Browse files Browse the repository at this point in the history
[Update] Documentation for API and Explorer
  • Loading branch information
d0cd committed Sep 13, 2024
2 parents 5441af2 + b9cb75a commit d578537
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion documentation/leo/05_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Use this command to deploy a program to the Aleo network. This requires having a
To deploy the project in the current working directory.
```bash
leo deploy // Defaults to using key information in `.env`, and deploys to `testnet3` via endoint `http://api.explorer.aleo.org/v1`.
leo deploy // Defaults to using key information in `.env`, and deploys to `testnet3` via endoint `http://api.explorer.provable.com/v1`.
leo deploy --endpoint "{$ENDPOINT}" --private-key "{$PRIVATE_KEY}" // To deploy using custom private key, to a custom endpoint (e.g. local devnet `http://0.0.0.0:3030`).
```
Expand Down
6 changes: 3 additions & 3 deletions documentation/leo/16_testnet_beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ For each of the breaking changes above, we've provided instructions on how to up
### API Endpoints
If you are using API endpoints, you will likely **need to update the URL** to point to the new Testnet Beta endpoint.

**The official endpoint is `https://api.explorer.aleo.org/v1/testnet`.**
**The official endpoint is `https://api.explorer.provable.com/v1/testnet`.**
If you are using a custom endpoint, you will just need to update `testnet3` to `testnet` in the URL.

The [Explorer](https://explorer.aleo.org/) is pointed to Testnet Beta.
The [Explorer](https://explorer.provable.com/) is pointed to Testnet Beta.

### Finalization
The `finalize` programming model for on-chain code has been replaced with a new `async/await` model. See [this](#An-Async-Programming-Model) section for a detailed breakdown.
Expand Down Expand Up @@ -266,7 +266,7 @@ Extensive information on deployed programs, mapping values, blocks, transactions

```
leo query program credits.aleo --mapping-value account aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px
Leo ✅ Successfully retrieved data from 'http://api.explorer.aleo.org/v1/testnet/program/credits.aleo/mapping/account/aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px'.
Leo ✅ Successfully retrieved data from 'http://api.explorer.provable.com/v1/testnet/program/credits.aleo/mapping/account/aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px'.
"10331249u64"
```
Expand Down
4 changes: 2 additions & 2 deletions documentation/sdk/create-leo-app/01_create_leo_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Example:
Note down your transaction ID in the back of the URL from the faucet. The success message in the Discord thread should look like this:

```bash
have fun https://explorer.aleo.org/transaction/...
have fun https://explorer.provable.com/transaction/...
```

### Leo & `helloworld`
Expand Down Expand Up @@ -142,7 +142,7 @@ Take your transaction ID from the Discord URL earlier:
at12u62xwfew2rq32xee8nwhtlxghfjz7mm3528yj240nuezue625fqy4lhlp
```
<!-- markdown-link-check-disable -->
Go to “Get Transaction” at [provable.tools/rest](https://provable.tools/rest) and insert your transaction ID to look at the JSON object. You can similarly use https://api.explorer.aleo.org/v1/testnet/transaction/[insert-your-transaction-id] to get the same output in your browser.
Go to “Get Transaction” at [provable.tools/rest](https://provable.tools/rest) and insert your transaction ID to look at the JSON object. You can similarly use https://api.explorer.provable.com/v1/testnet/transaction/[insert-your-transaction-id] to get the same output in your browser.
<!-- markdown-link-check-enable-->

![get-transaction](./images/get-transaction.png)
Expand Down
6 changes: 3 additions & 3 deletions documentation/testnet/getting_started/00_overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: overview
title: Testnet.
title: Testnet
sidebar_label: Overview
---

Expand Down Expand Up @@ -31,9 +31,9 @@ To connect to the network, make a request to an Aleo Testnet bootnode.

| URL |
|------------------|
| [https://api.explorer.aleo.org/v1/testnet](https://api.explorer.aleo.org/v1/testnet/) |
| [https://api.explorer.provable.com/v1/testnet](https://api.explorer.provable.com/v1/testnet/) |

For example, you can [retrieve the current block height](https://api.explorer.aleo.org/v1/testnet/latest/height).
For example, you can [retrieve the current block height](https://api.explorer.provable.com/v1/testnet/latest/height).

With a local instance of `snarkos`, you can launch a client node with:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ You should have seen a confirmation that your Aleo application was deployed in t
Finally, it is time to execute the application you just deployed!

* You'll need to update the `--record` flag with the latest transaction linked to your wallet balance. In this case, you can obtain that by going to the following URL: https://api.explorer.aleo.org/v1/testnet/transaction/$DEPLOY_TX_ID but replace $DEPLOY_TX_ID with the transaction ID provided to you once your application was deployed (or from the most recent transaction linked to your wallet address). An example URL looks like so: https://api.explorer.aleo.org/v1/testnet/transaction/at1rkkpqu5k4rt86zzccczw6cxeyvrl7hxydvvv7dhl7zr7p9w40c8s70kwm8
* In the JSON object provided at https://api.explorer.aleo.org/v1/testnet/transaction/$DEPLOY_TX_ID, navigate to: `object.fee.transition.outputs[0].value` and copy the record ciphertext value.
* In the JSON object provided at https://api.explorer.provable.com/v1/testnet/transaction/$DEPLOY_TX_ID, navigate to: `object.fee.transition.outputs[0].value` and copy the record ciphertext value.
* Head to [provable.tools](https://www.provable.tools/) and navigate to the **Record** tab and paste the record ciphertext you just copied as well as your wallet's view key
* Similar to the steps we followed for a deploy transaction, update your `RECORD` variable with the record plaintext you just decrypted by doing the following:

Expand All @@ -166,7 +166,7 @@ RECORD=""
Then just paste the following command in your terminal

```
snarkos developer execute "${APPNAME}.aleo" "main" "1u32" "2u32" --private-key "${PRIVATEKEY}" --query "https://api.explorer.aleo.org/v1" --broadcast "https://api.explorer.aleo.org/v1/testnet/transaction/broadcast" --fee 1000000 --record "${RECORD}"
snarkos developer execute "${APPNAME}.aleo" "main" "1u32" "2u32" --private-key "${PRIVATEKEY}" --query "https://api.explorer.provable.com/v1" --broadcast "https://api.explorer.provable.com/v1/testnet/transaction/broadcast" --fee 1000000 --record "${RECORD}"
```

Awesome! You have successfully deployed and executed a Leo application to Testnet, how exciting 🎉

0 comments on commit d578537

Please sign in to comment.