Documentation
¶
Index ¶
- func WaitForSeal(ctx context.Context, c *client.Client, id flow.Identifier) *flow.TransactionResult
- type Account
- type Flow
- type FlowConfig
- func (f *FlowConfig) CreateAccount(accountName string)
- func (f *FlowConfig) DeployContract(contractName string)
- func (f *FlowConfig) FindAddress(key string) cadence.Address
- func (f *FlowConfig) GetAccount(name string) *flow.Account
- func (f *FlowConfig) RunScript(filename string, arguments ...cadence.Value)
- func (f *FlowConfig) RunScriptReturns(filename string, arguments ...cadence.Value) cadence.Value
- func (f *FlowConfig) SendTransaction(filename string, signerAccountNames ...string)
- func (f *FlowConfig) SendTransactionWithArguments(filename string, signer string, arguments ...cadence.Value)
- func (f *FlowConfig) SendTransactionWithMultipleSignersAndArguments(filename string, signers []string, arguments ...cadence.Value)
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { Address string `json:"address"` PrivateKey string `json:"privateKey"` SigAlgo string `json:"sigAlgorithm"` HashAlgo string `json:"hashAlgorithm"` }
Account represents a Flow account
func NewFlowAccount ¶
NewFlowAccount will read the flow.json file and fetch the service account from there.
func NewFlowAccountDefault ¶
NewFlowAccountDefault will read the flow.json file from the default location
type Flow ¶
type Flow struct { Accounts struct { Service Account } }
Flow represents the contents of the flow.json file with an addition of host
type FlowConfig ¶
FlowConfig holds all information to work on flow with a given set of accounts in a wallet
func NewFlowConfigDevNet ¶
func NewFlowConfigDevNet() *FlowConfig
NewFlowConfigDevNet setup devnot like in https://www.notion.so/Accessing-Flow-Devnet-ad35623797de48c08d8b88102ea38131
func NewFlowConfigLocalhost ¶
func NewFlowConfigLocalhost() *FlowConfig
NewFlowConfigLocalhost will create a flow configuration from local emulator and default files
func (*FlowConfig) CreateAccount ¶
func (f *FlowConfig) CreateAccount(accountName string)
CreateAccount will create an account for running transactions without a contract
func (*FlowConfig) DeployContract ¶
func (f *FlowConfig) DeployContract(contractName string)
DeployContract will deploy a contract with the given name to an account with the same name from wallet.json
func (*FlowConfig) FindAddress ¶ added in v0.8.0
func (f *FlowConfig) FindAddress(key string) cadence.Address
FindAddress finds an candence.Address value from a given key in your wallet
func (*FlowConfig) GetAccount ¶ added in v0.10.0
func (f *FlowConfig) GetAccount(name string) *flow.Account
GetAccount gets the account
func (*FlowConfig) RunScript ¶
func (f *FlowConfig) RunScript(filename string, arguments ...cadence.Value)
RunScript executes a read only script with a given filename on the blockchain
func (*FlowConfig) RunScriptReturns ¶ added in v0.9.0
RunScriptReturns executes a read only script with a given filename on the blockchain
func (*FlowConfig) SendTransaction ¶
func (f *FlowConfig) SendTransaction(filename string, signerAccountNames ...string)
SendTransaction executes a transaction file with a given name and signs it with the provided account
func (*FlowConfig) SendTransactionWithArguments ¶ added in v0.7.0
func (f *FlowConfig) SendTransactionWithArguments(filename string, signer string, arguments ...cadence.Value)
SendTransactionWithArguments executes a transaction file with a given name and signs it with the provided account and send in the provided arguments
func (*FlowConfig) SendTransactionWithMultipleSignersAndArguments ¶ added in v0.7.0
func (f *FlowConfig) SendTransactionWithMultipleSignersAndArguments(filename string, signers []string, arguments ...cadence.Value)
SendTransactionWithMultipleSignersAndArguments executes a transaction file with a given name and signs it with the provided accounts and sends in the provided arguments