Documentation
¶
Index ¶
- Variables
- func Exists(path string) bool
- type Account
- type AccountKey
- type Contract
- type HexAccountKey
- func (a HexAccountKey) HashAlgo() crypto.HashAlgorithm
- func (a HexAccountKey) Index() int
- func (a *HexAccountKey) PrivateKey() crypto.PrivateKey
- func (a *HexAccountKey) PrivateKeyHex() string
- func (a HexAccountKey) SigAlgo() crypto.SignatureAlgorithm
- func (a *HexAccountKey) Signer(ctx context.Context) (crypto.Signer, error)
- func (a *HexAccountKey) ToConfig() config.AccountKey
- func (a HexAccountKey) Type() config.KeyType
- type KmsAccountKey
- func (a KmsAccountKey) HashAlgo() crypto.HashAlgorithm
- func (a KmsAccountKey) Index() int
- func (a KmsAccountKey) SigAlgo() crypto.SignatureAlgorithm
- func (a *KmsAccountKey) Signer(ctx context.Context) (crypto.Signer, error)
- func (a *KmsAccountKey) ToConfig() config.AccountKey
- func (a KmsAccountKey) Type() config.KeyType
- type Project
- func (p *Project) AccountByAddress(address string) *Account
- func (p *Project) AccountByName(name string) *Account
- func (p *Project) AccountNamesForNetwork(network string) []string
- func (p *Project) AddOrUpdateAccount(account *Account)
- func (p *Project) AliasesForNetwork(network string) map[string]string
- func (p *Project) ContractConflictExists(network string) bool
- func (p *Project) ContractsByNetwork(network string) []Contract
- func (p *Project) EmulatorServiceAccount() (*Account, error)
- func (p *Project) NetworkByName(name string) *config.Network
- func (p *Project) Save(path string) error
- func (p *Project) SetEmulatorServiceKey(privateKey crypto.PrivateKey)
Constants ¶
This section is empty.
Variables ¶
var ( DefaultConfigPaths = []string{"flow.json"} DefaultConfigPath = DefaultConfigPaths[0] )
Functions ¶
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func AccountFromAddressAndKey ¶
func AccountFromAddressAndKey(address flow.Address, privateKey crypto.PrivateKey) *Account
func (*Account) DefaultKey ¶
func (a *Account) DefaultKey() AccountKey
func (*Account) Keys ¶
func (a *Account) Keys() []AccountKey
func (*Account) SetDefaultKey ¶
func (a *Account) SetDefaultKey(key AccountKey)
type AccountKey ¶
type AccountKey interface {
Type() config.KeyType
Index() int
SigAlgo() crypto.SignatureAlgorithm
HashAlgo() crypto.HashAlgorithm
Signer(ctx context.Context) (crypto.Signer, error)
ToConfig() config.AccountKey
}
func NewAccountKey ¶
func NewAccountKey(accountKeyConf config.AccountKey) (AccountKey, error)
type HexAccountKey ¶
type HexAccountKey struct {
// contains filtered or unexported fields
}
func NewHexAccountKeyFromPrivateKey ¶
func NewHexAccountKeyFromPrivateKey( index int, hashAlgo crypto.HashAlgorithm, privateKey crypto.PrivateKey, ) *HexAccountKey
func (HexAccountKey) HashAlgo ¶
func (a HexAccountKey) HashAlgo() crypto.HashAlgorithm
func (*HexAccountKey) PrivateKey ¶
func (a *HexAccountKey) PrivateKey() crypto.PrivateKey
func (*HexAccountKey) PrivateKeyHex ¶
func (a *HexAccountKey) PrivateKeyHex() string
func (HexAccountKey) SigAlgo ¶
func (a HexAccountKey) SigAlgo() crypto.SignatureAlgorithm
func (*HexAccountKey) ToConfig ¶
func (a *HexAccountKey) ToConfig() config.AccountKey
type KmsAccountKey ¶
type KmsAccountKey struct {
// contains filtered or unexported fields
}
func (KmsAccountKey) HashAlgo ¶
func (a KmsAccountKey) HashAlgo() crypto.HashAlgorithm
func (KmsAccountKey) SigAlgo ¶
func (a KmsAccountKey) SigAlgo() crypto.SignatureAlgorithm
func (*KmsAccountKey) ToConfig ¶
func (a *KmsAccountKey) ToConfig() config.AccountKey
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project contains the configuration for a Flow project.
func Init ¶
func Init(sigAlgo crypto.SignatureAlgorithm, hashAlgo crypto.HashAlgorithm) (*Project, error)
Init initializes a new Flow project.
func (*Project) AccountByAddress ¶
AccountByAddress returns an account by address.
func (*Project) AccountByName ¶
AccountByName returns an account by name.
func (*Project) AccountNamesForNetwork ¶
AccountNamesForNetwork returns all configured account names for a network.
func (*Project) AddOrUpdateAccount ¶
AddOrUpdateAccount adds or updates an account.
func (*Project) AliasesForNetwork ¶
AliasesForNetwork returns all deployment aliases for a network.
func (*Project) ContractConflictExists ¶
CheckContractConflict returns true if the same contract is configured to deploy to more than one account in the same network.
The CLI currently does not allow the same contract to be deployed to multiple accounts in the same network.
func (*Project) ContractsByNetwork ¶
ContractsByNetwork returns all contracts for a network.
func (*Project) EmulatorServiceAccount ¶
EmulatorServiceAccount returns the service account for the default emulator profilee.
func (*Project) NetworkByName ¶
NetworkByName returns a network by name.
func (*Project) SetEmulatorServiceKey ¶
func (p *Project) SetEmulatorServiceKey(privateKey crypto.PrivateKey)
SetEmulatorServiceKey sets the default emulator service account private key.