Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update URL #926

Open
wants to merge 2 commits into
base: mainnet
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions create-leo-app/template-react-leo/src/workers/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function deployProgram(program) {
keyProvider.useCache(true);

// Create a record provider that will be used to find records and transaction data for Aleo programs
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");

// Use existing account with funds
const account = new Account({
Expand All @@ -48,7 +48,7 @@ async function deployProgram(program) {

// Initialize a program manager to talk to the Aleo network with the configured key and record providers
const programManager = new ProgramManager(
"https://api.explorer.aleo.org/v1",
"https://api.explorer.provable.com/v1",
keyProvider,
recordProvider,
);
Expand Down
4 changes: 2 additions & 2 deletions create-leo-app/template-react-ts/src/workers/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function deployProgram(program) {
keyProvider.useCache(true);

// Create a record provider that will be used to find records and transaction data for Aleo programs
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");

// Use existing account with funds
const account = new Account({
Expand All @@ -49,7 +49,7 @@ async function deployProgram(program) {

// Initialize a program manager to talk to the Aleo network with the configured key and record providers
const programManager = new ProgramManager(
"https://api.explorer.aleo.org/v1",
"https://api.explorer.provable.com/v1",
keyProvider,
recordProvider,
);
Expand Down
4 changes: 2 additions & 2 deletions create-leo-app/template-vanilla/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function deployProgram(program) {
keyProvider.useCache(true);

// Create a record provider that will be used to find records and transaction data for Aleo programs
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");

// Use existing account with funds
const account = new Account({
Expand All @@ -56,7 +56,7 @@ async function deployProgram(program) {

// Initialize a program manager to talk to the Aleo network with the configured key and record providers
const programManager = new ProgramManager(
"https://api.explorer.aleo.org/v1",
"https://api.explorer.provable.com/v1",
keyProvider,
recordProvider,
);
Expand Down
30 changes: 15 additions & 15 deletions sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ import { Account, AleoNetworkClient, NetworkRecordProvider, ProgramManager, Aleo
const account = new Account();

// Create a network client to connect to the Aleo network
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");

// Create a key provider that will be used to find public proving & verifying keys for Aleo programs
const keyProvider = new AleoKeyProvider();
Expand All @@ -285,7 +285,7 @@ keyProvider.useCache = true;
const recordProvider = new NetworkRecordProvider(account, networkClient);

// Initialize a program manager to talk to the Aleo network with the configured key and record providers
const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);

// Set the account for the program manager
programManager.setAccount(account);
Expand Down Expand Up @@ -367,7 +367,7 @@ const keyProvider = new AleoKeyProvider();
keyProvider.useCache(true);

// Create a record provider that will be used to find records and transaction data for Aleo programs
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");

// Use existing account with funds
const account = new Account({
Expand All @@ -377,7 +377,7 @@ const account = new Account({
const recordProvider = new NetworkRecordProvider(account, networkClient);

// Initialize a program manager to talk to the Aleo network with the configured key and record providers
const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
programManager.setAccount(account)

// Define an Aleo program to deploy
Expand Down Expand Up @@ -429,7 +429,7 @@ A full example of this implementation can be found [here](https://github.com/Pro

Aleo Credits are used to access blockspace and computational resources on the network, with users paying Credits to submit transactions and have them processed.

Aleo credits are defined in the [credits.aleo](https://explorer.aleo.org/program/credits.aleo) program. This program is
Aleo credits are defined in the [credits.aleo](https://explorer.provable.com/program/credits.aleo) program. This program is
deployed to the Aleo network and defines data structures representing Aleo credits and the functions used to manage them.

There are two ways to hold Aleo credits:
Expand Down Expand Up @@ -544,13 +544,13 @@ import { Account, ProgramManager, AleoKeyProvider, NetworkRecordProvider, AleoNe

// Create a new NetworkClient, KeyProvider, and RecordProvider
const account = Account.from_string({privateKey: "user1PrivateKey"});
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const keyProvider = new AleoKeyProvider();
const recordProvider = new NetworkRecordProvider(account, networkClient);

// Initialize a program manager with the key provider to automatically fetch keys for executions
const USER_1_ADDRESS = "user1Address";
const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
programManager.setAccount(account);

// Send a private transfer to yourself
Expand Down Expand Up @@ -585,7 +585,7 @@ assert(public_balance === 0);
As shown above, a public balance of any address can be checked with `getMappingValue` function of the `NetworkClient`.

```typescript
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const USER_1_ADDRESS = "user1Address";
const public_balance = networkClient.getMappingValue("credits.aleo", USER_1_ADDRESS);
```
Expand Down Expand Up @@ -674,13 +674,13 @@ import { Account, ProgramManager, AleoKeyProvider, NetworkRecordProvider, AleoNe

// Create a new NetworkClient, KeyProvider, and RecordProvider
const account = Account.from_string({privateKey: "user1PrivateKey"});
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const keyProvider = new AleoKeyProvider();
const recordProvider = new NetworkRecordProvider(account, networkClient);

// Initialize a program manager with the key provider to automatically fetch keys for executions
const USER_2_ADDRESS = "user2Address";
const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
programManager.setAccount(account);

/// Send private transfer to User 2
Expand All @@ -695,12 +695,12 @@ import { Account, ProgramManager, AleoKeyProvider, NetworkRecordProvider, AleoNe

// Create a new NetworkClient, KeyProvider, and RecordProvider
const account = Account.from_string({privateKey: "user2PrivateKey"});
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const keyProvider = new AleoKeyProvider();
const recordProvider_User2 = new NetworkRecordProvider(account, networkClient);

// Initialize a program manager with the key provider to automatically fetch keys for executions
const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
programManager.setAccount(account);

// Fetch the transaction from the network that user 1 sent
Expand Down Expand Up @@ -863,7 +863,7 @@ read the value of a specific key within a mapping.
```typescript
import { AleoNetworkClient } from '@provablehq/sdk';

const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const creditsMappings = networkClient.getMappings("credits.aleo");
assert(creditsMappings === ["account"]);

Expand Down Expand Up @@ -910,13 +910,13 @@ import { Account, ProgramManager, AleoKeyProvider, NetworkRecordProvider, AleoNe

// Create a new NetworkClient, KeyProvider, and RecordProvider
const account = Account.from_string({privateKey: "user1PrivateKey"});
const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const keyProvider = new AleoKeyProvider();
const recordProvider = new NetworkRecordProvider(account, networkClient);

// Initialize a program manager with the key provider to automatically fetch keys for executions
const RECIPIENT_ADDRESS = "user1Address";
const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
programManager.setAccount(account);

// Update or initialize a public balance
Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/AleoNetworkClient.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
let local_connection = new AleoNetworkClient("http://localhost:3030");

// Connection to a public beacon node
let public_connection = new AleoNetworkClient("https://api.explorer.aleo.org/v1");</code></pre></div></div></div><h2 id="classes" class="subsection-title has-anchor">Classes</h2><dl><dt><a href="AleoNetworkClient.html">AleoNetworkClient</a></dt><dd></dd></dl><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="findUnspentRecords"><span class="type-signature">(async) </span>findUnspentRecords<span class="signature">()</span></h3><div class="description">Attempts to find unspent records in the Aleo blockchain for a specified private key</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="aleo_network_client.ts.html">network-client.ts</a>, <a href="aleo_network_client.ts.html#line230">line 230</a></li></ul></dd></div></dl><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Example</strong><div class="rel"><pre class="prettyprint"><code>// Find all unspent records
let public_connection = new AleoNetworkClient("https://api.explorer.provable.com/v1");</code></pre></div></div></div><h2 id="classes" class="subsection-title has-anchor">Classes</h2><dl><dt><a href="AleoNetworkClient.html">AleoNetworkClient</a></dt><dd></dd></dl><h2 id="methods" class="subsection-title has-anchor">Methods</h2><h3 class="name has-anchor" id="findUnspentRecords"><span class="type-signature">(async) </span>findUnspentRecords<span class="signature">()</span></h3><div class="description">Attempts to find unspent records in the Aleo blockchain for a specified private key</div><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="aleo_network_client.ts.html">network-client.ts</a>, <a href="aleo_network_client.ts.html#line230">line 230</a></li></ul></dd></div></dl><div class="method-member-container flex flex-col w-100 overflow-auto mt-20"><strong>Example</strong><div class="rel"><pre class="prettyprint"><code>// Find all unspent records
const privateKey = "[PRIVATE_KEY]";
let records = connection.findUnspentRecords(0, undefined, privateKey);

Expand Down
2 changes: 1 addition & 1 deletion sdk/docs/aleo_network_client.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* let local_connection = new AleoNetworkClient("http://localhost:3030");
*
* // Connection to a public beacon node
* let public_connection = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
* let public_connection = new AleoNetworkClient("https://api.explorer.provable.com/v1");
*/
export class AleoNetworkClient {
host: string;
Expand Down
20 changes: 10 additions & 10 deletions sdk/src/function-key-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ interface FunctionKeyProvider {
*
*
* const keyProvider = new AleoKeyProvider();
* const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
* const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
* const recordProvider = new NetworkRecordProvider(account, networkClient);
*
* // Initialize a program manager with the key provider to automatically fetch keys for value transfers
* const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
* const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
*
* // Keys can also be fetched manually
Expand Down Expand Up @@ -191,12 +191,12 @@ interface FunctionKeyProvider {
*
* @example
* // Create a new object which implements the KeyProvider interface
* const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
* const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
* const keyProvider = new AleoKeyProvider();
* const recordProvider = new NetworkRecordProvider(account, networkClient);
*
* // Initialize a program manager with the key provider to automatically fetch keys for value transfers
* const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
* const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
*
* // Keys can also be fetched manually
Expand Down Expand Up @@ -314,12 +314,12 @@ class AleoKeyProvider implements FunctionKeyProvider {
*
* @example
* // Create a new object which implements the KeyProvider interface
* const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
* const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
* const keyProvider = new AleoKeyProvider();
* const recordProvider = new NetworkRecordProvider(account, networkClient);
*
* // Initialize a program manager with the key provider to automatically fetch keys for value transfers
* const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
* const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
*
* // Keys can also be fetched manually using the key provider
Expand Down Expand Up @@ -372,12 +372,12 @@ class AleoKeyProvider implements FunctionKeyProvider {
*
* @example
* // Create a new AleoKeyProvider object
* const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
* const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
* const keyProvider = new AleoKeyProvider();
* const recordProvider = new NetworkRecordProvider(account, networkClient);
*
* // Initialize a program manager with the key provider to automatically fetch keys for value transfers
* const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
* const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
*
* // Keys can also be fetched manually
Expand Down Expand Up @@ -486,12 +486,12 @@ class AleoKeyProvider implements FunctionKeyProvider {
*
* @example
* // Create a new AleoKeyProvider
* const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
* const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
* const keyProvider = new AleoKeyProvider();
* const recordProvider = new NetworkRecordProvider(account, networkClient);
*
* // Initialize a program manager with the key provider to automatically fetch keys for value transfers
* const programManager = new ProgramManager("https://api.explorer.aleo.org/v1", keyProvider, recordProvider);
* const programManager = new ProgramManager("https://api.explorer.provable.com/v1", keyProvider, recordProvider);
* programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);
*
* // Keys can also be fetched manually
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/network-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface AleoNetworkClientOptions {
* const localNetworkClient = new AleoNetworkClient("http://localhost:3030");
*
* // Connection to a public beacon node
* const publicnetworkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
* const publicnetworkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
*/
class AleoNetworkClient {
host: string;
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/offline-key-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class OfflineSearchParams implements KeySearchParams {
* const offlineExecuteTx = <Transaction>await this.buildExecutionTransaction("hello_hello.aleo", "hello", 1, false, ["5u32", "5u32"], undefined, offlineSearchParams, undefined, undefined, undefined, undefined, offlineQuery, program);
*
* // Broadcast the transaction later on a machine with internet access
* const networkClient = new AleoNetworkClient("https://api.explorer.aleo.org/v1");
* const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
* const txId = await networkClient.broadcastTransaction(offlineExecuteTx);
*/
class OfflineKeyProvider implements FunctionKeyProvider {
Expand Down
Loading
Loading