code: func (s *Signatory) RealisePublicKey(getter acmstate.AccountGetter) error {
  	const errPrefix = "could not realise public key for signatory"
  	if s.PublicKey == nil {
  		if s.Address == nil {
  			return fmt.Errorf("%s: address not provided", errPrefix)
  		}
  		acc, err := getter.GetAccount(*s.Address)
  		if err != nil {
  			return fmt.Errorf("%s: could not get account %v: %v", errPrefix, *s.Address, err)
  		}
  		publicKey := acc.PublicKey
  		s.PublicKey = &publicKey
  	}
  	if !s.PublicKey.IsValid() {
  		return fmt.Errorf("%s: public key %v is invalid", errPrefix, *s.PublicKey)
  	}
  	address := s.PublicKey.GetAddress()
  	if s.Address == nil {
  		s.Address = &address
  	} else if address != *s.Address {
  		return fmt.Errorf("address %v provided with signatory does not match address generated from "+
  			"public key %v", *s.Address, address)
  	}
  	return nil
  }
docs: // Attempts to 'realise' the PublicKey and Address of a Signatory possibly referring to state
  // in the case where the Signatory contains an Address by no PublicKey. Checks consistency in other
  // cases, possibly generating the Address from the PublicKey