utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeValue

func EncodeValue(value int, valueType string) (buf []byte, err error)

func EncodeVarint

func EncodeVarint(number int) (buf []byte)

func GetProgram

func GetProgram(definition types.Logic, variables map[string]int) (templateBytes []byte, err error)

not compatible with go-mobile

func GetStateBytes

func GetStateBytes(state map[string]models.TealValue, key interface{}) string

not compatible with go-mobile

func GetStateInt

func GetStateInt(state map[string]models.TealValue, key interface{}) int

not compatible with go-mobile

func IntToBytes

func IntToBytes(num int) []byte

func SignAndSubmitTransactions

func SignAndSubmitTransactions(client *algod.Client, transactions []algoTypes.Transaction, signedTransactions [][]byte, sender algoTypes.Address, senderSK ed25519.PrivateKey) (trxInfo *types.TrxInfo, err error)

not compatible with go-mobile

func WaitForConfirmation

func WaitForConfirmation(client *algod.Client, txid string) (trxInfo *types.TrxInfo, err error)

Utility function to wait until the transaction is confirmed before proceeding.

Types

type TransactionGroup

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

func NewTransactionGroup

func NewTransactionGroup(transactions []algoTypes.Transaction) (transactionGroup *TransactionGroup, err error)

not compatible with go-mobile

func (*TransactionGroup) GetSignedGroup

func (s *TransactionGroup) GetSignedGroup() (signedGroup []byte)

func (*TransactionGroup) GetSignedTransactions

func (s *TransactionGroup) GetSignedTransactions() [][]byte

not compatible with go-mobile

func (*TransactionGroup) GetTransactions

func (s *TransactionGroup) GetTransactions() []algoTypes.Transaction

not compatible with go-mobile

func (*TransactionGroup) SignWithLogicsig

func (s *TransactionGroup) SignWithLogicsig(logicsig *types.LogicSig) (err error)

func (*TransactionGroup) SignWithPrivateKey

func (s *TransactionGroup) SignWithPrivateKey(address string, privateKey string) (err error)

func (*TransactionGroup) Sumbit

func (s *TransactionGroup) Sumbit(algod *algod.Client, wait bool) (trxInfo *types.TrxInfo, err error)

not compatible with go-mobile

Jump to

Keyboard shortcuts

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