fil-wallet

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

fil-wallet

Warn⚠️: Please save the mnemonic, don't tell anyone, do not upload it to any platform, leaking the mnemonic will cause property damage. This wallet will not save anything, any line of code is under your own control! When using, please ensure that the computer environment is safe!

警告⚠️:请保存助记词,不要告诉任何人,不要上传到任何平台,泄露助记词会造成财产损失。这个钱包不会保存任何东西,任何一行代码都在你自己的控制之下!使用时,请保证电脑环境安全!

Note⚠️: This open source wallet is free. It also takes no responsibility. Please use it correctly.

注意⚠️:这个开源钱包是免费的。它也不承担任何责任。请正确使用。

FIL hd wallet
  • A hd wallet tool that only needs node url, no need to run a daemon
Already supported:
  • wallet:

    • create a mnemonic
    • create wallet
    • export wallet
    • offline signature
    • signature verification
    • balance inquiry
    • transfer amount
    • send transactions
    • multisig transaction
  • tool:

    • encode params
    • decode params
TODO
  • will support fvm calls (in the future)
use
  • build and edit config.yaml

    • make all
    • cp conf/config.yaml.example conf/config.yaml
    • run ./fil-wallet -h
  • Generate mnemonic

    ./fil-wallet wallet mnemonic
    一定保存好助记词,丢失助记词将导致所有财产损失!
    Be sure to save mnemonic. Losing mnemonic will cause all property damage!
    
    easily ... ... ... script
    
  • Generate a wallet

    ./fil-wallet wallet generate --index 1 --type bls
    2022-03-23T20:31:33.924+0800    INFO    wallet  cmd/wallet.go:121       wallet info     {"type": "bls", "index": 1, "path": "m/44'/461'/0'/0/1"}
    f3xxx
    ./fil-wallet wallet generate --index 1 --type secp256k1  
    2022-03-23T20:31:50.479+0800    INFO    wallet  cmd/wallet.go:121       wallet info     {"type": "secp256k1", "index": 1, "path": "m/44'/461'/0'/0/1"}
    f1xxx
    
  • transfer amount

    ./fil-wallet wallet transfer --from f1xxxx1 --index 1 --gas-premium 11199999 --gas-feecap 11199999 --gas-limit 700000 --nonce 1 --to f1xxxx2 --amount 1
    
    
  • balance inquiry

    ./fil-wallet wallet balance f1xxxx
    
  • encode params

    ./fil-wallet chain encode params --encoding=hex t01000 23 \"t01001\"
    4300e907
    
  • decode params

    ./fil-wallet chain decode params --encoding=hex t01000 23 4300e907  
    "f01001"
    
  • offline signature

    ./fil-wallet wallet sign  --index 1 f1em73zadvtid6kvjp22xxb4zbv7srv6uu3whbqvq 4300e907
    2022-04-08T23:35:45.955+0800    INFO    wallet  wallet/account.go:41    wallet info     {"type": "secp256k1", "index": 1, "path": "m/44'/461'/0'/0/1"}
    0159b47df039b230176587f34760466e050c6266c67e97531dde79425e998d95723ada4c816606141304a2b1e3953507597b3b86f8b81262bfba3b61d1a84292d100
    
  • signature verification

    ./fil-wallet wallet verify --index 1 f1em73zadvtid6kvjp22xxb4zbv7srv6uu3whbqvq 4300e907 0159b47df039b230176587f3476046
    6e050c6266c67e97531dde79425e998d95723ada4c816606141304a2b1e3953507597b3b86f8b81262bfba3b61d1a84292d100
    2022-04-08T23:38:20.917+0800    INFO    wallet  wallet/account.go:41    wallet info     {"type": "secp256k1", "index": 1, "path": "m/44'/461'/0'/0/1"}
    valid signature
    
  • msig

    • msig transfer
    ./fil-wallet wallet msig --index 0 create --required 3 --from f1xxx0 f1xxx1 f1xxx2 f1xxx3 f1xxx4 f1xxx5
    ./fil-wallet wallet msig --index 1 transfer-propose --from f1xxx1 f2xxx f1xxx 0.05
    ./fil-wallet wallet msig --index 2 transfer-approve --from f1xxx2 f2xxx 1
    

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL