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 02_aleo_network_client.md #343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions documentation/sdk/typescript/02_aleo_network_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The methods provided in this class provide information on the Aleo Blockchain</p
* [.getBlockRange(start, end)](#AleoNetworkClient+getBlockRange)
* [.getProgram(programId)](#AleoNetworkClient+getProgram)
* [.getProgramMappingNames(programId)](#AleoNetworkClient+getProgramMappingNames)
* [.getMappingValue(programId, mappingName, key)](#AleoNetworkClient+getMappingValue)
* [.getProgramMappingValue(programId, mappingName, key)](#AleoNetworkClient+getProgramMappingValue)
* [.getLatestBlock()](#AleoNetworkClient+getLatestBlock)
* [.getLatestHash()](#AleoNetworkClient+getLatestHash)
* [.getLatestHeight()](#AleoNetworkClient+getLatestHeight)
Expand Down Expand Up @@ -133,9 +133,9 @@ let program = connection.getProgram("foo.aleo");
```js
let mappings = connection.getProgramMappingNames("credits.aleo");
```
<a name="AleoNetworkClient+getMappingValue"></a>
<a name="AleoNetworkClient+getProgramMappingValue"></a>

### aleoNetworkClient.getMappingValue(programId, mappingName, key)
### aleoNetworkClient.getProgramMappingValue(programId, mappingName, key)
<p>Returns the value of a program's mapping for a specific key</p>

**Kind**: instance method of [<code>AleoNetworkClient</code>](#AleoNetworkClient)
Expand All @@ -149,7 +149,7 @@ let mappings = connection.getProgramMappingNames("credits.aleo");
**Example**
```js
## Get public balance of an account
let mappingValue = connection.getMappingValue("credits.aleo", "account", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px");
let mappingValue = connection.getProgramMappingValue("credits.aleo", "account", "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px");
```
<a name="AleoNetworkClient+getLatestBlock"></a>

Expand Down Expand Up @@ -261,4 +261,4 @@ let records = connection.findUnspentRecords(startHeight, undefined, privateKey,
// Find specific amounts with a maximum number of cumulative microcredits
const maxMicrocredits = 100000;
let records = connection.findUnspentRecords(startHeight, undefined, privateKey, undefined, maxMicrocredits);
```
```