@extra-wallet/send-transaction
v1.0.2
Published
**Send Transaction CLI** allows you to send transactions on different networks directly from your terminal.
Readme
Send Transaction CLI
About
Send Transaction CLI allows you to send transactions on different networks directly from your terminal.
License
Licensed under the PolyForm Noncommercial License 1.0.0. Commercial use requires a separate written commercial license agreement from the licensor — contact [email protected].
Key features
- Supported Networks: Ethereum, Optimism, Bsc, Polygon, Sonic, Base, Arbitrum, Avalanche, Tron, Ethereum-Classic, Ton, Bitcoin, Litecoin, Solana, Sui, Aptos, Dogecoin, Ripple, Cardano, Bch, Polkadot
- Pro Mode: You can use EXTRA WALLET API key if you do not want to search for all the other APIs. We will handle everything for you
How to run
Option 1: Run via npm (recommended)
This is the recommended way for most users.
Requirements
- Node.js (v22)
Run
npx @extra-wallet/send-transactionThis will:
- download the CLI on demand,
- start the interactive terminal UI
Option 2: Run locally from the repository (development)
Use this if you want to:
- inspect the code,
- modify the CLI,
- contribute or debug.
Requirements
- Node.js (v22)
- pnpm
1. Install dependencies
From the repository root:
pnpm install2. Build shared code
cd shared/sdk
pnpm build3. Return to the root of the repository
cd ../..4. Build the CLI
cd packages/send-transaction-cli
pnpm build5. Run locally
npx send-transactionHow to use
The CLI can be run in two modes: interactive and non-interactive
To run the program in interactive mode you just have to follow the instructions of the previous step. In this mode you will be asked for needed inputs step by step.
To run the program in non-interactive mode you have to also specify arguments using flags like this:
npx send-transaction --network="arbitrum" --extrawallet-key="..." --input="{...}"To get information about every argument, you can use help command:
npx send-transaction helpArguments
| Flag | Required | Description | Aliases |
| ---------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| input | true | The transaction body you want to send in JSON format. Has to have all the required information(gas, sender, receiver etc) | i, d, data |
| network | true | Network to which the given transaction belongs to | n |
| extrawallet-key | false | EXTRA WALLET API key. Can be used instead of rpcUrl for more convenient usage of the CLI. Optional on all networks but required on Cardano | e, extrawallet |
| private-key | false | The private key to use to sign the given transaction. Required on every network except for Polkadot | p, pk, key |
| mnemonic | false | Mnemonic used to sign the transaction. Only required on Polkadot |
| derivation-path | false | Derivation path of the address derived from mnemonic that should be used to sign transaction. Only required on Polkadot |
| scheme | false | Polkadot address scheme. Only required on Polkadot |
| contract-version | false | Version of the contract the transaction interacts with. Only required on The Open Network(TON) |
| expiry-time | false | Transaction expiration time. Only required on The Open Network(TON) |
Output
If transaction sending was successful, you will see a message about it that will contain the hash of the transaction.
If transaction sending failed, you will see a message about it containing the error that happened.
