github.com/quantosnetwork/Quantos@v0.0.0-20220306172517-e20b28c5a29a/address/manager.go (about)

     1  package address
     2  
     3  import (
     4  	"context"
     5  	"github.com/holiman/uint256"
     6  	"github.com/quantosnetwork/Quantos/uint512"
     7  )
     8  
     9  type addressManager interface {
    10  	New(args ...interface{}) *Address
    11  	SetContext(ctx context.Context, aCtx AddressContext)
    12  	ToUint512() *uint512.Int
    13  	FromUint512() *uint512.Address
    14  	ValidateAddress() bool
    15  	Sign() error
    16  	VerifySignature() error
    17  	NewMaster() *Address
    18  	Derive(aCtx AddressContext) *Address
    19  	FromPublicKey() *Address
    20  	AuthorizeUsage(secret string) bool
    21  	GetBalance() uint256.Int
    22  }
    23  
    24  type contextManager interface {
    25  	New(ctx context.Context, args ...interface{}) *AddressContext
    26  	DecodeFromAddress(addr *Address) *AddressContext
    27  	EncodeWithSecret(addr *Address, secret string)
    28  }