prompt

package
v1.20.5 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const AlreadyInstalled = 2
View Source
const CancelInstall = 1

Variables

This section is empty.

Functions

func AccountNamePrompt

func AccountNamePrompt(accountNames []string) string

func AddressPromptOrEmpty

func AddressPromptOrEmpty(label, errorMessage string) string

func ApproveTransactionForBuildingPrompt

func ApproveTransactionForBuildingPrompt(transaction *flow.Transaction) bool

func ApproveTransactionForSendingPrompt

func ApproveTransactionForSendingPrompt(transaction *flow.Transaction) bool

func ApproveTransactionForSigningPrompt

func ApproveTransactionForSigningPrompt(transaction *flow.Transaction) bool

func ApproveTransactionPrompt

func ApproveTransactionPrompt(tx *flow.Transaction, promptMsg string) bool

func AutocompletionPrompt

func AutocompletionPrompt() (string, string)

func CreateAccountNetworkPrompt

func CreateAccountNetworkPrompt() (string, config.Network)

func GenericBoolPrompt

func GenericBoolPrompt(msg string) bool

func GenericSelect

func GenericSelect(items []string, message string) string

func InstallPathPrompt

func InstallPathPrompt(defaultPath string) string

func InstallPrompt

func InstallPrompt() int

func NamePrompt

func NamePrompt() string

func NewNetworkPrompt

func NewNetworkPrompt() map[string]string

func RemoveAccountPrompt

func RemoveAccountPrompt(accounts config.Accounts) string

func RemoveContractFromFlowJSONPrompt

func RemoveContractFromFlowJSONPrompt(contractName string) bool

func RemoveContractPrompt

func RemoveContractPrompt(contracts config.Contracts) string

func RemoveDeploymentPrompt

func RemoveDeploymentPrompt(deployments config.Deployments) (account string, network string)

func RemoveNetworkPrompt

func RemoveNetworkPrompt(networks config.Networks) string

func ReportCrash

func ReportCrash() bool

func RunSelectOptions

func RunSelectOptions(options []string, message string) ([]string, error)

RunSelectOptions remains public and is the interface for external usage.

func RunTextInput

func RunTextInput(customMsg, placeholder string) (string, error)

RunTextInput remains public. It's the entry point for external usage.

func ScaffoldPrompt

func ScaffoldPrompt(logger output.Logger, scaffoldItems []ScaffoldItem) int

func ShowContractDiffPrompt

func ShowContractDiffPrompt(logger output.Logger) func([]byte, []byte) bool

ShowContractDiffPrompt shows a diff between the new contract and the existing contract and asks the user if they wish to continue with the deployment returns true if the user wishes to continue with the deployment and false otherwise

func WantToUseMainnetVersionPrompt

func WantToUseMainnetVersionPrompt() bool

Types

type AccountData

type AccountData struct {
	Name     string
	Address  string
	SigAlgo  string
	HashAlgo string
	Key      string
	KeyIndex string
}

func NewAccountPrompt

func NewAccountPrompt() *AccountData

type ContractData

type ContractData struct {
	Name     string
	Source   string
	Emulator string
	Testnet  string
	Mainnet  string
}

func NewContractPrompt

func NewContractPrompt() *ContractData

type DeploymentData

type DeploymentData struct {
	Network   string
	Account   string
	Contracts []string
}

func AddContractToDeploymentPrompt

func AddContractToDeploymentPrompt(networkName string, accounts accounts.Accounts, contractName string) *DeploymentData

AddContractToDeploymentPrompt prompts a user to select an account to deploy a given contract on a given network

func NewDeploymentPrompt

func NewDeploymentPrompt(
	networks config.Networks,
	accounts config.Accounts,
	contracts config.Contracts,
) *DeploymentData

type ScaffoldItem

type ScaffoldItem struct {
	Index    int
	Title    string
	Category string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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