Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const keyProvider = new AleoKeyProvider();
keyProvider.useCache(true);

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

// Build the `Authorization`.
const privateKey = new PrivateKey(); // Change this to a private key that has an aleo credit balance.
Expand Down
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.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");

// 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.provable.com/v1",
"https://api.provable.com/v2",
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.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");

// 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.provable.com/v1",
"https://api.provable.com/v2",
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.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");

// 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.provable.com/v1",
"https://api.provable.com/v2",
keyProvider,
recordProvider,
);
Expand Down
12 changes: 6 additions & 6 deletions docs/api_reference/sdk-src_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ __*return*__ | [RecordPlaintext](sdk-src_wasm.md) | *The decrypted record plaint
import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";

// Create a connection to the Aleo network and an account
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);

// Get the record ciphertexts from a transaction.
Expand Down Expand Up @@ -272,7 +272,7 @@ __*return*__ | `Array.<RecordPlaintext>` | *An array of decrypted record plainte
import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";

// Create a connection to the Aleo network and an account
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);

// Get the record ciphertexts from a transaction.
Expand Down Expand Up @@ -358,7 +358,7 @@ __*return*__ | `boolean` | *True if the account owns the record, false otherwise
import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";

// Create a connection to the Aleo network and an account
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);

// Get the record ciphertexts from a transaction and check ownership of them.
Expand Down Expand Up @@ -620,7 +620,7 @@ __*return*__ | [RecordPlaintext](sdk-src_wasm.md) | *The decrypted record plaint
import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";

// Create a connection to the Aleo network and an account
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);

// Get the record ciphertexts from a transaction.
Expand Down Expand Up @@ -656,7 +656,7 @@ __*return*__ | `Array.<RecordPlaintext>` | *An array of decrypted record plainte
import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";

// Create a connection to the Aleo network and an account
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);

// Get the record ciphertexts from a transaction.
Expand Down Expand Up @@ -742,7 +742,7 @@ __*return*__ | `boolean` | *True if the account owns the record, false otherwise
import { AleoNetworkClient, Account } from "@provablehq/sdk/testnet.js";

// Create a connection to the Aleo network and an account
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
const account = Account.fromCiphertext(process.env.ciphertext!, process.env.password!);

// Get the record ciphertexts from a transaction and check ownership of them.
Expand Down
24 changes: 12 additions & 12 deletions docs/api_reference/sdk-src_function-key-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ __*return*__ | `Promise.<FunctionKeyPair>` | *Proving and verifying keys for the

```javascript
// Create a new object which implements the KeyProvider interface
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
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.provable.com/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.provable.com/v2", keyProvider, recordProvider);
programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);

// Keys can also be fetched manually using the key provider
Expand All @@ -155,12 +155,12 @@ __*return*__ | `Promise.<FunctionKeyPair>` | *Proving and verifying keys for the

```javascript
// Create a new AleoKeyProvider object
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
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.provable.com/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.provable.com/v2", keyProvider, recordProvider);
programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);

// Keys can also be fetched manually
Expand All @@ -187,12 +187,12 @@ __*return*__ | `Promise.<FunctionKeyPair>` | *Proving and verifying keys for the

```javascript
// Create a new AleoKeyProvider
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
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.provable.com/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.provable.com/v2", keyProvider, recordProvider);
programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);

// Keys can also be fetched manually
Expand Down Expand Up @@ -373,12 +373,12 @@ __*return*__ | `Promise.<FunctionKeyPair>` | *Proving and verifying keys for the

```javascript
// Create a new object which implements the KeyProvider interface
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
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.provable.com/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.provable.com/v2", keyProvider, recordProvider);
programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);

// Keys can also be fetched manually using the key provider
Expand All @@ -405,12 +405,12 @@ __*return*__ | `Promise.<FunctionKeyPair>` | *Proving and verifying keys for the

```javascript
// Create a new AleoKeyProvider object
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
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.provable.com/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.provable.com/v2", keyProvider, recordProvider);
programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);

// Keys can also be fetched manually
Expand All @@ -437,12 +437,12 @@ __*return*__ | `Promise.<FunctionKeyPair>` | *Proving and verifying keys for the

```javascript
// Create a new AleoKeyProvider
const networkClient = new AleoNetworkClient("https://api.explorer.provable.com/v1");
const networkClient = new AleoNetworkClient("https://api.provable.com/v2");
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.provable.com/v1", keyProvider, recordProvider);
const programManager = new ProgramManager("https://api.provable.com/v2", keyProvider, recordProvider);
programManager.transfer(1, "aleo166q6ww6688cug7qxwe7nhctjpymydwzy2h7rscfmatqmfwnjvggqcad0at", "public", 0.5);

// Keys can also be fetched manually
Expand Down
Loading