Skip to content

[Docs] AleoNetworkClient constructor does not handle Account #1067

@zklimaleo

Description

@zklimaleo

📚 Documentation

The AleoNetworkClient constructor parameters seems different from what the example is given and the constructor doesn't actually handle the account property at all.

* @example
* // Connection to a local node.
* const localNetworkClient = new AleoNetworkClient("http://0.0.0.0:3030", undefined, account);
*
* // Connection to a public beacon node
* const account = Account.fromCiphertext(process.env.ciphertext, process.env.password);
* const publicNetworkClient = new AleoNetworkClient("http://api.explorer.provable.com/v1", undefined, account);
*/

constructor(host: string, options?: AleoNetworkClientOptions) {
this.host = host + "/%%NETWORK%%";
this.network = "%%NETWORK%%";
this.ctx = {};
if (options && options.headers) {
this.headers = options.headers;
} else {
this.headers = {
// This is replaced by the actual version by a Rollup plugin
"X-Aleo-SDK-Version": "%%VERSION%%",
"X-Aleo-environment" : environment(),
};
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions