wallet

package
v0.0.0-...-be0f657 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	WalletNew(context.Context, string) (address.Address, error)
	WalletBalance(context.Context, address.Address) (types.BigInt, error)
}

API interacts with a Filecoin full-node

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module exposes the filecoin wallet api.

func New

func New(api API) *Module

New creates a new wallet module

func (*Module) NewWallet

func (m *Module) NewWallet(ctx context.Context, typ string) (string, error)

NewWallet creates a new wallet

func (*Module) WalletBalance

func (m *Module) WalletBalance(ctx context.Context, addr string) (types.BigInt, error)

WalletBalance returns the balance of the specified wallet

type Service

type Service struct {
	pb.UnimplementedAPIServer

	Module *Module
}

Service implements the gprc service

func NewService

func NewService(m *Module) *Service

NewService creates a new Service

func (*Service) NewWallet

func (s *Service) NewWallet(ctx context.Context, req *pb.NewWalletRequest) (*pb.NewWalletReply, error)

NewWallet creates a new wallet

func (*Service) WalletBalance

func (s *Service) WalletBalance(ctx context.Context, req *pb.WalletBalanceRequest) (*pb.WalletBalanceReply, error)

WalletBalance checks a wallet balance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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