Documentation ¶
Overview ¶
manage_assets is a chaincode that contains all the code related to asset management operations (e.g., Lock, Unlock, Claim) and any related utility functions
Index ¶
- func CheckAccessIfRelayClient(stub shim.ChaincodeStubInterface) (bool, error)
- func ClaimRemoteAsset(ctx contractapi.TransactionContextInterface, ...) ([]byte, error)
- func GetAssetClaimStatus(ctx contractapi.TransactionContextInterface, ...) ([]byte, string, string, error)
- func GetAssetPledgeDetails(ctx contractapi.TransactionContextInterface, pledgeId string) ([]byte, string, error)
- func GetAssetPledgeStatus(ctx contractapi.TransactionContextInterface, ...) ([]byte, string, string, error)
- func GetECertOfTxCreatorBase64(ctx contractapi.TransactionContextInterface) (string, error)
- func GetInteropChaincodeIDKey() string
- func GetLocalChaincodeID(stub shim.ChaincodeStubInterface) (string, error)
- func GetLocalChaincodeIDKey() string
- func GetLocalNetworkIDKey() string
- func IsCallerInteropChaincode(stub shim.ChaincodeStubInterface) (bool, error)
- func IsClientIINAgent(ctx contractapi.TransactionContextInterface) (bool, error)
- func IsClientNetworkAdmin(ctx contractapi.TransactionContextInterface) (bool, error)
- func IsClientRelay(stub shim.ChaincodeStubInterface) (bool, error)
- func PledgeAsset(ctx contractapi.TransactionContextInterface, assetJSON []byte, ...) (string, error)
- func ReclaimAsset(ctx contractapi.TransactionContextInterface, ...) ([]byte, []byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAccessIfRelayClient ¶
func CheckAccessIfRelayClient(stub shim.ChaincodeStubInterface) (bool, error)
Access guard for Weaver relay requests: return 'true' only if access should be permitted
func ClaimRemoteAsset ¶
func ClaimRemoteAsset(ctx contractapi.TransactionContextInterface, pledgeId, remoteNetworkId, pledgeBytes64 string) ([]byte, error)
ClaimRemoteAsset gets ownership of an asset transferred from a different ledger/network.
func GetAssetClaimStatus ¶
func GetAssetClaimStatus(ctx contractapi.TransactionContextInterface, pledgeId, recipientCert, pledger, pledgerNetworkId string, pledgeExpiryTimeSecs uint64, blankAssetJSON []byte) ([]byte, string, string, error)
GetAssetClaimStatus returns the asset claim status and present time (of invocation).
func GetAssetPledgeDetails ¶
func GetAssetPledgeDetails(ctx contractapi.TransactionContextInterface, pledgeId string) ([]byte, string, error)
GetAssetPledgeDetails returns the asset pledge details for local network.
func GetAssetPledgeStatus ¶
func GetAssetPledgeStatus(ctx contractapi.TransactionContextInterface, pledgeId, recipientNetworkId, recipientCert string, blankAssetJSON []byte) ([]byte, string, string, error)
GetAssetPledgeStatus returns the asset pledge status.
func GetECertOfTxCreatorBase64 ¶
func GetECertOfTxCreatorBase64(ctx contractapi.TransactionContextInterface) (string, error)
func GetInteropChaincodeIDKey ¶
func GetInteropChaincodeIDKey() string
func GetLocalChaincodeID ¶
func GetLocalChaincodeID(stub shim.ChaincodeStubInterface) (string, error)
GetLocalChaincodeID extracts chaincode id from stub
func GetLocalChaincodeIDKey ¶
func GetLocalChaincodeIDKey() string
func GetLocalNetworkIDKey ¶
func GetLocalNetworkIDKey() string
func IsCallerInteropChaincode ¶
func IsCallerInteropChaincode(stub shim.ChaincodeStubInterface) (bool, error)
Check if the caller is the Interop Chaincode
func IsClientIINAgent ¶
func IsClientIINAgent(ctx contractapi.TransactionContextInterface) (bool, error)
Check if the calling client has an IIN Agent attribute in its signing certificate
func IsClientNetworkAdmin ¶
func IsClientNetworkAdmin(ctx contractapi.TransactionContextInterface) (bool, error)
Check if the calling client has an attribute in its signing certificate indicating that it is a privileged network administrator
func IsClientRelay ¶
func IsClientRelay(stub shim.ChaincodeStubInterface) (bool, error)
Check if the calling client has a relay attribute in its signing certificate
func PledgeAsset ¶
func PledgeAsset(ctx contractapi.TransactionContextInterface, assetJSON []byte, assetType, assetIdOrQuantity, remoteNetworkId, recipientCert string, expiryTimeSecs uint64) (string, error)
PledgeAsset locks an asset for transfer to a different ledger/network.
func ReclaimAsset ¶
func ReclaimAsset(ctx contractapi.TransactionContextInterface, pledgeId, recipientCert, remoteNetworkId, claimStatusBytes64 string) ([]byte, []byte, error)
ReclaimAsset gets back the ownership of an asset pledged for transfer to a different ledger/network.
Types ¶
This section is empty.