Documentation ¶
Index ¶
- func AddAccountContract(address flow.Address, name string, code []byte) *flow.Transaction
- func AddAccountKey(address flow.Address, accountKey *flow.AccountKey) *flow.Transaction
- func CreateAccount(accountKeys []*flow.AccountKey, contracts []Contract, payer flow.Address) *flow.Transaction
- func RemoveAccountKey(address flow.Address, keyIndex int) *flow.Transaction
- func UpdateAccountContract(address flow.Address, name string, code []byte) *flow.Transaction
- type Contract
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAccountContract ¶ added in v0.12.0
AddAccountContract generates a transaction that deploys a contract to an account.
func AddAccountKey ¶
func AddAccountKey(address flow.Address, accountKey *flow.AccountKey) *flow.Transaction
AddAccountKey generates a transaction that adds a public key to an account.
func CreateAccount ¶
func CreateAccount(accountKeys []*flow.AccountKey, contracts []Contract, payer flow.Address) *flow.Transaction
CreateAccount generates a transactions that creates a new account.
This template accepts a list of public keys and a contracts argument, both of which are optional.
The contracts argument is a dictionary of *contract name*: *contract code (in bytes)*. All of the contracts will be deployed to the account.
The final argument is the address of the account that will pay the account creation fee. This account is added as a transaction authorizer and therefore must sign the resulting transaction.
func RemoveAccountKey ¶
func RemoveAccountKey(address flow.Address, keyIndex int) *flow.Transaction
RemoveAccountKey generates a transaction that removes a key from an account.
func UpdateAccountContract ¶ added in v0.12.0
UpdateAccountContract generates a transaction that updates a contract deployed at an account.
Types ¶
type Contract ¶ added in v0.12.0
Contract is a Cadence contract deployed to a Flow account.
Name is the identifier for the contract within the account.
Source is the the Cadence code of the contract.
func (Contract) SourceBytes ¶ added in v0.12.0
SourceBytes returns the UTF-8 encoded source code (Source) of the contract.