-
Network environment: should select dev environment, qa, test or main.
import { NetworkEnv } from "@threefold/grid_client"; const network = NetworkEnv.dev;
-
Wallet connector: mnemonics (12 random words in a unique order) for your account to interact with the chain. Create one
-
Store secret: it's any word that will be used for encrypting/decrypting the keys on threefold key-value store.
-
Project name: it's a name to isolate the deployments into a namespace.
Note: only network can't be isolated, all project can see the same network.
-
Backend storage: can select
fs,localstorage,auto, ortfkvstore. (default: auto)Note: selecting
autowill auto detect the process if it's node it will usefsand if it's browser it will uselocalstorage.
import { BackendStorageType } from "@threefold/grid_client";
const backendStorageType = BackendStorageType.auto;- keypair type: the keypair types supported are
sr25519ored25519. (default:sr25519)
import { KeypairType } from "@threefold/grid_client";
const keypairType = KeypairType.sr25519;By gathering all the previous configuration in one script.
import { GridClient } from "@threefold/grid_client";
const gridClient = new GridClient({
mnemonic: "<please insert your mnemonics here>",
network: "dev, qa, test, main, or custom",
});
await gridClient.connect();Important Note: grid client should be disconnected after finishing its usage.
gridClient.disconnect();