# Install GNY Client

# Install by npm

npm install @gny/client
1

# Usage

import { Connection } from "@gny/client";

const connection = new Connection();
const accountApi = connection.api.Account;

const generateAccount = async () => {
  const response = await accountApi.generateAccount();
  console.log(response);
};

(async () => {
  await generateAccount();
})();
1
2
3
4
5
6
7
8
9
10
11
12
13

# Connection configuration

const connection = new Connection(host, port, network);
1

# Default value

All the args of Connection are optional, and the default values are:

{
  "host": "127.0.0.1",
  "port": 4096,
  "network": "testnet"
}
1
2
3
4
5