Module should be:
- In modules directory.
- A class and its methods should have expose decorater
- Exported in index file
- Added to GridClient class in client.ts file
Note: Each network has its own relay. So, the relay would be "relay.${network}.grid.tf" in all networks except for main. It would be "relay.grid.tf".
-
Create cmd:
client.twins.createpayload:
'{"relay": "<relay>"}' -
Update cmd:
client.twins.updatepayload:
'{"relay": "<relay>"}' -
Get
cmd:
client.twins.getpayload:
'{"id": <twin id>}' -
Get my twin id cmd:
client.twins.get_my_twin_idpayload:
"" -
Get twin id by account id
cmd:
client.twins.get_twin_id_by_account_idpayload:
'{"public_key": <substrate account id>}'
-
Create Node Contract
cmd:
client.contracts.create_nodepayload:
'{"node_id": "<zos node id>", "hash": "<deployment challenge hash>", "data": "<deployment data>", "public_ip": <number of public IPs>, "solutionProviderId": "<solution provider id(optional)>"}' -
Create Name Contract
cmd:
client.contracts.create_namepayload:
'{"name": "<contract name>"}' -
Create Rent Contract
cmd:
client.contracts.createRentpayload:
'{"nodeId": "<zos node id>", "solutionProviderId": "<solution provider id(optional)>"}' -
Get
cmd:
client.contracts.getpayload:
'{"id": <contract id>}' -
Get contract id by node id and hash
cmd:
client.contracts.get_contract_id_by_node_id_and_hashpayload:
'{"node_id": "<zos node id>, "hash": <deployment challenge hash>}' -
Get name contract
cmd:
client.contracts.get_name_contractpayload:
'{"name": <contract name>}' -
Get Extra fee for dedicated node
cmd:
client.contracts.getDedicatedNodeExtraFeepayload:
'{"nodeId": "<zos node id>"}' -
Set Extra fee for dedicated node
cmd:
client.contracts.setDedicatedNodeExtraFeepayload:
'{"nodeId": "<zos node id>", "extraFee" : "< extre fee for dedicated node>"}' -
Get Active contracts
cmd:
client.contracts.getActiveContractspayload:
'{"nodeId": "<zos node id>"}' -
Get Active Rent contracts for a node
cmd:
client.contracts.activeRentContractForNodepayload:
'{"nodeId": "<zos node id>"}' -
Update Node
cmd:
client.contracts.update_nodepayload:
'{"id": <contract id>, "hash": "<deployment challenge hash>", "data": "<deployment data>"}' -
Cancel
cmd:
client.contracts.cancelpayload:
'{"id": <contract id>}' -
List all my contracts
cmd:
client.contracts.listMyContractspayload:
'{"address": "<wallet address>"}' -
Cancel all my contracts
cmd:
client.contracts.cancelMyContractspayload:
'{""}' -
List contracts by wallet TwinId
cmd:
client.contracts.listContractsByTwinIdpayload:
'{"twinId": <twin id>}' -
List contracts by wallet address
cmd:
client.contracts.listContractsByAddresspayload:
'{"address": <wallet address>}' -
Create Service Contract
cmd:
client.contracts.createServiceContractpayload:
'{"serviceAccount": <service account address>, "consumerAccount": <consumer account address>}' -
Approve Service Contract
cmd:
client.contracts.approveServiceContractpayload:
'{"serviceId": <service contract id>, "approve": <approval of service contract>}' -
Bill Service Contract
cmd:
client.contracts.billServiceContractpayload:
'{"serviceId": <service contract id>, "variableAmount": <bill amount>, "metadata": <metadata>}' -
Cancel Service Contract
cmd:
client.contracts.cancelServiceContractpayload:
'{"serviceId": <service contract id>}' -
Set Fees of Service Contract
cmd:
client.contracts.setFeesServiceContractpayload:
'{"serviceId": <service contract id>, "baseFee": <base fee of serivce contract>, "variableFee": <variable fee of serivce contract>}' -
Set Metadata of Service Contract
cmd:
client.contracts.setMetadataServiceContractpayload:
'{"serviceId": <service contract id>, "metadata": <metadata>}' -
Get Service Contract
cmd:
client.contracts.getServiceContractpayload:
'{"serviceId": <service contract id>}'
-
Reserve Node cmd:
client.nodes.reservepayload:
'{"nodeId": "<zos node id>"}' -
Unreserve Node cmd:
client.nodes.unreservepayload:
'{"nodeId": "<zos node id>"}' -
Get Rent Contract by id cmd:
client.nodes.getRentContractIdpayload:
'{"nodeId": "<zos node id>"}' -
Set Node Power cmd:
client.nodes.setNodePowerpayload:
'{"nodeId": "<zos node id>" , "power": "<node power to be true or false>"}' -
Add Node PublicConfig
cmd:
client.nodes.addNodePublicConfigpayload:
'{"farmId": "<farm id>" , "node Id": "<zos node id>" , "ip4": "<public ip4(optional)>" , "ip6": "<public ip6(optional)>", "domain": "<domain(optional)>"}' -
Get all nodes cmd:
client.nodes.allpayload:
""
-
Create Farm cmd:
client.farms.createpayload:
'{"name": "<farm name>" , "publicIps": "<list of public ips(optional)>"}' -
Add Farm Ip cmd:
client.farms.addFarmIppayload:
'{"farmId": "<farm id>" , "ip": "<public ip>" , "gw": "<gateway>"}' -
Remove Farm Ip cmd:
client.farms.removeFarmIppayload:
'{"farmId": "<farm id>" , "ip": "<public ip>" }' -
Add Stellar Address cmd:
client.farms.addStellarAddresspayload:
'{"farmId": "<farm id>" , "stellarAddress": "<stellar address>" }' -
Get Fram By Id
cmd:
client.farms.getFarmByIDpayload:
'{"id": "<farm id>"}'
-
Add Node to network cmd:
client.networks.addNodepayload:
'{"name": "<network name>" , "ipRange": "<Public ips range>", "nodeId": "<zos node id>", "mycelium": "<Flag for mycelium>", "solutionProviderId": "<solution provider id>(optional)", "description": "<description>(optional)", "myceliumSeed": "<Hex mycelium seed>(optional)"}' -
List cmd:
client.networks.listpayload:
'' -
Check if network has Node cmd:
client.networks.hasNodepayload:
'{"name": "<network name>" , "ipRange": "<Public ips range>", "nodeId": "<zos node id>" }' -
Get WireGaurd Configs cmd:
client.networks.getWireGuardConfigspayload:
'{"name": "<network name>" , "ipRange": "<Public ips range>", "nodeId": "<zos node id>" }'
-
Deploy
cmd:
client.zos.deploypayload: the same as zos deployment without signing with additional parameter
'{"node_id": <zos node id> }' -
Get deployment
cmd:
client.zos.getDeploymentpayload:
'{"contractId": <your contract id>}' -
Ping Node
cmd:
client.zos.pingNodepayload:
'{"nodeId": <zos node id>}' -
Get Node Statistics
cmd:
client.zos.getNodeStatisticspayload:
'{"nodeId": <zos node id>}' -
Check if node has PublicIPv6
cmd:
client.zos.hasPublicIPv6payload:
'{"nodeId": <zos node id>}' -
List Network Interfaces
cmd:
client.zos.listNetworkInterfacespayload:
'{"nodeId": <zos node id>}' -
List Network PublicIPs
cmd:
client.zos.listNetworkPublicIPspayload:
'{"nodeId": <zos node id>}' -
Get Network PublicConfig
cmd:
client.zos.getNetworkPublicConfigpayload:
'{"nodeId": <zos node id>}' -
Get Storage Pools
cmd:
client.zos.getStoragePoolspayload:
'{"nodeId": <zos node id>}' -
Get Node GPU Info
cmd:
client.zos.getNodeGPUInfopayload:
'{"nodeId": <zos node id>}' -
Get Node PerfTests
cmd:
client.zos.getNodePerfTestspayload:
'{"nodeId": <zos node id>}' -
Get Node IP Validation
cmd:
client.zos.getNodeIPValidationpayload:
'{"nodeId": <zos node id>}' -
Get Node CPU Test
cmd:
client.zos.getNodeCPUTestpayload:
'{"nodeId": <zos node id>}'
-
Deploy
cmd:
client.machines.deploypayload:
{ "name": "wed1310t1", "network": { "ip_range": "10.203.0.0/16", "name": "wed159n3", "myceliumSeeds": [ { "nodeId": 3, "seed": "050d109829d8492d48bfb33b711056080571c69e46bfde6b4294c4c5bf468a76", //(HexSeed of length 32) }, ], }, "machines": [{ "name": "wed1310t2", "node_id": 3, "disks": [ { "name": "wed1310d2", "size": 10, "mountpoint": "/hamada" } ], "qsfs_disks":[ { "qsfs_zdbs_name": "hamada", "name": "mon2410t2", "prefix": "hamada", "cache": 1, // in GB "minimal_shards": 2, "expected_shards": 4, "encryption_key": "hamada", "mountpoint": "/ahmed", } ], "public_ip": false, "planetary": true, "mycelium": false, "myceliumSeed": "1e1404279b3d", //(HexSeed of length 6) "cpu": 1, "memory": 1024, "rootfs_size": 1, "flist": "https://hub.grid.tf/tf-official-apps/base:latest.flist", "entrypoint": "/sbin/zinit init", "env": { "SSH_KEY": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmm8OzLt+lTdGaMUwMFcw0P+vr+a/h/UsR//EzzeQsgNtC0bdls4MawVEhb3hNcycEQNd2P/+tXdLC4qcaJ6iABYip4xqqAeY098owGDYhUKYwmnMyo+NwSgpjZs8taOhMxh5XHRI+Ifr4l/GmzbqExS0KVD21PI+4sdiLspbcnVBlg9Eg9enM///zx6rSkulrca/+MnSYHboC5+y4XLYboArD/gpWy3zwIUyxX/1MjJwPeSnd5LFBIWvPGrm3cl+dAtADwTZRkt5Yuet8y5HI73Q5/NSlCdYXMtlsKBLpJu3Ar8nz1QfSQL7dB8pa7/sf/s8wO17rXqWQgZG6JzvZ root@ahmed-Inspiron-3576" } }], "corex": true, "gpus": ["0000:03:00.0/1002/15d8"], //gpus ids "metadata": "", "description": "" };Note: disk size and rootfs_size in GB, memory in MB, disk name should be different than the machine name
-
Update
cmd:
client.machines.updatepayload:
same as deploy method -
List
cmd:
client.machines.listpayload:
"" -
Get
cmd:
client.machines.getpayload:
{"name": "<deployment name>"} -
Delete
cmd:
client.machines.deletepayload:
{"name": "<deployment name>"} -
Add machine
cmd:
client.machines.add_machinepayload:
{ "deployment_name": "wed1310t1", "name": "wed1310m4", "node_id": 2, "disks": [ { "name": "wed1310d4", "size": 10, "mountpoint": "/hamada" } ], "public_ip": false, "planetary": true, "cpu": 1, "memory": 1024, "rootfs_size": 1, "flist": "https://hub.grid.tf/tf-official-apps/base:latest.flist", "entrypoint": "/sbin/zinit init", "env": { "SSH_KEY": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmm8OzLt+lTdGaMUwMFcw0P+vr+a/h/UsR//EzzeQsgNtC0bdls4MawVEhb3hNcycEQNd2P/+tXdLC4qcaJ6iABYip4xqqAeY098owGDYhUKYwmnMyo+NwSgpjZs8taOhMxh5XHRI+Ifr4l/GmzbqExS0KVD21PI+4sdiLspbcnVBlg9Eg9enM///zx6rSkulrca/+MnSYHboC5+y4XLYboArD/gpWy3zwIUyxX/1MjJwPeSnd5LFBIWvPGrm3cl+dAtADwTZRkt5Yuet8y5HI73Q5/NSlCdYXMtlsKBLpJu3Ar8nz1QfSQL7dB8pa7/sf/s8wO17rXqWQgZG6JzvZ root@ahmed-Inspiron-3576" } } -
Delete machine
cmd:
client.machines.delete_machinepayload:
{ "deployment_name": "wed1310t1", "name": "wed1310m2" }
single master and multiple workers.
-
Deploy
cmd:
client.k8s.deploypayload:
{ "name": "mon69t5", "secret": "hamadaellol", "network": { "name": "hamadanet", "ip_range": "10.201.0.0/16", "addAccess": true, "myceliumSeeds": [ { "nodeId": 3, "seed": "a5f0ea16a744af2c0c23fc878d727a6f355079f82d979ad4bc75dd8fb5ebc90e" //(HexSeed of length 32) }, { "nodeId": 2, "seed": "7edd9c250f834cb326c3cf116040cf2214f38c669bf27a72e2f5b9e44fc7b27e" //(HexSeed of length 32) } ] }, "masters": [ { "name": "master1", "node_id": 3, "cpu": 1, "memory": 1024, "rootfs_size": 1, "disk_size": 15, "public_ip": true, "public_ip6": false, "planetary": true, "mycelium": true, "myceliumSeed": "1791fed39e0f" //(HexSeed of length 6) } ], "workers": [ { "name": "worker1", "node_id": 2, "cpu": 1, "memory": 1024, "rootfs_size": 1, "disk_size": 15, "public_ip": false, "public_ip6": false, "planetary": true, "mycelium": true, "myceliumSeed": "580bafd349f5" //(HexSeed of length 6) } ], "metadata": "", "description": "", "ssh_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmm8OzLt+lTdGaMUwMFcw0P+vr+a/h/UsR//EzzeQsgNtC0bdls4MawVEhb3hNcycEQNd2P/+tXdLC4qcaJ6iABYip4xqqAeY098owGDYhUKYwmnMyo+NwSgpjZs8taOhMxh5XHRI+Ifr4l/GmzbqExS0KVD21PI+4sdiLspbcnVBlg9Eg9enM///zx6rSkulrca/+MnSYHboC5+y4XLYboArD/gpWy3zwIUyxX/1MjJwPeSnd5LFBIWvPGrm3cl+dAtADwTZRkt5Yuet8y5HI73Q5/NSlCdYXMtlsKBLpJu3Ar8nz1QfSQL7dB8pa7/sf/s8wO17rXqWQgZG6JzvZ root@ahmed-Inspiron-3576" }Note: disk size and rootfs_size in GB, memory in MB, masters and workers names should be different
-
List
cmd:
client.k8s.listpayload:
"" -
Get
cmd:
client.k8s.getpayload:
{"name": "<deployment name>"} -
Delete
cmd:
client.k8s.deletepayload:
{"name": "<deployment name>"} -
Add worker
cmd:
client.k8s.add_workerpayload:
{ "deployment_name": "sun199t2", "name": "sun199t1worker5", "node_id": 5, "cpu": 2, "memory": 1024, "rootfs_size": 1, "disk_size": 15, "public_ip": false, "planetary": true, "mycelium": true, "myceliumSeed": "580bafd349f5" //(HexSeed of length 6) } -
Delete worker
cmd:
client.k8s.delete_workerpayload:
{ "deployment_name": "sun199t2", "name": "sun199t1worker5" }
-
Deploy
cmd:
client.zdbs.deploypayload:
{ "name": "hamada", "zdbs": [ { "name": "zdb1", "node_id": 3, "mode": "seq", "disk_size": 10, "public": true, "password": "hamadaellol" }, { "name": "zdb2", "node_id": 3, "mode": "seq", "disk_size": 10, "public": true, "password": "hamadaellol" } ], "metadata": "", "description": "" }Note: disk size in GB, zdb names should be different
-
List
cmd:
client.zdbs.listpayload:
"" -
Get
cmd:
client.zdbs.getpayload:
{"name": "<deployment name>"} -
Delete
cmd:
client.zdbs.deletepayload:
{"name": "<deployment name>"} -
Add zdb
cmd:
client.zdbs.add_zdbpayload:
{ "deployment_name": "sun199t1", "name": "hamada1", "node_id": 2, "mode": "seq", "disk_size": 10, "public": true, "password": "hamada12345" } -
Delete zdb
cmd:
client.zdbs.delete_zdbpayload:
{ "deployment_name": "sun199t1", "name": "hamada1" }
-
Deploy
cmd:
client.qsfs_zdbs.deploypayload:
{ "name": "hamada", "count": 3, "node_ids": [3, 5], "disk_size": 10, "password": "hamadaellol", "metadata": "", "description": "" }Note: disk size in GB
-
List
cmd:
client.qsfs_zdbs.listpayload:
"" -
Get
cmd:
client.qsfs_zdbs.getpayload:
{"name": "<deployment name>"} -
Delete
cmd:
client.qsfs_zdbs.deletepayload:
{"name": "<deployment name>"}
-
Create It will create a new account on the given blockchain type
<stellar, algorand or tfchain>.cmd:
client.blockchain.createpayload:
{ "name": "mywallet", "blockchain_type": "<stellar, algorand or tfchain>", "relay": "<required for tfchain>" // optional }return:
{ "name": "mywallet", "public_key": "<wallet address>", "mnemonic": "<wallet mnemonic>", "twinId": "<wallet twinId>", // optional "blockchain_type": "<stellar, algorand or tfchain>" } -
Select It will select a wallet to be used.
cmd:
client.blockchain.selectpayload:
{ "name": "mywallet" } -
Init It will return the wallet address after importing the wallet and saving it.
cmd:
client.blockchain.initpayload:
{ "name": "mywallet", "secret": "<wallet secret>", "blockchain_type": "<stellar, algorand or tfchain>" } -
Get It will return the wallet.
cmd:
client.blockchain.getpayload:
""return:
{ "name": "<wallet name>", "public_key": "<wallet address>", "mnemonic": "<wallet mnemonic>", "twinId": "<wallet twinId>", // optional "blockchain_type": "<stellar, algorand or tfchain>" } -
Exist
cmd:
client.blockchain.existpayload:
{"name": "<wallet name>"} -
List
cmd:
client.blockchain.listpayload:
//optional { "blockchain_type": "<stellar, algorand or tfchain>" }
return:
[ { "name": "<wallet name>", "public_key": "<wallet address>", "blockchain_type": "<stellar, algorand or tfchain>" }, ... ] -
Assets It will list all the assets in a given wallet
cmd:
client.blockchain.assetspayload:
""return:
{ "name": "<wallet name>", "public_key": "<wallet address>", "blockchain_type": "<stellar, algorand or tfchain>", "assets": [ { "asset": "<wallet asset>", "amount": "<asset balance>" }, ... ] } -
Pay
cmd:
client.blockchain.paypayload:
""{ "name": "<wallet name>", "address_dest": "<target wallet address>", "blockchain_type_dest": "<stellar, algorand or tfchain>", "amount": 10, "asset": "<asset>", "description": "<description>" } -
Delete
cmd:
client.blockchain.deletepayload:
"" -
Sign
cmd:
client.blockchain.signpayload:
""{ "content": "<your message>" }
-
Create It will create a new account on stellar testnet.
cmd:
client.stellar.createpayload:
{ "name": "mywallet" }return:
{ "name": "mywallet", "public_key": "<wallet address>", "mnemonic": "<your mnemonic>", "blockchain_type": "stellar" } -
Init It will return the wallet address after importing the wallet and saving it.
cmd:
client.stellar.initpayload:
{ "name": "mywallet", "secret": "<wallet secret>" } -
Get It will return the wallet.
cmd:
client.stellar.getpayload:
{"name": "<wallet name>"}return:
{ "name": "<wallet name>", "public_key": "<wallet address>", "mnemonic": "<your mnemonic>", "blockchain_type": "stellar" } -
Update It will return the new wallet address after updating the wallet and saving it.
cmd:
client.stellar.updatepayload:
{ "name": "mywallet", "secret": "<wallet secret>" } -
Exist
cmd:
client.stellar.existpayload:
{"name": "<wallet name>"} -
List
cmd:
client.stellar.listpayload:
""return:
[ { "name": "<wallet name>", "public_key": "<wallet public key>", "blockchain_type": "stellar" }, ... ] -
Assets It will list all the assets in a given wallet
cmd:
client.stellar.assetspayload:
{"name": "<wallet name>"}return:
{ "name": "<wallet name>", "public_key": "<wallet public key>", "blockchain_type": "stellar", "assets": [ { "asset": "<wallet asset>", "amount": "<asset balance>" }, ... ] } -
Balance by address It will list the balance for all assets given a wallet address.
cmd:
client.stellar.balance_by_addresspayload:
{"address": "<wallet address>"}return:
[ { "asset": "<wallet asset>", "amount": "<asset balance>" }, ... ] -
Pay
cmd:
client.stellar.paypayload:
{ "name": "<wallet name>", "address_dest": "<target wallet address>", "amount": 10, "asset": "TFT", "description": "<memo>" } -
Delete
cmd:
client.stellar.deletepayload:
{"name": "<wallet name>"} -
Sign
cmd:
client.stellar.signpayload:
{ "name": "<wallet name>", "content": "<your message>" } -
Verify It will verify if the signed content is the same as the original content
cmd:
client.stellar.verifypayload:
{ "public_key": "<wallet address>", "content": "<your message>", "signed_content": "<your signed message>" }
-
Create It will create a new account on algorand testnet.
cmd:
client.algorand.createpayload:
{ "name": "mywallet" }return:
{ "name": "mywallet", "public_key": "<wallet address>", "mnemonic": "<wallet mnemonic>", "blockchain_type": "algorand" } -
Init It will return the wallet address after importing the wallet and saving it.
cmd:
client.algorand.initpayload:
{ "name": "mywallet", "secret": "<wallet mnemonic>" } -
Get It will return the wallet.
cmd:
client.algorand.getpayload:
{"name": "<wallet name>"}return:
{ "name": "<wallet name>", "public_key": "<wallet address>", "mnemonic": "<wallet mnemonic>", "blockchain_type": "algorand" } -
Exist
cmd:
client.algorand.existpayload:
{"name": "<wallet name>"} -
List
cmd:
client.algorand.listpayload:
""return:
[ { "name": "<wallet name>", "public_key": "<wallet address>", "blockchain_type": "algorand" }, ... ] -
Assets It will list all the assets in a given wallet
cmd:
client.algorand.assetspayload:
{"name": "<wallet name>"}return:
{ "name": "<wallet name>", "public_key": "<wallet address>", "blockchain_type": "algorand", "assets": [ { "asset": "<wallet asset-id>", "amount": "<asset balance>" }, ... ] } -
Assets by address It will list all the assets given a wallet address.
cmd:
client.algorand.assetsByAddresspayload:
{"address": "<wallet address>"}return:
[ { "asset": "<wallet asset-id>", "amount": "<asset balance>" }, ... ] -
Pay
cmd:
client.algorand.paypayload:
{ "name": "<wallet name>", "address_dest": "<target wallet address>", "amount": 10, "description": "<description>" } -
Delete
cmd:
client.algorand.deletepayload:
{"name": "<wallet name>"} -
Sign
cmd:
client.algorand.signpayload:
{ "name": "<wallet name>", "content": "<your message>" }
-
Create It will create a new account on tfchain.
Note: Each network has its own relay. So, the relay would be "relay.${network}.grid.tf" in all networks except for main. It would be "relay.grid.tf".
cmd:
client.tfchain.createpayload:
{ "name": "mywallet", "relay": "<relay>" }return:
{ "name": "mywallet", "public_key": "<wallet address>", "mnemonic": "<wallet mnemonic>", "twinId": "<wallet twinId>", "blockchain_type": "tfchain" } -
Init It will return the wallet address after importing the wallet and saving it.
cmd:
client.tfchain.initpayload:
{ "name": "mywallet", "secret": "<wallet secret>" } -
Get It will return the wallet.
cmd:
client.tfchain.getpayload:
{"name": "<wallet name>"}return:
{ "name": "<wallet name>", "public_key": "<wallet address>", "mnemonic": "<wallet mnemonic>", "blockchain_type": "tfchain" } -
Update It will return the new wallet address after updating the wallet and saving it.
cmd:
client.tfchain.updatepayload:
{ "name": "mywallet", "secret": "<wallet secret>" } -
Exist
cmd:
client.tfchain.existpayload:
{"name": "<wallet name>"} -
List
cmd:
client.tfchain.listpayload:
""return:
[ { "name": "<wallet name>", "public_key": "<wallet address>", "blockchain_type": "tfchain" }, ... ] -
Assets It will list all the assets in a given wallet
cmd:
client.tfchain.assetspayload:
{"name": "<wallet name>"}return:
{ "name": "<wallet name>", "public_key": "<wallet address>", "blockchain_type": "tfchain", "assets": [ { "asset": "TFT", "amount": "<free balance>" }, ... ] } -
Balance by address It will list all the assets given a wallet address.
cmd:
client.tfchain.balance_by_addresspayload:
{"address": "<wallet address>"}return:
[ { "asset": "TFT", "amount": "<free balance>" }, ... ] -
Pay
cmd:
client.tfchain.paypayload:
{ "name": "<wallet name>", "address_dest": "<target wallet address>", "amount": 10 } -
Delete
cmd:
client.tfchain.deletepayload:
{"name": "<wallet name>"} -
Sign
cmd:
client.tfchain.signpayload:
{ "name": "<wallet name>", "content": "<your message>" } -
Vote
cmd:
client.tfchain.votepayload:
{ "name": "<wallet name>", "address": "<wallet address>", "farmId": "<Farm id>", "approve": "<approval of vote>", "hash": "<hash>" }
-
Set
cmd:
client.kvstore.setpayload:
'{"key": "<your key>", "value": "<key's value>"}' -
Get
cmd:
client.kvstore.getpayload:
'{"key": "<your key>"}' -
List
cmd:
client.kvstore.listpayload:
"" -
Remove
cmd:
client.kvstore.removepayload:
'{"key": "<your key>"}'
-
Get My Balance
cmd:
client.balance.getMyBalancepayload:
"" -
Get More Funds
cmd:
client.balance.getMoreFundspayload:
"" -
Get
cmd:
client.balance.getpayload:
'{"address": "<Substrate account address>"}' -
Transfer
cmd:
client.balance.transferpayload:
'{"address": "<Substrate account address>", "amount": 1}'
-
Get Farms
cmd:
client.capacity.getFarmspayload:
'{"page": <page number>, "maxResult": <result count per page>}'Note: page, maxResult are optional with default values page: 1, maxResult: 50
-
Get All Farms
cmd:
client.capacity.getAllFarmspayload:
"" -
Get Nodes
cmd:
client.capacity.getNodespayload:
'{"page": <page number>, "maxResult": <result count per page>}'Note: page, maxResult are optional with default values page: 1, maxResult: 50
-
Get All Nodes
cmd:
client.capacity.getAllNodespayload:
"" -
Filter Nodes
cmd:
client.capacity.filterNodespayload:
{ "cru": <nodes with free cores>, "mru": <nodes with free memory in GB>, "sru": <node with free SSD storage in GB>, "hru": <nodes with free HDD storage in GB>, "publicIPs": <nodes in a farm with free public ips>, "accessNodeV4": <nodes with public config for ipv4>, "accessNodeV6": <nodes with public config for ipv6>, "gateway": <nodes with domain>, "farmId": <nodes in a farm with that farmId>, "farmName": "<nodes in a farm with that farmId>", "country": "<nodes in a specific country>", "city": "<nodes in a specific city>" }example:
{ "cru": 2, "mru": 4, "sru": 40, "publicIPs": true, "accessNodeV4": false, "accessNodeV6": false, "gateway": true, "farmName": "freefarm" }Notes: All filter options are optional. It filters nodes with status(up or down) by default.
-
Filter Farms
cmd:
client.capacity.filterNodespayload:
{ "nodeCRU": <nodes with total cores>, "nodeMRU": <nodes with free memory in GB>, "nodeSRU": <nodes with free SSD storage in GB>, "nodeHRU": <nodes with free HDD storage in GB>, "publicIPs": <farms with nodes with free public ips>, "certificationType": <certificationType4>, "farmName": "<farm name>", "country": "<nodes in a specific country>", "dedicated": "<dedicated nodes in a farm>", "nodeCertified": "<farms that have certified nodes>", "nodeHasGPU": "<farms that have nodes with GPU>" }Notes: All filter options are optional.
-
Check Farm Has Free Public IPs
cmd:
client.capacity.checkFarmHasFreePublicIpspayload:
'{"farmId": 1}' -
Get Nodes By FarmId
cmd:
client.capacity.getNodesByFarmIdpayload:
'{"farmId": 1}' -
Get Node Free Resources
cmd:
client.capacity.getNodeFreeResourcespayload:
'{"nodeId": 7}' -
Get FarmId From Farm Name
cmd:
client.capacity.getFarmIdFromFarmNamepayload:
'{"farmName": "freefarm"}'