Documentation ¶
Index ¶
- Variables
- func AccountToNodeID(acct zsw.AccountName) int64
- func ChunkifyActions(actions []*zsw.Action) (out [][]*zsw.Action)
- func Retry(attempts int, sleep time.Duration, callback func() error) (err error)
- func ScanLinesUntilBlank() (out string, err error)
- func ScanSingleLine() (out string, err error)
- type ActionMap
- type BIOS
- func (b *BIOS) Boot() error
- func (b *BIOS) DispatchBootNode(genesisJSON, publicKey, privateKey string) error
- func (b *BIOS) DownloadReferences() error
- func (b *BIOS) DownloadURL(ref string, hash string) error
- func (b *BIOS) FileNameFromCache(ref string) string
- func (b *BIOS) GenerateEphemeralPrivKey() (*ecc.PrivateKey, error)
- func (b *BIOS) GenerateGenesisJSON(pubKey string) string
- func (b *BIOS) GetContentsCacheRef(filename string) (string, error)
- func (b *BIOS) LoadGenesisFromFile(pubkey string) (string, error)
- func (b *BIOS) ReadFromCache(ref string) ([]byte, error)
- func (b *BIOS) ReaderFromCache(ref string) (io.ReadCloser, error)
- func (b *BIOS) RunChainValidation() (bool, error)
- type BootSeq
- type ContentRef
- type GenesisJSON
- type Logger
- type OpCreateToken
- type OpCreateVoters
- type OpInjectUnregdSnapshot
- type OpIssueToken
- type OpNewAccount
- type OpResignAccounts
- type OpSetCode
- type OpSetPriv
- type OpSetProds
- type OpSetRAM
- type OpSnapshotCreateAccounts
- type OpTransferToken
- type Operation
- type OperationType
- type Snapshot
- type SnapshotLine
- type UnregdSnapshot
- type UnregdSnapshotLine
- type ValidationError
- type ValidationErrors
Constants ¶
This section is empty.
Variables ¶
View Source
var AN = zsw.AN
AN is a shortcut to create an AccountName
View Source
var PN = zsw.PN
PN is a shortcut to create a PermissionName
Functions ¶
func AccountToNodeID ¶
func AccountToNodeID(acct zsw.AccountName) int64
func ChunkifyActions ¶
func ChunkifyActions(actions []*zsw.Action) (out [][]*zsw.Action)
func ScanLinesUntilBlank ¶
func ScanSingleLine ¶
Types ¶
type BIOS ¶
type BIOS struct { Log *Logger CachePath string TargetNetAPI *zsw.API Snapshot Snapshot BootSequenceFile string BootSequence *BootSeq WriteActions bool HackVotingAccounts bool ReuseGenesis bool Genesis *GenesisJSON EphemeralPrivateKey *ecc.PrivateKey EphemeralPublicKey ecc.PublicKey }
func (*BIOS) DispatchBootNode ¶
func (*BIOS) DownloadReferences ¶
func (*BIOS) FileNameFromCache ¶
func (*BIOS) GenerateEphemeralPrivKey ¶
func (b *BIOS) GenerateEphemeralPrivKey() (*ecc.PrivateKey, error)
func (*BIOS) GenerateGenesisJSON ¶
func (*BIOS) GetContentsCacheRef ¶
func (*BIOS) LoadGenesisFromFile ¶
func (*BIOS) ReaderFromCache ¶
func (b *BIOS) ReaderFromCache(ref string) (io.ReadCloser, error)
func (*BIOS) RunChainValidation ¶
type BootSeq ¶
type BootSeq struct { Keys map[string]string `json:"keys"` Contents []*ContentRef `json:"contents"` BootSequence []*OperationType `json:"boot_sequence"` }
func ReadBootSeq ¶
type ContentRef ¶
type GenesisJSON ¶
type GenesisJSON struct { InitialTimestamp string `json:"initial_timestamp"` InitialKey string `json:"initial_key"` }
TODO: update with latest GenesisJSON with the basic parameters...
type OpCreateToken ¶
type OpCreateToken struct { Account zsw.AccountName `json:"account"` Amount zsw.Asset `json:"amount"` }
type OpCreateVoters ¶
type OpCreateVoters struct { Creator zsw.AccountName Pubkey string Count int }
type OpInjectUnregdSnapshot ¶
type OpInjectUnregdSnapshot struct {
TestnetTruncateSnapshot int `json:"TESTNET_TRUNCATE_SNAPSHOT"`
}
type OpIssueToken ¶
type OpIssueToken struct { Account zsw.AccountName Amount zsw.Asset Memo string }
type OpNewAccount ¶
type OpNewAccount struct { Creator zsw.AccountName NewAccount zsw.AccountName `json:"new_account"` Pubkey string }
type OpResignAccounts ¶
type OpResignAccounts struct { Accounts []zsw.AccountName TestnetKeepAccounts bool `json:"TESTNET_KEEP_ACCOUNTS"` }
type OpSetCode ¶
type OpSetCode struct { Account zsw.AccountName ContractNameRef string `json:"contract_name_ref"` }
type OpSetPriv ¶
type OpSetPriv struct {
Account zsw.AccountName
}
type OpSetProds ¶
type OpSetProds struct {
Prods []producerKeyString
}
type OpSnapshotCreateAccounts ¶
type OpTransferToken ¶
type OpTransferToken struct { From zsw.AccountName To zsw.AccountName Quantity zsw.Asset Memo string }
type OperationType ¶
func (*OperationType) UnmarshalJSON ¶
func (o *OperationType) UnmarshalJSON(data []byte) error
type SnapshotLine ¶
type UnregdSnapshot ¶
type UnregdSnapshot []UnregdSnapshotLine
func NewUnregdSnapshot ¶
func NewUnregdSnapshot(content []byte) (out UnregdSnapshot, err error)
type UnregdSnapshotLine ¶
type ValidationError ¶
type ValidationError struct { Err error BlockNumber int Action *zsw.Action RawAction []byte Index int ActionHexData string PackedTransaction *zsw.PackedTransaction }
func (ValidationError) Error ¶
func (e ValidationError) Error() string
type ValidationErrors ¶
type ValidationErrors struct {
Errors []error
}
func (ValidationErrors) Error ¶
func (v ValidationErrors) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.