Documentation ¶
Index ¶
- type Accounts
- func (a *Accounts) AddContract(accountName string, contractName string, contractFilename string, ...) (*flow.Account, error)
- func (a *Accounts) AddContractForAddress(accountAddress string, accountPrivateKey string, contractName string, ...) (*flow.Account, error)
- func (a *Accounts) AddContractForAddressWithCode(accountAddress string, accountPrivateKey string, contractName string, ...) (*flow.Account, error)
- func (a *Accounts) Create(signerName string, keys []string, keyWeights []int, signatureAlgorithm string, ...) (*flow.Account, error)
- func (a *Accounts) Get(address string) (*flow.Account, error)
- func (a *Accounts) RemoveContract(contractName string, accountName string) (*flow.Account, error)
- func (a *Accounts) StakingInfo(accountAddress string) (*cadence.Value, *cadence.Value, error)
- type Blocks
- type Collections
- type Events
- type Keys
- type Project
- type Scripts
- type Services
- type Status
- type Transactions
- func (t *Transactions) Build(proposer string, authorizer []string, payer string, proposerKeyIndex int, ...) (*project.Transaction, error)
- func (t *Transactions) GetStatus(transactionID string, waitSeal bool) (*flow.Transaction, *flow.TransactionResult, error)
- func (t *Transactions) Send(transactionFilename string, signerName string, args []string, argsJSON string, ...) (*flow.Transaction, *flow.TransactionResult, error)
- func (t *Transactions) SendForAddressWithCode(code []byte, signerAddress string, signerPrivateKey string, args []string, ...) (*flow.Transaction, *flow.TransactionResult, error)
- func (t *Transactions) SendSigned(signedFilename string) (*flow.Transaction, *flow.TransactionResult, error)
- func (t *Transactions) Sign(payloadFilename string, signerName string, approveSigning bool) (*project.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
Accounts is a service that handles all account-related interactions.
func NewAccounts ¶
func NewAccounts( gateway gateway.Gateway, project *project.Project, logger output.Logger, ) *Accounts
NewAccounts returns a new accounts service.
func (*Accounts) AddContract ¶
func (a *Accounts) AddContract( accountName string, contractName string, contractFilename string, updateExisting bool, ) (*flow.Account, error)
AddContract adds a new contract to an account and returns the updated account.
func (*Accounts) AddContractForAddress ¶
func (a *Accounts) AddContractForAddress( accountAddress string, accountPrivateKey string, contractName string, contractFilename string, updateExisting bool, ) (*flow.Account, error)
AddContractForAddress adds a new contract to an address using private key specified
func (*Accounts) AddContractForAddressWithCode ¶
func (a *Accounts) AddContractForAddressWithCode( accountAddress string, accountPrivateKey string, contractName string, contractCode []byte, updateExisting bool, ) (*flow.Account, error)
AddContractForAddressWithCode adds a new contract to an address using private key and code specified
func (*Accounts) Create ¶
func (a *Accounts) Create( signerName string, keys []string, keyWeights []int, signatureAlgorithm string, hashingAlgorithm string, contracts []string, ) (*flow.Account, error)
Create creates and returns a new account.
The new account is created with the given public keys and contracts.
The account creation transaction is signed by the specified signer.
type Blocks ¶
type Blocks struct {
// contains filtered or unexported fields
}
Blocks is a service that handles all block-related interactions.
func (*Blocks) GetBlock ¶
func (e *Blocks) GetBlock( query string, eventType string, verbose bool, ) (*flow.Block, []client.BlockEvents, []*flow.Collection, error)
GetBlock returns a block based on the provided query string.
Query string options: - "latest" : return the latest block - height (e.g. 123456789) : return block at this height - ID : return block with this ID
type Collections ¶
type Collections struct {
// contains filtered or unexported fields
}
Collections is aa service that handles all collection-related interactions.
func NewCollections ¶
func NewCollections( gateway gateway.Gateway, project *project.Project, logger output.Logger, ) *Collections
NewCollections returns a new collections service.
func (*Collections) Get ¶
func (c *Collections) Get(id string) (*flow.Collection, error)
Get returns a collection by ID.
type Events ¶
type Events struct {
// contains filtered or unexported fields
}
Events is a service that handles all event-related interactions.
type Keys ¶
type Keys struct {
// contains filtered or unexported fields
}
Keys is a service that handles all key-related interactions.
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project is a service that handles all interactions for a project.
func NewProject ¶
func NewProject( gateway gateway.Gateway, project *project.Project, logger output.Logger, ) *Project
NewProject returns a new project service.
type Scripts ¶
type Scripts struct {
// contains filtered or unexported fields
}
Scripts is a service that handles all script-related interactions.
func NewScripts ¶
func NewScripts( gateway gateway.Gateway, project *project.Project, logger output.Logger, ) *Scripts
NewScripts returns a new scripts service.
type Services ¶
type Services struct { Accounts *Accounts Scripts *Scripts Transactions *Transactions Keys *Keys Events *Events Collections *Collections Project *Project Blocks *Blocks Status *Status }
Services is a collection of services that provide domain-specific functionality for the different components of a Flow project.
type Status ¶ added in v0.19.0
type Status struct {
// contains filtered or unexported fields
}
Status is a service that handles status of access node.
type Transactions ¶
type Transactions struct {
// contains filtered or unexported fields
}
Transactions is a service that handles all transaction-related interactions.
func NewTransactions ¶
func NewTransactions( gateway gateway.Gateway, project *project.Project, logger output.Logger, ) *Transactions
NewTransactions returns a new transactions service.
func (*Transactions) Build ¶ added in v0.18.0
func (t *Transactions) Build( proposer string, authorizer []string, payer string, proposerKeyIndex int, codeFilename string, args []string, argsJSON string, network string, ) (*project.Transaction, error)
Build builds a transaction with specified payer, proposer and authorizer
func (*Transactions) GetStatus ¶
func (t *Transactions) GetStatus( transactionID string, waitSeal bool, ) (*flow.Transaction, *flow.TransactionResult, error)
GetStatus of transaction
func (*Transactions) Send ¶
func (t *Transactions) Send( transactionFilename string, signerName string, args []string, argsJSON string, network string, ) (*flow.Transaction, *flow.TransactionResult, error)
Send sends a transaction from a file.
func (*Transactions) SendForAddressWithCode ¶
func (t *Transactions) SendForAddressWithCode( code []byte, signerAddress string, signerPrivateKey string, args []string, argsJSON string, ) (*flow.Transaction, *flow.TransactionResult, error)
SendForAddressWithCode send transaction for address and private key specified with code
func (*Transactions) SendSigned ¶ added in v0.18.0
func (t *Transactions) SendSigned( signedFilename string, ) (*flow.Transaction, *flow.TransactionResult, error)
SendSigned sends the transaction that is already signed
func (*Transactions) Sign ¶ added in v0.18.0
func (t *Transactions) Sign( payloadFilename string, signerName string, approveSigning bool, ) (*project.Transaction, error)
Sign transaction