Documentation ¶
Index ¶
- Variables
- func NewBidname(bidder, newname eos.AccountName, bid eos.Asset) *eos.Action
- func NewBuyRAM(payer, receiver eos.AccountName, eosQuantity uint64) *eos.Action
- func NewBuyRAMBytes(payer, receiver eos.AccountName, bytes uint32) *eos.Action
- func NewCancelDelay(cancelingAuth eos.PermissionLevel, transactionID eos.Checksum256) *eos.Action
- func NewClaimRewards(owner eos.AccountName) *eos.Action
- func NewCustomNewAccount(creator, newAccount eos.AccountName, owner, active, posting eos.Authority) *eos.Action
- func NewDelegateBW(from, receiver eos.AccountName, stakeCPU, stakeNet eos.Asset, transfer bool) *eos.Action
- func NewDelegatedNewAccount(creator, newAccount eos.AccountName, delegatedTo eos.AccountName) *eos.Action
- func NewDeleteAuth(account eos.AccountName, permission eos.PermissionName) *eos.Action
- func NewLinkAuth(account, code eos.AccountName, actionName eos.ActionName, ...) *eos.Action
- func NewNewAccount(creator, newAccount eos.AccountName, ownerKey, activeKey ecc.PublicKey, ...) *eos.Action
- func NewNonce(nonce string) *eos.Action
- func NewProvideBW(account, provider eos.AccountName, usingAccount eos.AccountName, ...) *eos.Action
- func NewRefund(owner eos.AccountName) *eos.Action
- func NewRegProducer(producer eos.AccountName, producerKey ecc.PublicKey, url string, ...) *eos.Action
- func NewRegProxy(proxy eos.AccountName, isProxy bool) *eos.Action
- func NewRemoveProducer(producer eos.AccountName) *eos.Action
- func NewSellRAM(account eos.AccountName, bytes uint64) *eos.Action
- func NewSetABI(account eos.AccountName, abiPath string) (out *eos.Action, err error)
- func NewSetCode(account eos.AccountName, wasmPath string) (out *eos.Action, err error)
- func NewSetCodeTx(account eos.AccountName, wasmPath, abiPath string) (out *eos.Transaction, err error)
- func NewSetContract(account eos.AccountName, wasmPath, abiPath string) (out []*eos.Action, err error)
- func NewSetPriv(account eos.AccountName) *eos.Action
- func NewSetProds(producers []ProducerKey) *eos.Action
- func NewSetRAM(maxRAMSize uint64) *eos.Action
- func NewSetRAMRate(bytesPerBlock uint16) *eos.Action
- func NewSetalimits(account eos.AccountName, ramBytes, netWeight, cpuWeight int64) *eos.Action
- func NewUndelegateBW(from, receiver eos.AccountName, unstakeCPU, unstakeNet eos.Asset) *eos.Action
- func NewUnlinkAuth(account, code eos.AccountName, actionName eos.ActionName) *eos.Action
- func NewUnregProducer(producer eos.AccountName) *eos.Action
- func NewUpdateAuth(account eos.AccountName, permission, parent eos.PermissionName, ...) *eos.Action
- func NewVoteProducer(voter eos.AccountName, proxy eos.AccountName, producers ...eos.AccountName) *eos.Action
- type Bidname
- type BlockchainParameters
- type BuyRAM
- type BuyRAMBytes
- type CancelDelay
- type ClaimRewards
- type DelegateBW
- type DeleteAuth
- type EOSIOGlobalState
- type LinkAuth
- type NewAccount
- type Nonce
- type ProducerKey
- type ProvideBW
- type Refund
- type RegProducer
- type RegProxy
- type RemoveProducer
- type SellRAM
- type SetABI
- type SetCode
- type SetPriv
- type SetProds
- type SetRAM
- type SetRAMRate
- type Setalimits
- type UndelegateBW
- type UnlinkAuth
- type UnregProducer
- type UpdateAuth
- type VoteProducer
Constants ¶
This section is empty.
Variables ¶
var AN = eos.AN
var ActN = eos.ActN
var PN = eos.PN
Functions ¶
func NewBidname ¶
func NewBuyRAMBytes ¶
func NewBuyRAMBytes(payer, receiver eos.AccountName, bytes uint32) *eos.Action
NewBuyRAMBytes will buy at current market price a given number of bytes of RAM, and grant them to the `receiver` account.
func NewCancelDelay ¶
func NewCancelDelay(cancelingAuth eos.PermissionLevel, transactionID eos.Checksum256) *eos.Action
NewCancelDelay creates an action from the `eosio.system` contract called `canceldelay`.
`canceldelay` allows you to cancel a deferred transaction, previously sent to the chain with a `delay_sec` larger than 0. You need to sign with cancelingAuth, to cancel a transaction signed with that same authority.
func NewClaimRewards ¶
func NewClaimRewards(owner eos.AccountName) *eos.Action
NewClaimRewards will buy at current market price a given number of bytes of RAM, and grant them to the `receiver` account.
func NewCustomNewAccount ¶
func NewCustomNewAccount(creator, newAccount eos.AccountName, owner, active, posting eos.Authority) *eos.Action
NewCustomNewAccount returns a `newaccount` action that lives on the `eosio.system` contract. You can specify your own `owner` and `active` permissions.
func NewDelegateBW ¶
func NewDelegateBW(from, receiver eos.AccountName, stakeCPU, stakeNet eos.Asset, transfer bool) *eos.Action
NewDelegateBW returns a `delegatebw` action that lives on the `eosio.system` contract.
func NewDelegatedNewAccount ¶
func NewDelegatedNewAccount(creator, newAccount eos.AccountName, delegatedTo eos.AccountName) *eos.Action
NewDelegatedNewAccount returns a `newaccount` action that lives on the `eosio.system` contract. It is filled with an authority structure that delegates full control of the new account to an already existing account.
func NewDeleteAuth ¶
func NewDeleteAuth(account eos.AccountName, permission eos.PermissionName) *eos.Action
NewDeleteAuth creates an action from the `eosio.system` contract called `deleteauth`.
You cannot delete the `owner` or `active` permissions. Also, if a permission is still linked through a previous `updatelink` action, you will need to `unlinkauth` first.
func NewLinkAuth ¶
func NewLinkAuth(account, code eos.AccountName, actionName eos.ActionName, requiredPermission eos.PermissionName, usingAccount eos.AccountName, usingPermission eos.PermissionName) *eos.Action
NewLinkAuth creates an action from the `eosio.system` contract called `linkauth`.
`linkauth` allows you to attach certain permission to the given `code::actionName`. With this set on-chain, you can use the `requiredPermission` to sign transactions for `code::actionName` and not rely on your `active` (which might be more sensitive as it can sign anything) for the given operation.
func NewNewAccount ¶
func NewNewAccount(creator, newAccount eos.AccountName, ownerKey, activeKey ecc.PublicKey, permission string) *eos.Action
NewNewAccount returns a `newaccount` action that lives on the `eosio.system` contract.
func NewNonce ¶
NewNonce returns a `nonce` action that lives on the `eosio.bios` contract. It should exist only when booting a new network, as it is replaced using the `eos-bios` boot process by the `eosio.system` contract.
func NewProvideBW ¶
func NewProvideBW(account, provider eos.AccountName, usingAccount eos.AccountName, usingPermission eos.PermissionName) *eos.Action
func NewRefund ¶
func NewRefund(owner eos.AccountName) *eos.Action
NewRefund returns a `refund` action that lives on the `eosio.system` contract.
func NewRegProducer ¶
func NewRegProducer(producer eos.AccountName, producerKey ecc.PublicKey, url string, location uint16) *eos.Action
NewRegProducer returns a `regproducer` action that lives on the `eosio.system` contract.
func NewRegProxy ¶
func NewRegProxy(proxy eos.AccountName, isProxy bool) *eos.Action
NewRegProxy returns a `regproxy` action that lives on the `eosio.system` contract.
func NewRemoveProducer ¶
func NewRemoveProducer(producer eos.AccountName) *eos.Action
NewRemoveProducer returns a `rmvproducer` action that lives on the `eosio.system` contract. This is to be called by the consortium of BPs, to oust a BP from its place. If you want to unregister yourself as a BP, use `unregprod`.
func NewSellRAM ¶
func NewSellRAM(account eos.AccountName, bytes uint64) *eos.Action
NewSellRAM will sell at current market price a given number of bytes of RAM.
func NewSetCode ¶
func NewSetCodeTx ¶
func NewSetCodeTx(account eos.AccountName, wasmPath, abiPath string) (out *eos.Transaction, err error)
NewSetCodeTx is _deprecated_. Use NewSetContract instead, and build your transaction yourself.
func NewSetContract ¶
func NewSetPriv ¶
func NewSetPriv(account eos.AccountName) *eos.Action
NewSetPriv returns a `setpriv` action that lives on the `eosio.bios` contract. It should exist only when booting a new network, as it is replaced using the `eos-bios` boot process by the `eosio.system` contract.
func NewSetProds ¶
func NewSetProds(producers []ProducerKey) *eos.Action
NewSetPriv returns a `setpriv` action that lives on the `eosio.bios` contract. It should exist only when booting a new network, as it is replaced using the `eos-bios` boot process by the `eosio.system` contract.
func NewSetRAMRate ¶
func NewSetalimits ¶
func NewSetalimits(account eos.AccountName, ramBytes, netWeight, cpuWeight int64) *eos.Action
NewSetalimits sets the account limits. Requires signature from `eosio@active` account.
func NewUndelegateBW ¶
NewUndelegateBW returns a `undelegatebw` action that lives on the `eosio.system` contract.
func NewUnlinkAuth ¶
func NewUnlinkAuth(account, code eos.AccountName, actionName eos.ActionName) *eos.Action
NewUnlinkAuth creates an action from the `eosio.system` contract called `unlinkauth`.
`unlinkauth` detaches a previously set permission from a `code::actionName`. See `linkauth`.
func NewUnregProducer ¶
func NewUnregProducer(producer eos.AccountName) *eos.Action
NewUnregProducer returns a `unregprod` action that lives on the `eosio.system` contract.
func NewUpdateAuth ¶
func NewUpdateAuth(account eos.AccountName, permission, parent eos.PermissionName, authority eos.Authority, usingAccount eos.AccountName, usingPermission eos.PermissionName) *eos.Action
NewUpdateAuth creates an action from the `eosio.system` contract called `updateauth`.
usingPermission needs to be `owner` if you want to modify the `owner` authorization, otherwise `active` will do for the rest.
func NewVoteProducer ¶
func NewVoteProducer(voter eos.AccountName, proxy eos.AccountName, producers ...eos.AccountName) *eos.Action
NewNonce returns a `nonce` action that lives on the `eosio.bios` contract. It should exist only when booting a new network, as it is replaced using the `eos-bios` boot process by the `eosio.system` contract.
Types ¶
type Bidname ¶
type Bidname struct { Bidder eos.AccountName `json:"bidder"` Newname eos.AccountName `json:"newname"` Bid eos.Asset `json:"bid"` // specified in EOS }
Bidname represents the `eosio.system_contract::bidname` action.
type BlockchainParameters ¶
type BlockchainParameters struct { MaxBlockNetUsage eos.Uint64 `json:"max_block_net_usage"` TargetBlockNetUsagePct uint32 `json:"target_block_net_usage_pct"` MaxTransactionNetUsage uint32 `json:"max_transaction_net_usage"` BasePerTransactionNetUsage uint32 `json:"base_per_transaction_net_usage"` NetUsageLeeway uint32 `json:"net_usage_leeway"` ContextFreeDiscountNetUsageNum uint32 `json:"context_free_discount_net_usage_num"` ContextFreeDiscountNetUsageDen uint32 `json:"context_free_discount_net_usage_den"` MaxBlockCPUUsage uint32 `json:"max_block_cpu_usage"` TargetBlockCPUUsagePct uint32 `json:"target_block_cpu_usage_pct"` MaxTransactionCPUUsage uint32 `json:"max_transaction_cpu_usage"` MinTransactionCPUUsage uint32 `json:"min_transaction_cpu_usage"` MaxTransactionLifetime uint32 `json:"max_transaction_lifetime"` DeferredTrxExpirationWindow uint32 `json:"deferred_trx_expiration_window"` MaxTransactionDelay uint32 `json:"max_transaction_delay"` MaxInlineActionSize uint32 `json:"max_inline_action_size"` MaxInlineActionDepth uint16 `json:"max_inline_action_depth"` MaxAuthorityDepth uint16 `json:"max_authority_depth"` MaxGeneratedTransactionCount uint32 `json:"max_generated_transaction_count"` }
BlockchainParameters are all the params we can set through `setparams`.
type BuyRAM ¶
type BuyRAM struct { Payer eos.AccountName `json:"payer"` Receiver eos.AccountName `json:"receiver"` Quantity eos.Asset `json:"quant"` // specified in EOS }
BuyRAM represents the `eosio.system::buyram` action.
type BuyRAMBytes ¶
type BuyRAMBytes struct { Payer eos.AccountName `json:"payer"` Receiver eos.AccountName `json:"receiver"` Bytes uint32 `json:"bytes"` }
BuyRAMBytes represents the `eosio.system::buyrambytes` action.
type CancelDelay ¶
type CancelDelay struct { CancelingAuth eos.PermissionLevel `json:"canceling_auth"` TransactionID eos.Checksum256 `json:"trx_id"` }
CancelDelay represents the native `canceldelay` action, through the system contract.
type ClaimRewards ¶
type ClaimRewards struct {
Owner eos.AccountName `json:"owner"`
}
ClaimRewards represents the `eosio.system::claimrewards` action.
type DelegateBW ¶
type DelegateBW struct { From eos.AccountName `json:"from"` Receiver eos.AccountName `json:"receiver"` StakeNet eos.Asset `json:"stake_net"` StakeCPU eos.Asset `json:"stake_cpu"` Transfer eos.Bool `json:"transfer"` }
DelegateBW represents the `eosio.system::delegatebw` action.
type DeleteAuth ¶
type DeleteAuth struct { Account eos.AccountName `json:"account"` Permission eos.PermissionName `json:"permission"` }
DeleteAuth represents the native `deleteauth` action, reachable through the `eosio.system` contract.
type EOSIOGlobalState ¶
type LinkAuth ¶
type LinkAuth struct { Account eos.AccountName `json:"account"` Code eos.AccountName `json:"code"` Type eos.ActionName `json:"type"` Requirement eos.PermissionName `json:"requirement"` }
LinkAuth represents the native `linkauth` action, through the system contract.
type NewAccount ¶
type NewAccount struct { Creator eos.AccountName `json:"creator"` Name eos.AccountName `json:"name"` Owner eos.Authority `json:"owner"` Active eos.Authority `json:"active"` }
NewAccount represents a `newaccount` action on the `eosio.system` contract. It is one of the rare ones to be hard-coded into the blockchain.
type Nonce ¶
type Nonce struct {
Value string `json:"value"`
}
Nonce represents the `eosio.system::nonce` action. It is used to add variability in a transaction, so you can send the same many times in the same block, without it having the same Tx hash.
type ProducerKey ¶
type ProducerKey struct { ProducerName eos.AccountName `json:"producer_name"` BlockSigningKey ecc.PublicKey `json:"block_signing_key"` }
type ProvideBW ¶
type ProvideBW struct { Provider eos.AccountName `json:"provider"` Account eos.AccountName `json:"account"` }
type Refund ¶
type Refund struct {
Owner eos.AccountName `json:"owner"`
}
Refund represents the `eosio.system::refund` action
type RegProducer ¶
type RegProducer struct { Producer eos.AccountName `json:"producer"` ProducerKey ecc.PublicKey `json:"producer_key"` URL string `json:"url"` Location uint16 `json:"location"` // what,s the meaning of that anyway ? }
RegProducer represents the `eosio.system::regproducer` action
type RegProxy ¶
type RegProxy struct { Proxy eos.AccountName `json:"proxy"` IsProxy bool `json:"isproxy"` }
RegProxy represents the `eosio.system::regproxy` action
type RemoveProducer ¶
type RemoveProducer struct {
Producer eos.AccountName `json:"producer"`
}
RemoveProducer represents the `eosio.system::rmvproducer` action
type SellRAM ¶
type SellRAM struct { Account eos.AccountName `json:"account"` Bytes uint64 `json:"bytes"` }
SellRAM represents the `eosio.system::sellram` action.
type SetABI ¶
type SetABI struct { Account eos.AccountName `json:"account"` ABI eos.HexBytes `json:"abi"` }
SetABI represents the hard-coded `setabi` action.
type SetCode ¶
type SetCode struct { Account eos.AccountName `json:"account"` VMType byte `json:"vmtype"` VMVersion byte `json:"vmversion"` Code eos.HexBytes `json:"code"` }
SetCode represents the hard-coded `setcode` action.
type SetPriv ¶
type SetPriv struct { Account eos.AccountName `json:"account"` IsPriv eos.Bool `json:"is_priv"` }
SetPriv sets privileged account status. Used in the bios boot mechanism.
type SetProds ¶
type SetProds struct {
Schedule []ProducerKey `json:"schedule"`
}
SetProds is present in `eosio.bios` contract. Used only at boot time.
type SetRAMRate ¶
type SetRAMRate struct {
BytesPerBlock uint16 `json:"bytes_per_block"`
}
SetRAMRate represents the system contract's `setramrate` action.
type Setalimits ¶
type Setalimits struct { Account eos.AccountName `json:"account"` RAMBytes int64 `json:"ram_bytes"` NetWeight int64 `json:"net_weight"` CPUWeight int64 `json:"cpu_weight"` }
Setalimits represents the `eosio.system::setalimit` action.
type UndelegateBW ¶
type UndelegateBW struct { From eos.AccountName `json:"from"` Receiver eos.AccountName `json:"receiver"` UnstakeNet eos.Asset `json:"unstake_net_quantity"` UnstakeCPU eos.Asset `json:"unstake_cpu_quantity"` }
UndelegateBW represents the `eosio.system::undelegatebw` action.
type UnlinkAuth ¶
type UnlinkAuth struct { Account eos.AccountName `json:"account"` Code eos.AccountName `json:"code"` Type eos.ActionName `json:"type"` }
UnlinkAuth represents the native `unlinkauth` action, through the system contract.
type UnregProducer ¶
type UnregProducer struct {
Producer eos.AccountName `json:"producer"`
}
UnregProducer represents the `eosio.system::unregprod` action
type UpdateAuth ¶
type UpdateAuth struct { Account eos.AccountName `json:"account"` Permission eos.PermissionName `json:"permission"` Parent eos.PermissionName `json:"parent"` Auth eos.Authority `json:"auth"` }
UpdateAuth represents the hard-coded `updateauth` action.
If you change the `active` permission, `owner` is the required parent.
If you change the `owner` permission, there should be no parent.
type VoteProducer ¶
type VoteProducer struct { Voter eos.AccountName `json:"voter"` Proxy eos.AccountName `json:"proxy"` Producers []eos.AccountName `json:"producers"` }
VoteProducer represents the `eosio.system::voteproducer` action
Source Files ¶
- bidname.go
- buyram.go
- buyrambytes.go
- canceldelay.go
- claimrewards.go
- delegatebw.go
- deleteauth.go
- init.go
- linkauth.go
- newaccount.go
- nonce.go
- providebw.go
- refund.go
- regproducer.go
- regproxy.go
- rmvproducer.go
- sellram.go
- setalimits.go
- setcode.go
- setpriv.go
- setprods.go
- setram.go
- setramrate.go
- types.go
- undelegatebw.go
- unlinkauth.go
- unregprod.go
- updateauth.go
- voteproducer.go