Documentation ¶
Index ¶
- Constants
- func AssetExchangeKey(id string) string
- type AppchainManager
- func (am *AppchainManager) Appchain() *boltvm.Response
- func (am *AppchainManager) Appchains() *boltvm.Response
- func (am *AppchainManager) Audit(proposer string, isApproved int32, desc string) *boltvm.Response
- func (am *AppchainManager) CountAppchains() *boltvm.Response
- func (am *AppchainManager) CountApprovedAppchains() *boltvm.Response
- func (am *AppchainManager) DeleteAppchain(cid string) *boltvm.Response
- func (am *AppchainManager) FetchAuditRecords(id string) *boltvm.Response
- func (am *AppchainManager) GetAppchain(id string) *boltvm.Response
- func (am *AppchainManager) GetPubKeyByChainID(id string) *boltvm.Response
- func (am *AppchainManager) IsAdmin() *boltvm.Response
- func (am *AppchainManager) Register(validators string, consensusType int32, ...) *boltvm.Response
- func (am *AppchainManager) UpdateAppchain(validators string, consensusType int32, ...) *boltvm.Response
- type AssetExchange
- type AssetExchangeRecord
- type AssetExchangeStatus
- type AssetExchangeType
- type Interchain
- type InterchainManager
- func (x *InterchainManager) DeleteInterchain(id string) *boltvm.Response
- func (x *InterchainManager) GetIBTPByID(id string) *boltvm.Response
- func (x *InterchainManager) HandleIBTP(data []byte) *boltvm.Response
- func (x *InterchainManager) HandleIBTPs(data []byte) *boltvm.Response
- func (x *InterchainManager) Interchain() *boltvm.Response
- func (x *InterchainManager) ProcessIBTP(ibtp *pb.IBTP, interchain *Interchain)
- func (x *InterchainManager) Register() *boltvm.Response
- type Role
- type RuleManager
- type Store
- type TransactionInfo
- type TransactionManager
- func (t *TransactionManager) Begin(txId string) *boltvm.Response
- func (t *TransactionManager) BeginMultiTXs(globalId string, childTxIds ...string) *boltvm.Response
- func (t *TransactionManager) GetStatus(txId string) *boltvm.Response
- func (t *TransactionManager) Report(txId string, result int32) *boltvm.Response
Constants ¶
const PREFIX = "tx-"
Variables ¶
This section is empty.
Functions ¶
func AssetExchangeKey ¶ added in v1.0.1
Types ¶
type AppchainManager ¶
type AppchainManager struct { boltvm.Stub appchainMgr.AppchainManager }
func (*AppchainManager) Appchain ¶
func (am *AppchainManager) Appchain() *boltvm.Response
Appchain returns appchain info
func (*AppchainManager) Appchains ¶
func (am *AppchainManager) Appchains() *boltvm.Response
Appchains returns all appchains
func (*AppchainManager) CountAppchains ¶
func (am *AppchainManager) CountAppchains() *boltvm.Response
CountAppchains counts all appchains including approved, rejected or registered
func (*AppchainManager) CountApprovedAppchains ¶
func (am *AppchainManager) CountApprovedAppchains() *boltvm.Response
CountApprovedAppchains counts all approved appchains
func (*AppchainManager) DeleteAppchain ¶
func (am *AppchainManager) DeleteAppchain(cid string) *boltvm.Response
func (*AppchainManager) FetchAuditRecords ¶
func (am *AppchainManager) FetchAuditRecords(id string) *boltvm.Response
FetchAuditRecords fetches audit records by appchain id
func (*AppchainManager) GetAppchain ¶
func (am *AppchainManager) GetAppchain(id string) *boltvm.Response
GetAppchain returns appchain info by appchain id
func (*AppchainManager) GetPubKeyByChainID ¶
func (am *AppchainManager) GetPubKeyByChainID(id string) *boltvm.Response
GetPubKeyByChainID can get aim chain's public key using aim chain ID
func (*AppchainManager) IsAdmin ¶
func (am *AppchainManager) IsAdmin() *boltvm.Response
func (*AppchainManager) Register ¶
func (am *AppchainManager) Register(validators string, consensusType int32, chainType, name, desc, version, pubkey string) *boltvm.Response
Register appchain managers registers appchain info caller is the appchain manager address return appchain id and error
func (*AppchainManager) UpdateAppchain ¶
func (am *AppchainManager) UpdateAppchain(validators string, consensusType int32, chainType, name, desc, version, pubkey string) *boltvm.Response
UpdateAppchain updates approved appchain
type AssetExchange ¶ added in v1.0.1
func (*AssetExchange) GetStatus ¶ added in v1.0.1
func (t *AssetExchange) GetStatus(id string) *boltvm.Response
func (*AssetExchange) Init ¶ added in v1.0.1
func (t *AssetExchange) Init(from, to string, info []byte) *boltvm.Response
type AssetExchangeRecord ¶ added in v1.0.1
type AssetExchangeRecord struct { Chain0 string Chain1 string Status AssetExchangeStatus Info pb.AssetExchangeInfo }
type AssetExchangeStatus ¶ added in v1.0.1
type AssetExchangeStatus uint64
const ( ASSET_PREFIX = "asset-" AssetExchangeInit AssetExchangeStatus = 0 AssetExchangeRedeem AssetExchangeStatus = 1 AssetExchangeRefund AssetExchangeStatus = 2 )
type AssetExchangeType ¶ added in v1.0.1
type AssetExchangeType uint64
type Interchain ¶
type Interchain struct { ID string `json:"id"` InterchainCounter map[string]uint64 `json:"interchain_counter,omitempty"` ReceiptCounter map[string]uint64 `json:"receipt_counter,omitempty"` SourceReceiptCounter map[string]uint64 `json:"source_receipt_counter,omitempty"` }
func (*Interchain) UnmarshalJSON ¶
func (i *Interchain) UnmarshalJSON(data []byte) error
type InterchainManager ¶
func (*InterchainManager) DeleteInterchain ¶
func (x *InterchainManager) DeleteInterchain(id string) *boltvm.Response
func (*InterchainManager) GetIBTPByID ¶
func (x *InterchainManager) GetIBTPByID(id string) *boltvm.Response
func (*InterchainManager) HandleIBTP ¶
func (x *InterchainManager) HandleIBTP(data []byte) *boltvm.Response
func (*InterchainManager) HandleIBTPs ¶ added in v1.0.1
func (x *InterchainManager) HandleIBTPs(data []byte) *boltvm.Response
func (*InterchainManager) Interchain ¶
func (x *InterchainManager) Interchain() *boltvm.Response
Interchain returns information of the interchain count, Receipt count and SourceReceipt count
func (*InterchainManager) ProcessIBTP ¶ added in v1.0.1
func (x *InterchainManager) ProcessIBTP(ibtp *pb.IBTP, interchain *Interchain)
func (*InterchainManager) Register ¶
func (x *InterchainManager) Register() *boltvm.Response
type Role ¶
func (*Role) GetAdminRoles ¶
type RuleManager ¶
RuleManager is the contract manage validation rules
func (*RuleManager) GetRuleAddress ¶
func (r *RuleManager) GetRuleAddress(id, chainType string) *boltvm.Response
func (*RuleManager) RegisterRule ¶
func (r *RuleManager) RegisterRule(id string, address string) *boltvm.Response
SetRule can map the validation rule address with the chain id
type TransactionInfo ¶ added in v1.0.1
type TransactionInfo struct { GlobalState pb.TransactionStatus ChildTxInfo map[string]pb.TransactionStatus }
type TransactionManager ¶ added in v1.0.1
func (*TransactionManager) Begin ¶ added in v1.0.1
func (t *TransactionManager) Begin(txId string) *boltvm.Response
func (*TransactionManager) BeginMultiTXs ¶ added in v1.0.1
func (t *TransactionManager) BeginMultiTXs(globalId string, childTxIds ...string) *boltvm.Response