fabric-samples/off_chain_data/application-go/parser/identity.go
Stanislav Jakuschevskij 2c43e03591
Encapsulate block parser in a package
Created parser, contract and utils packages and extracted each piece of
functionality into its own files. Removed "Get" prefix from methods and
changed return values from interfaces to structs.

Signed-off-by: Stanislav Jakuschevskij <stas@two-giants.com>
2025-02-24 13:14:47 +01:00

16 lines
332 B
Go

package parser
import "github.com/hyperledger/fabric-protos-go-apiv2/msp"
// Implements identity.Identity Interface
type identityImpl struct {
creator *msp.SerializedIdentity
}
func (i *identityImpl) MspID() string {
return i.creator.GetMspid()
}
func (i *identityImpl) Credentials() []byte {
return i.creator.GetIdBytes()
}