Coder Social home page Coder Social logo

filecoin-project / venus-wallet Goto Github PK

View Code? Open in Web Editor NEW
18.0 7.0 23.0 1.02 MB

a remote wallet for provider sign service

Home Page: https://sophon.venus-fil.io/operation/

License: MIT License

Makefile 1.40% Go 98.05% Shell 0.55%
filecoin wallet venus-wallet

venus-wallet's Introduction

Venus Wallet


  • 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.


How to access remote wallet


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 = ""

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

0x5459 avatar aloxaf avatar dependabot[bot] avatar diwufeiwen avatar elvin-du avatar fatman13 avatar hunjixin avatar linzexiao avatar rennbon avatar simlecode avatar x448 avatar zl03jsj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.