func ChannelKey(client, agent HexString, block uint32,
	offeringHash HexString) ([]byte, error) {
	clientAddr, err := HexToAddress(client)
	if err != nil {
		return nil, err
	}

	agentAddr, err := HexToAddress(agent)
	if err != nil {
		return nil, err
	}

	hash, err := base64.URLEncoding.DecodeString(
		strings.TrimSpace(string(offeringHash)))
	if err != nil {
		return nil, err
	}

	blockBytes := Uint32ToBytes(block)

	return crypto.Keccak256(clientAddr.Bytes(),
		agentAddr.Bytes(), blockBytes[:],
		common.BytesToHash(hash).Bytes()), nil
}
func ChannelKey(client, agent HexString, block uint32,
	offeringHash HexString) ([]byte, error) {
	clientAddr, err := HexToAddress(client)
	if err != nil {
		return nil, err
	}

	agentAddr, err := HexToAddress(agent)
	if err != nil {
		return nil, err
	}

	hash, err := base64.URLEncoding.DecodeString(
		strings.TrimSpace(string(offeringHash)))
	if err != nil {
		return nil, err
	}

	blockBytes := Uint32ToBytes(block)

	return crypto.Keccak256(clientAddr.Bytes(),
		agentAddr.Bytes(), blockBytes[:],
		common.BytesToHash(hash).Bytes()), nil
}
func ChannelKey ( client , agent HexString , block uint32 , offeringHash HexString ) ( [ ] byte , error ) { clientAddr , err := HexToAddress ( client ) if err != nil { return nil , err } agentAddr , err := HexToAddress ( agent ) if err != nil { return nil , err } hash , err := base64 . URLEncoding . DecodeString ( strings . TrimSpace ( string ( offeringHash ) ) ) if err != nil { return nil , err } blockBytes := Uint32ToBytes ( block ) return crypto . Keccak256 ( clientAddr . Bytes ( ) , agentAddr . Bytes ( ) , blockBytes [ : ] , common . BytesToHash ( hash ) . Bytes ( ) ) , nil }
// ChannelKey returns the unique channel identifier
// used in a Privatix Service Contract.
ChannelKey returns the unique channel identifier used in a Privatix Service Contract .