Web3金融区块链Injective:从核心原理到命令行实战指南Injective作为一个专为金融领域构建的Web3区块链,凭借其高性能、低成本和独特的链上订单簿基础设施,在去中心化金融世界中占据了重要地位。理解其核心技术和经济模型是进入其生态的第一步,但真正的掌握源于实践。本文旨在提供一个全面
Injective 作为一个专为金融领域构建的Web3区块链,凭借其高性能、低成本和独特的链上订单簿基础设施,在去中心化金融世界中占据了重要地位。理解其核心技术和经济模型是进入其生态的第一步,但真正的掌握源于实践。本文旨在提供一个全面的Injective指南,不仅深入剖析其从底层技术到生态发展的核心概念,还将通过injectived命令行工具,手把手地带领读者完成从环境配置、钱包创建、代币交易到设置企业级多签钱包的全流程实战操作,帮助您从理论和实践两个维度彻底驾驭Injective。
Injective (INJ) 是一个专为Web3金融应用量身打造的高速、可互操作的第一层(Layer-1)区块链。它致力于通过提供先进的去中心化金融(DeFi)基础设施,打破传统金融壁垒,构建一个更公平、更自由的金融新范式。
Injective 由斯坦福大学校友 Eric Chen 和 Albert Chon 于2018年创立,并获得了币安(Binance)、Pantera Capital 和知名投资人马克·库班(Mark Cuban)等众多顶级机构和个人的投资。
Injective 建立在 Cosmos SDK 之上,并采用基于 Tendermint 的权益证明(Proof-of-Stake, PoS)共识机制。其独特的技术架构赋予了它多项核心优势:
INJ是Injective生态系统的原生功能型代币,扮演着至关重要的角色:
Injective的生态系统正在快速扩张,吸引了众多开发者和项目在其上构建应用。其生态版图涵盖了DeFi、NFT、游戏金融(GameFi)和现实世界资产(RWA)等多个领域。
主要生态项目包括:
随着“Volan”等重大主网升级的推出,Injective正不断提升其网络性能、互操作性和对现实世界资产(RWA)的支持,致力于成为Web3世界中不可或缺的金融基础设施层。
injectived - Injective 区块链进行直接交互的 CLI 工具
mcd Injective
git clone git@github.com:InjectiveFoundation/injective-core.git
cd injective-core
make installinjectived version
Version v1.16.0 (daf90f4)
Compiled at 20250725-0726 using Go go1.24.5 (arm64)injectived -h
Injective Daemon
Usage:
  injectived [command]
Available Commands:
  add-genesis-account Add a genesis account to genesis.json
  bootstrap-devnet    Bootstrap Devnet state from existing state. To invoke this on new binary version, provide --trigger-devnet-upgrade flag. Custom overrides are provided via --custom-overrides in YAML format.
  comet               CometBFT subcommands
  completion          Generate the autocompletion script for the specified shell
  config              Utilities for managing application configuration
  debug               Tool for helping with debugging your application
  export              Export state to JSON
  genesis             Application's genesis-related subcommands
  help                Help about any command
  init                Initialize private validator, p2p, genesis, and application configuration files
  keys                Manage your application's keys
  prune               Prune app history states by keeping the recent heights and deleting old heights
  query               Querying subcommands
  rollback            rollback Cosmos SDK and CometBFT state by one height
  snapshots           Manage local snapshots
  start               Run the full node
  status              Query remote node for status
  tx                  Transactions subcommands
  version             Print the application binary version information
Flags:
  -h, --help                help for injectived
      --home string         directory for config and data (default "/Users/qiaopengjun/.injectived")
      --log-color           Enable log output coloring (default true)
      --log-format string   The logging format (json|plain) (default "plain")
      --log-level string    The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
      --trace               print out full stack trace on errors
Use "injectived [command] --help" for more information about a command.https://docs.injective.network/developers/network-information
injectived config set client node https://testnet.sentry.tm.injective.network:443
injectived config set client chain-id injective-888
injectived config get client node
"https://testnet.sentry.tm.injective.network:443"
injectived config get client chain-id
"injective-888"injectived keys add mykey
Enter keyring passphrase (attempt 1/3):
password must be at least 8 characters
Enter keyring passphrase (attempt 2/3):
password must be at least 8 characters
Enter keyring passphrase (attempt 3/3):
Re-enter keyring passphrase:
- address: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  name: mykey
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"Ao5ZUWUYYbMqmJbhIRBJwLtlCUsxTWiAsRAudvhMZ+4b"}'
  type: local
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
worry maximum security reduce train detail observe chase swift rubber comfort toast meat phone mercy pair upper ginger coyote siege modify spider infant cluster
这个交互过程是在 Injective 区块链上使用 injectived 命令行工具创建一个新的加密钱包密钥对。让我逐步解释:
injectived keys add mykey
injectived 是 Injective 区块链的节点软件inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j (Injective区块链地址)worry worry worry reduce worry worry worry chase worry rubber worry toast worry worry worry worry upper worry worry worry worry spider worry worry安全注意事项:
这个密钥可以用于与Injective区块链交互,如发送交易、质押代币等操作。
接下来,我们可以使用 injectived keys list 命令来列出所有本地存储的钱包。执行后,输出会显示每个钱包的名称、地址和公钥等信息...
injectived keys list
Enter keyring passphrase (attempt 1/3):
- address: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  name: mykey
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"Ao5ZUWUYYbMqmJbhIRBJwLtlCUsxTWiAsRAudvhMZ+4b"}'
  type: local
