GithubHelp home page GithubHelp logo

ifishnet / venus-wallet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from filecoin-project/venus-wallet

0.0 0.0 0.0 592 KB

a remote wallet for provider sign service

Home Page: https://venus.filecoin.io/Home.html

License: MIT License

Shell 0.40% Go 98.80% Makefile 0.80%

venus-wallet's Introduction

Venus-wallet

Go Report Card Go

  • A remote wallet for Filecoin and supports JsonRPC2.0 call.
  • The project is decoupled from Lotus and Venus independently, and can be called by different implementations of Filecoin.
  • It can dynamically configure strategy to limit the signature rules of the Wallet group.
  • Through the configuration of signature strategy, it can achieve environmental isolation of different wallet groups

Use Venus Issues for reporting issues about this repository.


Get Started

1. Build

export CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__"
export CGO_CFLAGS="-D__BLST_PORTABLE__"

make 
  • If the test or target application crashes with an "illegal instruction" exception [after copying to an older system], rebuild with CGO_CFLAGS environment variable set to -O -D__BLST_PORTABLE__. Don't forget -O!

2. Setup

# start daemon
$ ./venus-wallet run

# set password to protect wallet security (Used for AES encryption, private key, root token seed)
$ ./venus-wallet set-password
Password:******
Enter Password again:******

3. Get remote connect string

JWT Token restricts access to RPC interface calls

# --perm 
# "read","write","sign","admin" 
./venus-wallet auth api-info --perm admin

4. Get strategy token

  • Strategy token restricts the authority of business execution
  • How to generate strategy token for remote service Venus wallet cli
  • URL append strategy token <JWT token>:/ip4/0.0.0.0/tcp/5678/http:<Strategy token>

Once we have a connection string, we can connect to the remote wallet through it.



Config

[API]
ListenAddress = "/ip4/0.0.0.0/tcp/5678/http"

[DB]
Conn = "[homePath]/keystore.sqlit"
Type = "sqlite"
DebugMode = true

[Factor]
# aes variable
ScryptN = 262144
ScryptP = 1

[JWT]
#  hex JWT token, generate by secret
Token = "" 
# hex JWT secret, randam generate first init
Secret = ""

[Strategy]
# strategy level
# 0:nouse  1:only check struct  2:check struct and msg.method
Level = 2
# need config when Level = 2 and get the actor for msg.to
NodeURL = "/ip4/127.0.0.1/tcp/2345/http"

Package concept

+-- api // RPC service interface permission setting
|
+-- build // dependency injection
|
+-- cli  // shell cmd
|
+-- cmd  // service startup entry
|
+-- config // config provider
|
+-- core // constant 
|
+-- crypto // private key 
|
+-- filemgr // local file manager, Ps:config,database
|
+-- log // log set
|
+-- middeleware // middleware such as link tracking, data reporting
|
+-- signature // signature verification
|
+-- sotrage // the wallet keystore implementation
|
+-- version // git version by ldflags

venus-wallet's People

Contributors

rennbon avatar zl03jsj avatar simlecode avatar hunjixin avatar linzexiao avatar diwufeiwen avatar x448 avatar fatman13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.