Documentation
¶
Index ¶
- func BigFloatDiv(x *big.Float, y *big.Float) *big.Float
- func BigIntAdd(x *big.Int, y *big.Int) *big.Int
- func BigIntDiv(x *big.Int, y *big.Int) *big.Int
- func BigIntMul(x *big.Int, y *big.Int) *big.Int
- func BigIntSqrt(x *big.Int) *big.Int
- func BigIntSub(x *big.Int, y *big.Int) *big.Int
- func EncodeValue(value any, valueType string) ([]byte, error)
- func EncodeVarInt(number uint64) []byte
- func ExcessAssetStateKey(poolAddress string, assetID uint64) ([]byte, error)
- func IntToBytes(n uint64) ([]byte, error)
- func OutstandingAssetStateKey(assetID uint64) ([]byte, error)
- func Program(definition ttypes.Logic, variables map[string]uint64) ([]byte, error)
- func StateBytes(state map[string]models.TealValue, key string) []byte
- func StateInt(state map[string]models.TealValue, key string) uint64
- func ToBigFloat(v uint64) *big.Float
- func ToBigUint(v uint64) *big.Int
- type TransactionGroup
- func (tg *TransactionGroup) SetSignedTransactions(index int, signedTx []byte) error
- func (tg *TransactionGroup) Sign(acc *crypto.Account) error
- func (tg *TransactionGroup) SignWithLogicSig(account *crypto.LogicSigAccount) error
- func (tg *TransactionGroup) SignWithPrivateKey(address string, sk ed25519.PrivateKey) error
- func (tg *TransactionGroup) SignedTransactions() [][]byte
- func (tg *TransactionGroup) Submit(ctx context.Context, client *algod.Client, wait bool) (string, error)
- func (tg *TransactionGroup) Transactions() []types.Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BigFloatDiv ¶
BigFloatDiv divides 2 big floats
func EncodeValue ¶
EncodeVarInt encodes value to be used in program
func EncodeVarInt ¶
EncodeVarInt encodes 64-bit unsigned integer value
func ExcessAssetStateKey ¶
ExcessAssetStateKey returns an excess key of the given asset id
func OutstandingAssetStateKey ¶
OutstandingAssetStateKey returns an outstanding key of the given asset id
func StateBytes ¶
StateBytes returns bytes field from ApplicationLocalState local key-value mapping
func StateInt ¶
StateInt returns unsigned int field from ApplicationLocalState local key-value mapping
func ToBigFloat ¶
ToBigFloat converts an unsigned 64-bit integer to big float
Types ¶
type TransactionGroup ¶
type TransactionGroup struct {
// contains filtered or unexported fields
}
TransactionGroup is a group of transaction that can be executed atomically after signing
func NewTransactionGroup ¶
func NewTransactionGroup(txs []types.Transaction) (*TransactionGroup, error)
NewTransactionGroup creates a new transaction group
func (*TransactionGroup) SetSignedTransactions ¶
func (tg *TransactionGroup) SetSignedTransactions(index int, signedTx []byte) error
SetSignedTransactions sets a signed transaction at a given index
func (*TransactionGroup) Sign ¶
func (tg *TransactionGroup) Sign(acc *crypto.Account) error
Sign signs a transaction group with an account
func (*TransactionGroup) SignWithLogicSig ¶
func (tg *TransactionGroup) SignWithLogicSig(account *crypto.LogicSigAccount) error
SignWithLogicSig signs a transaction group with logic sig account
func (*TransactionGroup) SignWithPrivateKey ¶
func (tg *TransactionGroup) SignWithPrivateKey(address string, sk ed25519.PrivateKey) error
SignWithPrivateKey signs a transaction group with a given private key if a given address matches
func (*TransactionGroup) SignedTransactions ¶
func (tg *TransactionGroup) SignedTransactions() [][]byte
SignedTransactions returns signed transactions inside the transaction group
func (*TransactionGroup) Submit ¶
func (tg *TransactionGroup) Submit(ctx context.Context, client *algod.Client, wait bool) (string, error)
Submit sends a signed transaction groups to the blockchain
func (*TransactionGroup) Transactions ¶
func (tg *TransactionGroup) Transactions() []types.Transaction
Transactions returns transactions inside the transaction group