operations

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conts

type Conts struct {
	Contents []block.Contents `json:"contents"`
	Branch   string           `json:"branch"`
}

Conts is helper structure to build out the contents of a a transfer operation to post to the Tezos RPC

type OperationService

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

OperationService is a struct wrapper for operation related functions

func NewOperationService

func NewOperationService(blockService block.TezosBlockService, tzclient tzc.TezosClient) *OperationService

NewOperationService returns a New Operation Service

func (*OperationService) CreateBatchPayment

func (o *OperationService) CreateBatchPayment(payments []delegate.Payment, wallet account.Wallet, paymentFee int, gasLimit int, batchSize int) ([]string, error)

CreateBatchPayment forges batch payments and returns them ready to inject to a Tezos RPC. PaymentFee must be expressed in mutez and the max batch size allowed is 200.

func (*OperationService) GetBlockOperationHashes

func (o *OperationService) GetBlockOperationHashes(id interface{}) ([]string, error)

GetBlockOperationHashes returns list of operations in block at specific level

func (*OperationService) InjectOperation

func (o *OperationService) InjectOperation(op string) ([]byte, error)

InjectOperation injects an signed operation string and returns the response

type TezosOperationsService

type TezosOperationsService interface {
	CreateBatchPayment(payments []delegate.Payment, wallet account.Wallet, paymentFee int, gaslimit int, batchSize int) ([]string, error)
	InjectOperation(op string) ([]byte, error)
	GetBlockOperationHashes(id interface{}) ([]string, error)
}

type Transfer

type Transfer struct {
	Conts
	Protocol  string `json:"protocol"`
	Signature string `json:"signature"`
}

Transfer a complete transfer request

Jump to

Keyboard shortcuts

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