从你的输出来看,目前只有一个名为 mykey 的密钥对。
address: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
name: mykey
pubkey:
ethsecp256k1 椭圆曲线加密(与以太坊相同)。{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"Ao5ZUWUYYbMqmJbhIRBJwLtlCUsxTWiAsRAudvhMZ+4b"}key 是 Base64 编码的公钥。type: local
~/.injectived/keyring-file/)。injectived query bank balances inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
balances: []
pagination: {}https://testnet.faucet.injective.network/
injectived query bank balances inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
balances:
- amount: "1000000000000000000"
  denom: inj
- amount: "10000000"
  denom: peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5
pagination:
  total: "2"https://chainlist.org/?search=injective&testnets=true
https://docs.injective.network/developers/network-information
injectived keys add alice --home ~/.injective
Enter keyring passphrase (attempt 1/3):
Re-enter keyring passphrase:
- address: inj1smp73gj5afscqe40lqqc8s5hq73su3tzy94ycj
  name: alice
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"A7/xUnEV1+8OcU6ymzs82Q/6T9wd++l7KXyOAQqxbrx1"}'
  type: local
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
dinner dinner dinner dinner dinner phdinnerysical range dinner dinner dinner dinner dinner dinner dinner dinner dinner dinner dinner dinner elbow pair dinner gym dinner
injectived keys list
Enter keyring passphrase (attempt 1/3):
- address: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  name: mykey
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"Ao5ZUWUYYbMqmJbhIRBJwLtlCUsxTWiAsRAudvhMZ+4b"}'
  type: local
injectived keys list --home ~/.injective
Enter keyring passphrase (attempt 1/3):
- address: inj1smp73gj5afscqe40lqqc8s5hq73su3tzy94ycj
  name: alice
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"A7/xUnEV1+8OcU6ymzs82Q/6T9wd++l7KXyOAQqxbrx1"}'
  type: local
我们来试着在 Injective 测试网上从 mykey 向 Alice 发送 1000 inj。
injectived tx bank send mykey inj1smp73gj5afscqe40lqqc8s5hq73su3tzy94ycj 1000inj --from mykey --node https://testnet.sentry.tm.injective.network:443 --chain-id injective-888 --gas-prices 500000000inj
Enter keyring passphrase (attempt 1/3):
auth_info:
  fee:
    amount:
    - amount: "100000000000000"
      denom: inj
    gas_limit: "200000"
    granter: ""
    payer: ""
  signer_infos: []
  tip: null
body:
  extension_options: []
  memo: ""
  messages:
  - '@type': /cosmos.bank.v1beta1.MsgSend
    amount:
    - amount: "1000"
      denom: inj
    from_address: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
    to_address: inj1smp73gj5afscqe40lqqc8s5hq73su3tzy94ycj
  non_critical_extension_options: []
  timeout_height: "0"
signatures: []
confirm transaction before signing and broadcasting [y/N]: y
code: 0
codespace: ""
data: ""
events: []
gas_used: "0"
gas_wanted: "0"
height: "0"
info: ""
logs: []
raw_log: ""
timestamp: ""
tx: null
txhash: 262F6E3F84DC22B9C31A6BB63917E9C74AD7DCA49D3A0B0FD20A0DA51979EB0A当交易完成后,终端会返回一个 txhash。可以用它来查询交易状态:
injectived query tx 262F6E3F84DC22B9C31A6BB63917E9C74AD7DCA49D3A0B0FD20A0DA51979EB0A
code: 0
codespace: ""
data: 12260A242F636F736D6F732E62616E6B2E763162657461312E4D736753656E64526573706F6E7365
events:
- attributes:
  - index: true
    key: spender
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  - index: true
    key: amount
    value: 100000000000000inj
  type: coin_spent
- attributes:
  - index: true
    key: receiver
    value: inj17xpfvakm2amg962yls6f84z3kell8c5l6s5ye9
  - index: true
    key: amount
    value: 100000000000000inj
  type: coin_received
- attributes:
  - index: true
    key: recipient
    value: inj17xpfvakm2amg962yls6f84z3kell8c5l6s5ye9
  - index: true
    key: sender
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  - index: true
    key: amount
    value: 100000000000000inj
  type: transfer
- attributes:
  - index: true
    key: sender
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  type: message
- attributes:
  - index: true
    key: fee
    value: 100000000000000inj
  - index: true
    key: fee_payer
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  type: tx
- attributes:
  - index: true
    key: acc_seq
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j/0
  type: tx
