https://github.com/masa-finance/masa-cli
Masa Command Line Interface
https://github.com/masa-finance/masa-cli
cli identity web3
Last synced: 4 months ago
JSON representation
Masa Command Line Interface
- Host: GitHub
- URL: https://github.com/masa-finance/masa-cli
- Owner: masa-finance
- License: mit
- Created: 2022-10-20T10:55:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T08:26:26.000Z (about 1 year ago)
- Last Synced: 2024-04-12T23:27:52.161Z (about 1 year ago)
- Topics: cli, identity, web3
- Language: TypeScript
- Homepage: https://masa.finance
- Size: 1.34 MB
- Stars: 4
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Masa CLI
- [Masa CLI](#masa-cli)
`](#masa-marketplace-points-stake-address)
- [Overview](#overview)
- [Usage / Installation](#usage--installation)
- [npm](#npm)
- [yarn](#yarn)
- [npx](#npx)
- [Commands](#commands)
- [`masa login`](#masa-login)
- [`masa logout`](#masa-logout)
- [`masa account`](#masa-account)
- [`masa identity`](#masa-identity)
- [`masa identity info`](#masa-identity-info)
- [`masa identity show`](#masa-identity-show)
- [`masa identity burn`](#masa-identity-burn)
- [`masa soul-name`](#masa-soul-name)
- [`masa soul-name info`](#masa-soul-name-info)
- [`masa soul-name list`](#masa-soul-name-list)
- [`masa soul-name tail`](#masa-soul-name-tail)
- [`masa soul-name resolve `](#masa-soul-name-resolve-soulname)
- [`masa soul-name resolve-reverse `](#masa-soul-name-resolve-reverse-soulname)
- [`masa soul-name burn `](#masa-soul-name-burn-soulname)
- [`masa soul-name renew `](#masa-soul-name-renew-soulname-years)
- [`masa soul-name send `](#masa-soul-name-send-soulname-receiver)
- [`masa soul-name show `](#masa-soul-name-show-soulname)
- [`masa soul-name verify `](#masa-soul-name-verify-soulname)
- [`masa credit-score`](#masa-credit-score)
- [`masa credit-score info`](#masa-credit-score-info)
- [`masa credit-score list`](#masa-credit-score-list)
- [`masa credit-score burn `](#masa-credit-score-burn-credit-score-id)
- [`masa credit-score load `](#masa-credit-score-load-credit-score-id)
- [`masa credit-score link`](#masa-credit-score-link)
- [`masa credit-score link create `](#masa-credit-score-link-create-credit-score-id-reader-identity-id)
- [`masa credit-score link establish `](#masa-credit-score-link-establish-passport)
- [`masa credit-score link query `](#masa-credit-score-link-query-passport)
- [`masa credit-score link list `](#masa-credit-score-link-list-credit-score-id)
- [`masa credit-score link verify `](#masa-credit-score-link-verify-credit-score-id)
- [`masa credit-score link break `](#masa-credit-score-link-break-credit-score-id-reader-identity-id)
- [`masa green`](#masa-green)
- [`masa green info`](#masa-green-info)
- [`masa green list`](#masa-green-list)
- [`masa green burn `](#masa-green-burn-green-id)
- [`masa sbt`](#masa-sbt)
- [`masa sbt info `](#masa-sbt-info-contract-address)
- [`masa sbt list `](#masa-sbt-list-contract-address)
- [`masa sbt burn `](#masa-sbt-burn-contract-address-sbt-id)
- [`masa sssbt`](#masa-sssbt)
- [`masa sssbt add-authority `](#masa-sssbt-add-authority-contract-address-authority-address)
- [`masa dynamic-sssbt`](#masa-dynamic-sssbt)
- [`masa dynamic-sssbt add-authority `](#masa-dynamic-sssbt-add-authority-contract-address-authority-address)
- [`masa oracle`](#masa-oracle)
- [`masa oracle stake `](#masa-oracle-stake-amount)
- [`masa oracle unstake `](#masa-oracle-unstake-amount)
- [`masa marketplace`](#masa-marketplace)
- [`masa marketplace points`](#masa-marketplace-points)
- [`masa marketplace points show`](#masa-marketplace-points-show)
- [`masa marketplace points info`](#masa-marketplace-points-info)
- [`masa marketplace points stake
- [`masa token`](#masa-token)
- [`masa token bridge`](#masa-token-bridge)
- [`masa token bridge send `](#masa-token-bridge-send-to-amount)
- [`masa token wrap`](#masa-token-wrap)
- [`masa token wrap deposit `](#masa-token-wrap-deposit-amount)
- [`masa token wrap withdraw `](#masa-token-wrap-withdraw-amount)
- [`masa token governance`](#masa-token-governance)
- [`masa token governance mesh`](#masa-token-governance-mesh)
- [`masa token governance timelock`](#masa-token-governance-timelock)
- [`masa token staking`](#masa-token-staking)
- [`masa token staking stake `](#masa-token-staking-stake-amount-duration)
- [`masa token staking unlock `](#masa-token-staking-unlock-position)
- [`masa token staking claim `](#masa-token-staking-claim-position)
- [`masa token staking list`](#masa-token-staking-list)
- [`masa token staking info`](#masa-token-staking-info)
- [`masa settings`](#masa-settings)
- [`masa settings set `](#masa-settings-set-key-value)
- [`masa settings preset `](#masa-settings-preset-environment)
- [`masa settings preset-network `](#masa-settings-preset-network-network-name)
- [`masa settings show`](#masa-settings-show)
- [Configuration](#configuration)## Overview
```bash
$ masa --help
__ __ ____ _ ___
| \/ | __ _ ___ __ _ / ___| | | |_ _|
| |\/| | / _` | / __| / _` | | | | | | |
| | | | | (_| | \__ \ | (_| | | |___ | |___ | |
|_| |_| \__,_| |___/ \__,_| \____| |_____| |___|Usage: masa [command] [subcommand] [arguments] [options]
The Masa CLI
Options:
-v, --version output the version number
--verbose output with verbose logging
-n, --network Address override
-pk, --privateKey Private Key override
-r, --rpcUrl RPC URL override
-h, --help display help for commandCommands:
login Login to the masa infrastructure
logout Logout from the masa infrastructure
account Shows information about your account
identity Identity commands
identity info Shows info about all Identities
identity show [options] Shows detail about your masa identity
identity burn Burns your masa identity
soul-name Soul Name Commands
soul-name info Shows info about all Soul Names
soul-name list [options] Lists your soul names
soul-name tail [options] Tails your soul names
soul-name resolve Resolves a soul name to the address
soul-name resolve-reverse Resolves an address to soul names
soul-name burn Burns soul name that you own
soul-name renew Renews a soul name that you own
soul-name send Sends a soul name to that you own to a receiver
soul-name show Shows info about a Soul Name
soul-name verify Verifies a Soul Name
credit-score Credit Score Commands
credit-score info Shows info about all Credit Scores
credit-score list [options] Lists your Credit Scores
credit-score burn Burns a Credit Score
credit-score load Loads a Credit Score
credit-score link Credit Score Soul Linker Commands
credit-score link create Creates a Soul Linker Passport
credit-score link establish Establishes a link to a Credit Score
credit-score link query Queries a link to a Credit Score
credit-score link list Lists all soul links for a credit score id
credit-score link verify [options] Verifies soul link
credit-score link break Verifies soul link
green Green Commands
green info Shows info about Masa Green
green list [options] Lists your Greens
green burn Burns a green
sbt SBT Commands
sbt info Shows info about an SBT
sbt list [options] Lists your SBTs
sbt burn Burns an SBT
sssbt SSSBT Commands
sssbt add-authority Adds an Authority to the SSSBT
dynamic-sssbt Dynamic SSSBT Commands
dynamic-sssbt add-authority Adds an Authority to the SSSBT
oracle Oracle commands
oracle stake
oracle unstake
marketplace Marketplace commands
marketplace points
marketplace points show [options]
marketplace points stake
token Token commands
token bridge Bridge commands
token bridge send [options]
token wrap Wrapping commands
token wrap deposit
token wrap withdraw
token governance Governance commands
token governance mesh [options]
token governance timelock [options]
token staking Staking commands
token staking stake
token staking unlock
token staking claim
token staking list [options]
token staking info
settings Set config settings
settings set Changes setting to
settings preset Changes setting presets
settings preset-network Changes setting presets
settings show Shows config values
help [command] display help for command
```To get help for a specific command use:
```bash
$ masa identity --help
```to get help for the identity commands.
## Usage / Installation
### npm
`npm install -g @masa-finance/masa-cli`
```bash
$ masa --versionCLI: v0.1.0 Contracts: v0.3.0 SDK: v0.9.1
Arweave Endpoint: https://arweave.net:443
RPC Endpoint: https://rpc.ankr.com/eth_goerli
Masa Endpoint: https://dev.middleware.masa.finance/
```### yarn
`yarn global add @masa-finance/masa-cli`
```bash
$ masa --versionCLI: v0.1.0 Contracts: v0.3.0 SDK: v0.9.1
Arweave Endpoint: https://arweave.net:443
RPC Endpoint: https://rpc.ankr.com/eth_goerli
Masa Endpoint: https://dev.middleware.masa.finance/
```### npx
```bash
$ npx @masa-finance/masa-cli@latest --versionCLI: v0.1.0 Contracts: v0.3.0 SDK: v0.9.1
Arweave Endpoint: https://arweave.net:443
RPC Endpoint: https://rpc.ankr.com/eth_goerli
Masa Endpoint: https://dev.middleware.masa.finance/
```## Commands
### `masa login`
Login to the masa infrastructure
### `masa logout`
Logout from the masa infrastructure
### `masa account`
Shows information about your account
- `-a, --address
`
Address override### `masa identity`
Identity commands
#### `masa identity info`
Shows info about all Identities
#### `masa identity show`
Shows detail about your masa identity
Options:
- `-a, --address
`
Address override#### `masa identity burn`
Burns your masa identity
### `masa soul-name`
Soul Name Commands
- `-c, --contract `
Contract address override#### `masa soul-name info`
Shows info about all Soul Names
#### `masa soul-name list`
Lists your soul names
Options:
- `-a, --address
`
Address override#### `masa soul-name tail`
Tails your soul names
Options:
- `-l, --limit `
Limit#### `masa soul-name resolve `
Resolves a soul name to the address
- ` Soul Name to resolve`
#### `masa soul-name resolve-reverse `
Resolves an address to soul names
- ` Address to resolve`
#### `masa soul-name burn `
Burns soul name that you own
- ` Soul Name to burn`
#### `masa soul-name renew `
Renews a soul name that you own
- ` Soul Name to burn`
- ` Years to renew for`#### `masa soul-name send `
Sends a soul name to that you own to a receiver
- ` Soul Name to send`
- ` Receiver to receive the Soul Name`#### `masa soul-name show `
Shows info about a Soul Name
- ` Soul Name to show`
#### `masa soul-name verify `
Verifies a Soul Name
- ` Soul Name to verify`
### `masa credit-score`
Credit Score Commands
#### `masa credit-score info`
Shows info about all Credit Scores
#### `masa credit-score list`
Lists your Credit Scores
Options:
- `-a, --address
`
Address override#### `masa credit-score burn `
Burns a Credit Score
- ` ID of the Credit Score to burn`
#### `masa credit-score load `
Loads a Credit Score
- ` ID of the Credit Score to load`
#### `masa credit-score link`
Credit Score Soul Linker Commands
##### `masa credit-score link create `
Creates a Soul Linker Passport
- ` ID of the Credit Score to grant access`
- ` ID of the identity that should receive access`##### `masa credit-score link establish `
Establishes a link to a Credit Score
- ` Masa Soul Linker passport`
##### `masa credit-score link query `
Queries a link to a Credit Score
- ` Masa Soul Linker passport`
##### `masa credit-score link list `
Lists all soul links for a credit score id
- ` ID of the Credit Score to list all the links of`
##### `masa credit-score link verify `
Verifies a Soul Link
- ` ID of the Credit Score to grant access`
Options:
- `-r, --reader-identity-id `
ID of the identity that should receive access##### `masa credit-score link break `
Breaks a Soul Link
- ` ID of the Credit Score to grant access`
- ` ID of the identity that should receive access`### `masa green`
Green Commands
#### `masa green info`
Shows info about Masa Green
#### `masa green list`
Lists your Greens
Options:
- `-a, --address
`
Address override#### `masa green burn `
Burns a green
- ` ID of the Green to burn`
### `masa sbt`
SBT Commands
#### `masa sbt info `
Shows info about an SBT
- ` Address of the SBT to sign`
#### `masa sbt list `
Lists your SBTs
- ` Address of the SBT contract to list`
`
Options:
- `-a, --address
Address override#### `masa sbt burn `
Burns an SBT
- ` Address of the SBT to sign`
- ` ID of the SBT to burn`### `masa sssbt`
SSSBT Commands
#### `masa sssbt add-authority `
Adds an Authority to the SSSBT
- ` Address of the SBT to add the authority to`
- ` Address of the Authority`### `masa dynamic-sssbt`
Dynamic SSSBT Commands
#### `masa dynamic-sssbt add-authority `
Adds an Authority to the SSSBT
- ` Address of the SBT to add the authority to`
- ` Address of the Authority`### `masa oracle`
Oracle commands
#### `masa oracle stake `
- ` Amount to stake`
#### `masa oracle unstake `
- ` Amount to unstake`
### `masa marketplace`
Marketplace commands
#### `masa marketplace points`
##### `masa marketplace points show`
Options:
- `-a, --address
`
Address override##### `masa marketplace points info`
Shows information about the points
##### `masa marketplace points stake
`- `
Pool address`
Options:
- `-t, --threshold `
Number of points to skip before staking### `masa token`
Token commands
#### `masa token bridge`
Bridge commands
##### `masa token bridge send `
- ` To network`
- ` Amount to send`
Options:
- `-s, --slippage `
Slippage#### `masa token wrap`
Wrapping commands
##### `masa token wrap deposit `
- ` Amount to deposit`
##### `masa token wrap withdraw `
- ` Amount to withdraw`
#### `masa token governance`
Governance commands
##### `masa token governance mesh`
Options:
- `-t, --testnets`
Show testnets##### `masa token governance timelock`
Options:
- `-t, --testnets`
Show testnets#### `masa token staking`
Staking commands
##### `masa token staking stake `
- ` Amount to stake`
- ` Duration to stake`##### `masa token staking unlock `
- ` Index to unlock`
##### `masa token staking claim `
- ` Index to claim`
##### `masa token staking list`
Options:
- `-a, --address
`
Address to list##### `masa token staking info`
### `masa settings`
Set config settings
#### `masa settings set `
Changes setting <key> to <value>
- ` key to set`
- ` value to set to key`#### `masa settings preset `
Changes setting <environment> presets
- ` The environment to use as preset`
#### `masa settings preset-network `
Changes setting <network-name> presets
- ` The network to use as preset`
#### `masa settings show`
Shows config values
## Configuration
All the below fields can be set with:
```bash
$ masa settings set
```| Key | Type | Description | Default Value |
| ---------------- | --------- | ------------------------------------------------------------------------------------- | ----------------------------------------- |
| cookie | `string` | Stores cookie value. Don't set this manually unless you know what you do! | |
| api-url | `string` | The API Endpoint of the Masa Infrastructure for `dev`, `test`, `beta` and production. | "https://dev.middleware.masa.finance/" |
| environment | `string` | The environment to use `dev`, `test`, `beta`, `production`. | "dev" |
| rpc-url | `string` | The RPC Endpoint to reach the Blockchain. | "https://rpc.ankr.com/eth_goerli" |
| network | `string` | The network name ie. "goerli". | "goerli" |
| private-key | `string` | Your private key of the account to use in the cli. | `ethers.Wallet.createRandom().privateKey` |
| arweave-host | `string` | The arweave host to use for loading metadata. | "arweave.net" |
| arweave-port | `number` | The arweave port to use for loading metadata. | 443 |
| arweave-protocol | `string` | The arweave protocol to use for loading metadata. | "https" |
| arweave-logging | `boolean` | Turn arweave logging on or off. | false |