Documentation ¶
Index ¶
- Variables
- func AclToXchain(acl *protos.Acl) *pb.Acl
- func BalanceDetailToXchain(detail *xldgpb.BalanceDetailInfo) *pb.TokenFrozenDetail
- func BalanceDetailsToXchain(details []*xldgpb.BalanceDetailInfo) ([]*pb.TokenFrozenDetail, error)
- func BlockToXchain(block *xldgpb.InternalBlock) *pb.InternalBlock
- func BlockToXledger(block *pb.InternalBlock) *xldgpb.InternalBlock
- func ComputeTxSign(cryptoClient crypto_base.CryptoClient, tx *pb.Transaction, jsonSK []byte) ([]byte, error)
- func ContractStatusListToXchain(contractStatusList []*protos.ContractStatus) ([]*pb.ContractStatus, error)
- func ContractStatusToXchain(contractStatus *protos.ContractStatus) *pb.ContractStatus
- func ConvertEventSubType(typ pb.SubscribeType) protos.SubscribeType
- func ConvertInvokeReq(reqs []*pb.InvokeRequest) ([]*protos.InvokeRequest, error)
- func ConvertInvokeResp(resp *protos.InvokeResponse) *pb.InvokeResponse
- func LedgerMetaToXchain(meta *xldgpb.LedgerMeta) *pb.LedgerMeta
- func MakeTxDigestHash(tx *pb.Transaction) ([]byte, error)
- func MakeTxId(tx *pb.Transaction) ([]byte, error)
- func PeerInfoToStrings(info protos.PeerInfo) []string
- func TxToXchain(tx *xldgpb.Transaction) *pb.Transaction
- func TxToXledger(tx *pb.Transaction) *xldgpb.Transaction
- func UtxoListToXchain(utxoList []*xldgpb.Utxo) ([]*pb.Utxo, error)
- func UtxoMetaToXchain(meta *xldgpb.UtxoMeta) *pb.UtxoMeta
- func UtxoRecordToXchain(record *xldgpb.UtxoRecord) *pb.UtxoRecord
- func UtxoToXchain(utxo *xldgpb.Utxo) *pb.Utxo
- func UtxoToXledger(utxo *pb.Utxo) *xldgpb.Utxo
Constants ¶
This section is empty.
Variables ¶
View Source
var StdErrToXchainErrMap = map[int]pb.XChainErrorEnum{ ecom.ErrSuccess.Code: pb.XChainErrorEnum_SUCCESS, ecom.ErrInternal.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrUnknown.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrForbidden.Code: pb.XChainErrorEnum_CONNECT_REFUSE, ecom.ErrUnauthorized.Code: pb.XChainErrorEnum_CONNECT_REFUSE, ecom.ErrParameter.Code: pb.XChainErrorEnum_CONNECT_REFUSE, ecom.ErrNewEngineCtxFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrNotEngineType.Code: pb.XChainErrorEnum_CONNECT_REFUSE, ecom.ErrLoadEngConfFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrNewLogFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrNewChainCtxFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrChainExist.Code: pb.XChainErrorEnum_CONNECT_REFUSE, ecom.ErrChainNotExist.Code: pb.XChainErrorEnum_BLOCKCHAIN_NOTEXIST, ecom.ErrChainAlreadyExist.Code: pb.XChainErrorEnum_CONNECT_REFUSE, ecom.ErrChainStatus.Code: pb.XChainErrorEnum_NOT_READY_ERROR, ecom.ErrRootChainNotExist.Code: pb.XChainErrorEnum_CONNECT_REFUSE, ecom.ErrLoadChainFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrContractNewCtxFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrContractInvokeFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrContractNewSandboxFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrTxVerifyFailed.Code: pb.XChainErrorEnum_TX_VERIFICATION_ERROR, ecom.ErrTxAlreadyExist.Code: pb.XChainErrorEnum_TX_DUPLICATE_ERROR, ecom.ErrTxNotExist.Code: pb.XChainErrorEnum_TX_NOT_FOUND_ERROR, ecom.ErrTxNotEnough.Code: pb.XChainErrorEnum_NOT_ENOUGH_UTXO_ERROR, ecom.ErrSubmitTxFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrBlockNotExist.Code: pb.XChainErrorEnum_BLOCK_EXIST_ERROR, ecom.ErrProcBlockFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrNewNetEventFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrNewNetworkFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrSendMessageFailed.Code: pb.XChainErrorEnum_UNKNOW_ERROR, ecom.ErrNetworkNoResponse.Code: pb.XChainErrorEnum_UNKNOW_ERROR, }
错误映射配置
Functions ¶
func BalanceDetailToXchain ¶
func BalanceDetailToXchain(detail *xldgpb.BalanceDetailInfo) *pb.TokenFrozenDetail
func BalanceDetailsToXchain ¶
func BalanceDetailsToXchain(details []*xldgpb.BalanceDetailInfo) ([]*pb.TokenFrozenDetail, error)
func BlockToXchain ¶
func BlockToXchain(block *xldgpb.InternalBlock) *pb.InternalBlock
为了完全兼容老版本pb结构,转换区块结构
func BlockToXledger ¶
func BlockToXledger(block *pb.InternalBlock) *xldgpb.InternalBlock
为了完全兼容老版本pb结构,转换区块结构
func ComputeTxSign ¶
func ComputeTxSign(cryptoClient crypto_base.CryptoClient, tx *pb.Transaction, jsonSK []byte) ([]byte, error)
适配原结构签名
func ContractStatusListToXchain ¶
func ContractStatusListToXchain(contractStatusList []*protos.ContractStatus) ([]*pb.ContractStatus, error)
func ContractStatusToXchain ¶
func ContractStatusToXchain(contractStatus *protos.ContractStatus) *pb.ContractStatus
func ConvertEventSubType ¶
func ConvertEventSubType(typ pb.SubscribeType) protos.SubscribeType
func ConvertInvokeReq ¶
func ConvertInvokeReq(reqs []*pb.InvokeRequest) ([]*protos.InvokeRequest, error)
func ConvertInvokeResp ¶
func ConvertInvokeResp(resp *protos.InvokeResponse) *pb.InvokeResponse
func LedgerMetaToXchain ¶
func LedgerMetaToXchain(meta *xldgpb.LedgerMeta) *pb.LedgerMeta
func MakeTxDigestHash ¶
func MakeTxDigestHash(tx *pb.Transaction) ([]byte, error)
func PeerInfoToStrings ¶
func UtxoRecordToXchain ¶
func UtxoRecordToXchain(record *xldgpb.UtxoRecord) *pb.UtxoRecord
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.