- attributes:
  - index: true
    key: signature
    value: FT8IdpNMD7WgTm/DR05qQ3fjnoYEu81h8NG9hhlgpic6crDkzYHqzW/bimutQT3GihvcolN30zmWoxvm/9FrgwA=
  type: tx
- attributes:
  - index: true
    key: action
    value: /cosmos.bank.v1beta1.MsgSend
  - index: true
    key: sender
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  - index: true
    key: module
    value: bank
  - index: true
    key: msg_index
    value: "0"
  type: message
- attributes:
  - index: true
    key: spender
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  - index: true
    key: amount
    value: 1000inj
  - index: true
    key: msg_index
    value: "0"
  type: coin_spent
- attributes:
  - index: true
    key: receiver
    value: inj1smp73gj5afscqe40lqqc8s5hq73su3tzy94ycj
  - index: true
    key: amount
    value: 1000inj
  - index: true
    key: msg_index
    value: "0"
  type: coin_received
- attributes:
  - index: true
    key: recipient
    value: inj1smp73gj5afscqe40lqqc8s5hq73su3tzy94ycj
  - index: true
    key: sender
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  - index: true
    key: amount
    value: 1000inj
  - index: true
    key: msg_index
    value: "0"
  type: transfer
- attributes:
  - index: true
    key: sender
    value: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
  - index: true
    key: msg_index
    value: "0"
  type: message
gas_used: "141580"
gas_wanted: "200000"
height: "85776734"
info: ""
logs: []
raw_log: ""
timestamp: "2025-07-26T02:29:02Z"
tx:
  '@type': /cosmos.tx.v1beta1.Tx
  auth_info:
    fee:
      amount:
      - amount: "100000000000000"
        denom: inj
      gas_limit: "200000"
      granter: ""
      payer: ""
    signer_infos:
    - mode_info:
        single:
          mode: SIGN_MODE_DIRECT
      public_key:
        '@type': /injective.crypto.v1beta1.ethsecp256k1.PubKey
        key: Ao5ZUWUYYbMqmJbhIRBJwLtlCUsxTWiAsRAudvhMZ+4b
      sequence: "0"
    tip: null
  body:
    extension_options: []
    memo: ""
    messages:
    - '@type': /cosmos.bank.v1beta1.MsgSend
      amount:
      - amount: "1000"
        denom: inj
      from_address: inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
      to_address: inj1smp73gj5afscqe40lqqc8s5hq73su3tzy94ycj
    non_critical_extension_options: []
    timeout_height: "0"
  signatures:
  - FT8IdpNMD7WgTm/DR05qQ3fjnoYEu81h8NG9hhlgpic6crDkzYHqzW/bimutQT3GihvcolN30zmWoxvm/9FrgwA=
txhash: 262F6E3F84DC22B9C31A6BB63917E9C74AD7DCA49D3A0B0FD20A0DA51979EB0Amykey 余额injectived query bank balances inj1mnqr8wq5enhnege39kfs2ecpvhl9xfn4h5lg8j
balances:
- amount: "999899999999999000"
  denom: inj
- amount: "10000000"
  denom: peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5
pagination:
  total: "2"Alice 余额injectived query bank balances inj1smp73gj5afscqe40lqqc8s5hq73su3tzy94ycj
balances:
- amount: "1000"
  denom: inj
pagination:
  total: "1"多签钱包(Multisig Wallet)是需要多个私钥共同签名才能完成交易的钱包,增强安全性和团队资金管理。
bob 钱包injectived keys add bob
Enter keyring passphrase (attempt 1/3):
- address: inj1mu80tq6xg69xlzf0clxrc0zawpm46azapqwsks
  name: bob
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"A4F4zNAfWbXuJzOStCLbjGqDmKKNwutQHI5l4nhEp949"}'
  type: local
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
come ... ocean # 24 个助记词
carol钱包injectived keys add carol
Enter keyring passphrase (attempt 1/3):
- address: inj12yh6ax3hzzsdtea60wwtz5d562qfwxe6uc2kll
  name: carol
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"Au18OuGGFpT4ggT9h6FKzJ5GdmyEVdq6vIJV7kTtWfuy"}'
  type: local
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
analyst ... depend
injectived keys list
Enter keyring passphrase (attempt 1/3):
- address: inj1mu80tq6xg69xlzf0clxrc0zawpm46azapqwsks
  name: bob
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"A4F4zNAfWbXuJzOStCLbjGqDmKKNwutQHI5l4nhEp949"}'
  type: local
- address: inj12yh6ax3hzzsdtea60wwtz5d562qfwxe6uc2kll
  name: carol
  pubkey: '{"@type":"/injective.crypto.v1beta1.ethsecp256k1.PubKey","key":"Au18OuGGFpT4ggT9h6FKzJ5GdmyEVdq6vIJV7kTtWfuy"}'
  type: local
- address: inj1mnqr8wq5enhnege3... 
                如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!