utils

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Account

func Account() (*crypto.Account, error)

Account returns account from mnemonic or base64 private key from os environments

func Clients

func Clients(userAddress string) (*algod.Client, *tinyman.Client, error)

Clients returns Algorand and Tinyman clients

func CreateAsset

func CreateAsset(
	assetName,
	unitName string,
	decimals uint32,
	totalIssuance uint64,
	userAddress string,
	account *crypto.Account,
	ac *algod.Client,
	tc *tinyman.Client,
) (uint64, error)

CreateAsset create a new asset

func OptInAppIfNeeded

func OptInAppIfNeeded(ctx context.Context, tinymanCli *tinyman.Client, account *crypto.Account) error

OptInAppIfNeeded lets a user address opt in application if needed

func OptInAssetIfNeeded

func OptInAssetIfNeeded(ctx context.Context, tc *tinyman.Client, account *crypto.Account, assetID uint64) error

OptInAssetIfNeeded lets a user address opt in an asset if needed

Types

This section is empty.

Jump to

Keyboard shortcuts

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