// InvokeCreate registers a verified organization with the on-chain registry
// and stores the proof on-chain
InvokeCreate registers a verified organization with the on-chain registry
and stores the proof on-chain
// InvokeCreate registers a verified organization with the on - chain registry // and stores the proof on - chain
func (org *Organization) InvokeCreate() (*VerifiedOrganization, error) {
	if org.Consortium == "" || org.Environment == "" {
		if err := org.populateServiceTargets(); err != nil {
			return nil, err
		}
	}
	signedPayload, err := org.createSignedRequestForRegistration()
	if err != nil {
		return nil, err
	}
	client := Utils().getAPIClient()
	var verifiedOrg VerifiedOrganization
	response, err := client.R().SetBody(signedPayload).SetResult(&verifiedOrg).Post("/identity")
	err = Utils().validateCreateResponse(response, err, "identity")
	return &verifiedOrg, err
}
func ( org * Organization ) InvokeCreate ( ) ( * VerifiedOrganization , error ) { if org . Consortium == " " || org . Environment == " " { if err := org . populateServiceTargets ( ) ; err != nil { return nil , err } } signedPayload , err := org . createSignedRequestForRegistration ( ) if err != nil { return nil , err } client := Utils ( ) . getAPIClient ( ) var verifiedOrg VerifiedOrganization response , err := client . R ( ) . SetBody ( signedPayload ) . SetResult ( & verifiedOrg ) . Post ( " " ) err = Utils ( ) . validateCreateResponse ( response , err , " " ) return & verifiedOrg , err }
InvokeCreate registers a verified organization with the on-chain registry
and stores the proof on-chain
InvokeCreate registers a verified organization with the on - chain registry and stores the proof on - chain
// if consortium or environment is not set, retrieve it from the service definition // sign payload