wallet

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuyRoll           = "Buy Roll"
	SellRoll          = "Sell Roll"
	Message           = "Plain Text"
	TransactionOpType = uint64(0)
	BuyRollOpType     = uint64(1)
	SellRollOpType    = uint64(2)
	ExecuteSCOpType   = uint64(3)
	CallSCOpType      = uint64(4)
)

Variables

This section is empty.

Functions

func AppendEndpoints

func AppendEndpoints(api *operations.MassaWalletAPI, prompterApp prompt.WalletPrompterInterface, massaClient network.NodeFetcherInterface, AssetsStore *assets.AssetsStore, gc gcache.Cache)

AppendEndpoints appends wallet endpoints to the API Note: the password prompter is mandatory for sign endpoint

func CacheKey

func CacheKey(correlationId models.CorrelationID) [32]byte

func HandleExportFile

func HandleExportFile(params operations.ExportAccountFileParams) middleware.Responder

HandleExportFile handles a export file request It will serve the yaml file so that the client can download it.

func NewAddAsset added in v0.2.1

func NewAddAsset(AssetsStore *assets.AssetsStore, massaClient network.NodeFetcherInterface) operations.AddAssetHandler

func NewDeleteAsset added in v0.2.1

func NewDeleteAsset(AssetsStore *assets.AssetsStore) operations.DeleteAssetHandler

func NewGet

NewGet instantiates a Get Handler The "classical" way is not possible because we need to pass to the handler a wallet.WalletPrompterInterface.

func NewGetAllAssets added in v0.2.1

func NewGetAllAssets(AssetsStore *assets.AssetsStore, massaClient network.NodeFetcherInterface) operations.GetAllAssetsHandler

func NewSign

NewSign instantiates a sign Handler The "classical" way is not possible because we need to pass to the handler a password.PasswordAsker.

Types

type AssetInfoListResponse added in v0.2.1

type AssetInfoListResponse struct {
	Assets []models.AssetInfo `json:"assets"`
}

type KeyPair added in v0.1.5

type KeyPair struct {
	PrivateKey string `json:"privateKey"`
	PublicKey  string `json:"publicKey"`
}

KeyPair represents a pair of private and public keys.

type PromptRequestDeleteData

type PromptRequestDeleteData struct {
	Nickname string
	Balance  string
}

type PromptRequestSignData added in v0.2.2

type PromptRequestSignData struct {
	Description      string
	OperationType    string
	OperationID      uint64
	GasLimit         uint64
	Coins            uint64
	Address          string
	Function         string
	MaxCoins         uint64
	MaxGas           uint64
	WalletAddress    string
	RollCount        uint64
	RecipientAddress string
	Amount           uint64
	PlainText        string
}

type PromptRequestTransferData

type PromptRequestTransferData struct {
	NicknameFrom     string
	Amount           string
	Fee              string
	RecipientAddress string
}

type PromptRequestUpdateAccountData

type PromptRequestUpdateAccountData struct {
	Nickname string
	Balance  string
}

Jump to

Keyboard shortcuts

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