Documentation ¶
Index ¶
- func ArrayToChaincodeArgs(args []string) [][]byte
- func ComputeSHA256(data []byte) (hash []byte)
- func ComputeSHA3256(data []byte) (hash []byte)
- func ConcatenateBytes(data ...[]byte) []byte
- func CreateUtcTimestamp() *timestamp.Timestamp
- func ExtractRemoteAddress(ctx context.Context) string
- func FindMissingElements(all []string, some []string) (delta []string)
- func GenerateBytesUUID() []byte
- func GenerateHashFromSignature(path string, args []byte) []byte
- func GenerateIDWithAlg(customIDgenAlg string, payload []byte) (string, error)
- func GenerateIDfromTxSHAHash(payload []byte) string
- func GenerateIntUUID() *big.Int
- func GenerateUUID() string
- func GetSysCCVersion() string
- func GetTestChainID() string
- func GetTestOrgID() string
- func ToChaincodeArgs(args ...string) [][]byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayToChaincodeArgs ¶
ArrayToChaincodeArgs converts array of string args to array of []byte args
func ComputeSHA256 ¶
ComputeSHA256 returns SHA2-256 on data
func ComputeSHA3256 ¶
ComputeSHA3256 returns SHA3-256 on data
func ConcatenateBytes ¶
ConcatenateBytes is useful for combining multiple arrays of bytes, especially for signatures or digests over multiple fields
func CreateUtcTimestamp ¶
CreateUtcTimestamp returns a google/protobuf/Timestamp in UTC
func ExtractRemoteAddress ¶
func FindMissingElements ¶
FindMissingElements identifies the elements of the first slice that are not present in the second The second slice is expected to be a subset of the first slice
func GenerateBytesUUID ¶
func GenerateBytesUUID() []byte
GenerateBytesUUID returns a UUID based on RFC 4122 returning the generated bytes
func GenerateHashFromSignature ¶
GenerateHashFromSignature returns a hash of the combined parameters
func GenerateIDWithAlg ¶
GenerateIDWithAlg generates an ID using a custom algorithm
func GenerateIDfromTxSHAHash ¶
GenerateIDfromTxSHAHash generates SHA256 hash using Tx payload
func GenerateIntUUID ¶
GenerateIntUUID returns a UUID based on RFC 4122 returning a big.Int
func GetSysCCVersion ¶
func GetSysCCVersion() string
GetSysCCVersion returns the version of all system chaincodes This needs to be revisited on policies around system chaincode "upgrades" from user and relationship with "fabric" upgrade. For now keep it simple and use the fabric's version stamp
func GetTestChainID ¶
func GetTestChainID() string
GetTestChainID returns the CHAINID constant in use by orderer
func GetTestOrgID ¶
func GetTestOrgID() string
GetTestOrgID returns the ORGID constant in use by gossip join message
func ToChaincodeArgs ¶
ToChaincodeArgs converts string args to []byte args
Types ¶
This section is empty.