{"modulePath":"github.com/ChainCoderX/eos-go","version":"v0.8.16","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package system\n\n## Variables\n\n```go\nvar AN = eos.AN\n```\n\n```go\nvar ActN = eos.ActN\n```\n\n```go\nvar PN = eos.PN\n```\n\n## Functions\n\n```go\nfunc NewBidname(bidder, newname eos.AccountName, bid eos.Asset) *eos.Action\n```\n\n```go\nfunc NewBuyRAM(payer, receiver eos.AccountName, eosQuantity uint64) *eos.Action\n```\n\n```go\nfunc NewBuyRAMBytes(payer, receiver eos.AccountName, bytes uint32) *eos.Action\n```\nNewBuyRAMBytes will buy at current market price a given number of bytes of RAM, and grant them to the \\`receiver\\` account.\n\n```go\nfunc NewCancelDelay(cancelingAuth eos.PermissionLevel, transactionID eos.Checksum256) *eos.Action\n```\nNewCancelDelay creates an action from the \\`eosio.system\\` contract called \\`canceldelay\\`.\n\n\\`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.\n\n```go\nfunc NewClaimRewards(owner eos.AccountName) *eos.Action\n```\nNewClaimRewards will buy at current market price a given number of bytes of RAM, and grant them to the \\`receiver\\` account.\n\n```go\nfunc NewCustomNewAccount(creator, newAccount eos.AccountName, owner, active eos.Authority) *eos.Action\n```\nNewCustomNewAccount returns a \\`newaccount\\` action that lives on the \\`eosio.system\\` contract. You can specify your own \\`owner\\` and \\`active\\` permissions.\n\n```go\nfunc NewDelegateBW(from, receiver eos.AccountName, stakeCPU, stakeNet eos.Asset, transfer bool) *eos.Action\n```\nNewDelegateBW returns a \\`delegatebw\\` action that lives on the \\`eosio.system\\` contract.\n\n```go\nfunc NewDelegatedNewAccount(creator, newAccount eos.AccountName, delegatedTo eos.AccountName) *eos.Action\n```\nNewDelegatedNewAccount 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.\n\n```go\nfunc NewDeleteAuth(account eos.AccountName, permission eos.PermissionName) *eos.Action\n```\nNewDeleteAuth creates an action from the \\`eosio.system\\` contract called \\`deleteauth\\`.\n\nYou 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.\n\n```go\nfunc NewLinkAuth(account, code eos.AccountName, actionName eos.ActionName, requiredPermission eos.PermissionName) *eos.Action\n```\nNewLinkAuth creates an action from the \\`eosio.system\\` contract called \\`linkauth\\`.\n\n\\`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.\n\n```go\nfunc NewNewAccount(creator, newAccount eos.AccountName, publicKey ecc.PublicKey) *eos.Action\n```\nNewNewAccount returns a \\`newaccount\\` action that lives on the \\`eosio.system\\` contract.\n\n```go\nfunc NewNonce(nonce string) *eos.Action\n```\nNewNonce 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.\n\n```go\nfunc NewRefund(owner eos.AccountName) *eos.Action\n```\nNewRefund returns a \\`refund\\` action that lives on the \\`eosio.system\\` contract.\n\n```go\nfunc NewRegProducer(producer eos.AccountName, producerKey ecc.PublicKey, url string, location uint16) *eos.Action\n```\nNewRegProducer returns a \\`regproducer\\` action that lives on the \\`eosio.system\\` contract.\n\n```go\nfunc NewRegProxy(proxy eos.AccountName, isProxy bool) *eos.Action\n```\nNewRegProxy returns a \\`regproxy\\` action that lives on the \\`eosio.system\\` contract.\n\n```go\nfunc NewRemoveProducer(producer eos.AccountName) *eos.Action\n```\nNewRemoveProducer 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\\`.\n\n```go\nfunc NewSellRAM(account eos.AccountName, bytes uint64) *eos.Action\n```\nNewSellRAM will sell at current market price a given number of bytes of RAM.\n\n```go\nfunc NewSetABI(account eos.AccountName, abiPath string) (out *eos.Action, err error)\n```\n\n```go\nfunc NewSetCode(account eos.AccountName, wasmPath string) (out *eos.Action, err error)\n```\n\n```go\nfunc NewSetCodeTx(account eos.AccountName, wasmPath, abiPath string) (out *eos.Transaction, err error)\n```\nNewSetCodeTx is \\_deprecated\\_. Use NewSetContract instead, and build your transaction yourself.\n\n```go\nfunc NewSetContract(account eos.AccountName, wasmPath, abiPath string) (out []*eos.Action, err error)\n```\n\n```go\nfunc NewSetPriv(account eos.AccountName) *eos.Action\n```\nNewSetPriv 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.\n\n```go\nfunc NewSetProds(producers []ProducerKey) *eos.Action\n```\nNewSetPriv 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.\n\n```go\nfunc NewSetRAM(maxRAMSize uint64) *eos.Action\n```\n\n```go\nfunc NewSetRAMRate(bytesPerBlock uint16) *eos.Action\n```\n\n```go\nfunc NewSetalimits(account eos.AccountName, ramBytes, netWeight, cpuWeight int64) *eos.Action\n```\nNewSetalimits sets the account limits. Requires signature from \\`eosio@active\\` account.\n\n```go\nfunc NewUndelegateBW(from, receiver eos.AccountName, unstakeCPU, unstakeNet eos.Asset) *eos.Action\n```\nNewUndelegateBW returns a \\`undelegatebw\\` action that lives on the \\`eosio.system\\` contract.\n\n```go\nfunc NewUnlinkAuth(account, code eos.AccountName, actionName eos.ActionName) *eos.Action\n```\nNewUnlinkAuth creates an action from the \\`eosio.system\\` contract called \\`unlinkauth\\`.\n\n\\`unlinkauth\\` detaches a previously set permission from a \\`code::actionName\\`. See \\`linkauth\\`.\n\n```go\nfunc NewUnregProducer(producer eos.AccountName) *eos.Action\n```\nNewUnregProducer returns a \\`unregprod\\` action that lives on the \\`eosio.system\\` contract.\n\n```go\nfunc NewUpdateAuth(account eos.AccountName, permission, parent eos.PermissionName, authority eos.Authority, usingPermission eos.PermissionName) *eos.Action\n```\nNewUpdateAuth creates an action from the \\`eosio.system\\` contract called \\`updateauth\\`.\n\nusingPermission needs to be \\`owner\\` if you want to modify the \\`owner\\` authorization, otherwise \\`active\\` will do for the rest.\n\n```go\nfunc NewVoteProducer(voter eos.AccountName, proxy eos.AccountName, producers ...eos.AccountName) *eos.Action\n```\nNewNonce 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.\n\n## Types\n\n```go\ntype Bidname struct {\n\tBidder  eos.AccountName `json:\"bidder\"`\n\tNewname eos.AccountName `json:\"newname\"`\n\tBid     eos.Asset       `json:\"bid\"` // specified in EOS\n}\n```\nBidname represents the \\`eosio.system\\_contract::bidname\\` action.\n\n```go\ntype BlockchainParameters struct {\n\tMaxBlockNetUsage               eos.Uint64 `json:\"max_block_net_usage\"`\n\tTargetBlockNetUsagePct         uint32     `json:\"target_block_net_usage_pct\"`\n\tMaxTransactionNetUsage         uint32     `json:\"max_transaction_net_usage\"`\n\tBasePerTransactionNetUsage     uint32     `json:\"base_per_transaction_net_usage\"`\n\tNetUsageLeeway                 uint32     `json:\"net_usage_leeway\"`\n\tContextFreeDiscountNetUsageNum uint32     `json:\"context_free_discount_net_usage_num\"`\n\tContextFreeDiscountNetUsageDen uint32     `json:\"context_free_discount_net_usage_den\"`\n\tMaxBlockCPUUsage               uint32     `json:\"max_block_cpu_usage\"`\n\tTargetBlockCPUUsagePct         uint32     `json:\"target_block_cpu_usage_pct\"`\n\tMaxTransactionCPUUsage         uint32     `json:\"max_transaction_cpu_usage\"`\n\tMinTransactionCPUUsage         uint32     `json:\"min_transaction_cpu_usage\"`\n\tMaxTransactionLifetime         uint32     `json:\"max_transaction_lifetime\"`\n\tDeferredTrxExpirationWindow    uint32     `json:\"deferred_trx_expiration_window\"`\n\tMaxTransactionDelay            uint32     `json:\"max_transaction_delay\"`\n\tMaxInlineActionSize            uint32     `json:\"max_inline_action_size\"`\n\tMaxInlineActionDepth           uint16     `json:\"max_inline_action_depth\"`\n\tMaxAuthorityDepth              uint16     `json:\"max_authority_depth\"`\n\tMaxGeneratedTransactionCount   uint32     `json:\"max_generated_transaction_count\"`\n}\n```\nBlockchainParameters are all the params we can set through \\`setparams\\`.\n\n```go\ntype BuyRAM struct {\n\tPayer    eos.AccountName `json:\"payer\"`\n\tReceiver eos.AccountName `json:\"receiver\"`\n\tQuantity eos.Asset       `json:\"quant\"` // specified in EOS\n}\n```\nBuyRAM represents the \\`eosio.system::buyram\\` action.\n\n```go\ntype BuyRAMBytes struct {\n\tPayer    eos.AccountName `json:\"payer\"`\n\tReceiver eos.AccountName `json:\"receiver\"`\n\tBytes    uint32          `json:\"bytes\"`\n}\n```\nBuyRAMBytes represents the \\`eosio.system::buyrambytes\\` action.\n\n```go\ntype CancelDelay struct {\n\tCancelingAuth eos.PermissionLevel `json:\"canceling_auth\"`\n\tTransactionID eos.Checksum256     `json:\"trx_id\"`\n}\n```\nCancelDelay represents the native \\`canceldelay\\` action, through the system contract.\n\n```go\ntype ClaimRewards struct {\n\tOwner eos.AccountName `json:\"owner\"`\n}\n```\nClaimRewards represents the \\`eosio.system::claimrewards\\` action.\n\n```go\ntype DelegateBW struct {\n\tFrom     eos.AccountName `json:\"from\"`\n\tReceiver eos.AccountName `json:\"receiver\"`\n\tStakeNet eos.Asset       `json:\"stake_net\"`\n\tStakeCPU eos.Asset       `json:\"stake_cpu\"`\n\tTransfer eos.Bool        `json:\"transfer\"`\n}\n```\nDelegateBW represents the \\`eosio.system::delegatebw\\` action.\n\n```go\ntype DeleteAuth struct {\n\tAccount    eos.AccountName    `json:\"account\"`\n\tPermission eos.PermissionName `json:\"permission\"`\n}\n```\nDeleteAuth represents the native \\`deleteauth\\` action, reachable through the \\`eosio.system\\` contract.\n\n```go\ntype EOSIOGlobalState struct {\n\tBlockchainParameters\n\tTotalStorageBytesReserved eos.Uint64 `json:\"total_storage_bytes_reserved\"`\n\tTotalStorageStake         eos.Uint64 `json:\"total_storage_stake\"`\n\tPaymentPerBlock           eos.Uint64 `json:\"payment_per_block\"`\n}\n```\n\n```go\ntype LinkAuth struct {\n\tAccount     eos.AccountName    `json:\"account\"`\n\tCode        eos.AccountName    `json:\"code\"`\n\tType        eos.ActionName     `json:\"type\"`\n\tRequirement eos.PermissionName `json:\"requirement\"`\n}\n```\nLinkAuth represents the native \\`linkauth\\` action, through the system contract.\n\n```go\ntype NewAccount struct {\n\tCreator eos.AccountName `json:\"creator\"`\n\tName    eos.AccountName `json:\"name\"`\n\tOwner   eos.Authority   `json:\"owner\"`\n\tActive  eos.Authority   `json:\"active\"`\n}\n```\nNewAccount represents a \\`newaccount\\` action on the \\`eosio.system\\` contract. It is one of the rare ones to be hard-coded into the blockchain.\n\n```go\ntype Nonce struct {\n\tValue string `json:\"value\"`\n}\n```\nNonce 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.\n\n```go\ntype ProducerKey struct {\n\tProducerName    eos.AccountName `json:\"producer_name\"`\n\tBlockSigningKey ecc.PublicKey   `json:\"block_signing_key\"`\n}\n```\n\n```go\ntype Refund struct {\n\tOwner eos.AccountName `json:\"owner\"`\n}\n```\nRefund represents the \\`eosio.system::refund\\` action\n\n```go\ntype RegProducer struct {\n\tProducer    eos.AccountName `json:\"producer\"`\n\tProducerKey ecc.PublicKey   `json:\"producer_key\"`\n\tURL         string          `json:\"url\"`\n\tLocation    uint16          `json:\"location\"` // what,s the meaning of that anyway ?\n}\n```\nRegProducer represents the \\`eosio.system::regproducer\\` action\n\n```go\ntype RegProxy struct {\n\tProxy   eos.AccountName `json:\"proxy\"`\n\tIsProxy bool            `json:\"isproxy\"`\n}\n```\nRegProxy represents the \\`eosio.system::regproxy\\` action\n\n```go\ntype RemoveProducer struct {\n\tProducer eos.AccountName `json:\"producer\"`\n}\n```\nRemoveProducer represents the \\`eosio.system::rmvproducer\\` action\n\n```go\ntype SellRAM struct {\n\tAccount eos.AccountName `json:\"account\"`\n\tBytes   uint64          `json:\"bytes\"`\n}\n```\nSellRAM represents the \\`eosio.system::sellram\\` action.\n\n```go\ntype SetABI struct {\n\tAccount eos.AccountName `json:\"account\"`\n\tABI     eos.HexBytes    `json:\"abi\"`\n}\n```\nSetABI represents the hard-coded \\`setabi\\` action.\n\n```go\ntype SetCode struct {\n\tAccount   eos.AccountName `json:\"account\"`\n\tVMType    byte            `json:\"vmtype\"`\n\tVMVersion byte            `json:\"vmversion\"`\n\tCode      eos.HexBytes    `json:\"code\"`\n}\n```\nSetCode represents the hard-coded \\`setcode\\` action.\n\n```go\ntype SetPriv struct {\n\tAccount eos.AccountName `json:\"account\"`\n\tIsPriv  eos.Bool        `json:\"is_priv\"`\n}\n```\nSetPriv sets privileged account status. Used in the bios boot mechanism.\n\n```go\ntype SetProds struct {\n\tSchedule []ProducerKey `json:\"schedule\"`\n}\n```\nSetProds is present in \\`eosio.bios\\` contract. Used only at boot time.\n\n```go\ntype SetRAM struct {\n\tMaxRAMSize eos.Uint64 `json:\"max_ram_size\"`\n}\n```\nSetRAM represents the hard-coded \\`setram\\` action.\n\n```go\ntype SetRAMRate struct {\n\tBytesPerBlock uint16 `json:\"bytes_per_block\"`\n}\n```\nSetRAMRate represents the system contract's \\`setramrate\\` action.\n\n```go\ntype Setalimits struct {\n\tAccount   eos.AccountName `json:\"account\"`\n\tRAMBytes  int64           `json:\"ram_bytes\"`\n\tNetWeight int64           `json:\"net_weight\"`\n\tCPUWeight int64           `json:\"cpu_weight\"`\n}\n```\nSetalimits represents the \\`eosio.system::setalimit\\` action.\n\n```go\ntype UndelegateBW struct {\n\tFrom       eos.AccountName `json:\"from\"`\n\tReceiver   eos.AccountName `json:\"receiver\"`\n\tUnstakeNet eos.Asset       `json:\"unstake_net_quantity\"`\n\tUnstakeCPU eos.Asset       `json:\"unstake_cpu_quantity\"`\n}\n```\nUndelegateBW represents the \\`eosio.system::undelegatebw\\` action.\n\n```go\ntype UnlinkAuth struct {\n\tAccount eos.AccountName `json:\"account\"`\n\tCode    eos.AccountName `json:\"code\"`\n\tType    eos.ActionName  `json:\"type\"`\n}\n```\nUnlinkAuth represents the native \\`unlinkauth\\` action, through the system contract.\n\n```go\ntype UnregProducer struct {\n\tProducer eos.AccountName `json:\"producer\"`\n}\n```\nUnregProducer represents the \\`eosio.system::unregprod\\` action\n\n```go\ntype UpdateAuth struct {\n\tAccount    eos.AccountName    `json:\"account\"`\n\tPermission eos.PermissionName `json:\"permission\"`\n\tParent     eos.PermissionName `json:\"parent\"`\n\tAuth       eos.Authority      `json:\"auth\"`\n}\n```\nUpdateAuth represents the hard-coded \\`updateauth\\` action.\n\nIf you change the \\`active\\` permission, \\`owner\\` is the required parent.\n\nIf you change the \\`owner\\` permission, there should be no parent.\n\n```go\ntype VoteProducer struct {\n\tVoter     eos.AccountName   `json:\"voter\"`\n\tProxy     eos.AccountName   `json:\"proxy\"`\n\tProducers []eos.AccountName `json:\"producers\"`\n}\n```\nVoteProducer represents the \\`eosio.system::voteproducer\\` action\n\n","path":"github.com/ChainCoderX/eos-go/system","name":"system","synopsis":"","isRedistributable":true}
