Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
nahmii-cli
Advanced tools
This is a command line interface that aims to make usage of the hubii nahmii APIs as easy and convenient as possible, while maintaining the flexibility of the platform.
nahmii is hubii's scaling solution for the Ethereum block chain. It is a hybrid centralized/decentralized solution that enables instant (micro-) payments, trading and trustless settlements.
See www.hubii.com for more information.
To install and make the command part of your path:
npm install -g nahmii-cli
To use the nahmii CLI tool you need to first create a configuration in your
home folder as .nahmii/config.yaml
Use the init
command to create a new config file:
nahmii init
The config.yaml
file is a YAML file where you will need to specify the
following properties:
The CLI tool will give a warning in the shell if the configuration file is accessible by anyone besides the owner. To keep your wallet and API access secure, make sure only you have access to the config file.
Example file:
apiRoot: api2.dev.hubii.net
appId: 123456789012345678901234
appSecret: ********************
wallet:
address: 1234567890123456789012345678901234567890
secret: ********************
The UTC file is expected to be found in ~/.nahmii/keystore
.
For withdrawing the nahmii off-chain balances back to the base layer, it will have to go through the settlement processes. The processes will be as following:
settle
with the amount and currency. This will initiate a settlement dispute period, which would last 5 minutes on Ropsten.stage
to update the staged balance, which is the maximum available amount for withdrawal.withdraw
to transfer a certain amount for a currency from the nahmii contracts to your wallet.For details of the settlement and withdrawal commands, please refer to the example below or the help messages for the commands.
To show the built-in help:
nahmii --help
or to show help for a specific sub-command:
nahmii <command> --help
This will create a config folder and file if it doesnt already exist:
nahmii init
To recreate and discard previous settings add the --force
flag:
nahmii init --force
nahmii configuration
Deposit on-chain funds to be available in hubii nahmii:
nahmii deposit 1 ETH
nahmii deposit 1 TT1
Results are printed as JSON. It is recommended to pipe the result
through jq
to get a pretty output in the shell.
Shows your balance in hubii nahmii:
nahmii show balance
Results are printed as JSON. It is recommended to pipe the result
through jq
to get a pretty output in the shell.
nahmii pay 100 TT1 to 0a24740dcb4ba8fb8469ef4cfe22eeedcf069076
Results are printed as JSON. It is recommended to pipe the result
through jq
to get a pretty output in the shell.
nahmii show payments
Results are printed as JSON. It is recommended to pipe the result
through jq
to get a pretty output in the shell.
nahmii show receipts
Results are printed as JSON. It is recommended to pipe the result
through jq
to get a pretty output in the shell.
nahmii show tokens
Results are printed as JSON. It is recommended to pipe the result
through jq
to get a pretty output in the shell.
This will start necessary settlements for the intended stage amount 1 in ETH currency:
nahmii settle 1 ETH
This will update staged balance(max withdrawal amount) according to the qualified settlements:
nahmii stage ETH
This will convert an amount of staged balance back to nahmii off-chain balance:
nahmii unstage 1 ETH
This will withdraw 1 ETH from staged balance to base layer:
nahmii withdraw 1 ETH
FAQs
CLI interface for using the nahmii by hubii protocol
The npm package nahmii-cli receives a total of 3 weekly downloads. As such, nahmii-cli popularity was classified as not popular.
We found that nahmii-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.