Class: Mpp::Methods::Tempo::Schemas::ProofCredentialPayload

Inherits:
Data
  • Object
show all
Defined in:
lib/mpp/methods/tempo/schemas.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, signature:) ⇒ ProofCredentialPayload

Returns a new instance of ProofCredentialPayload.

Raises:

  • (ArgumentError)


69
70
71
72
73
74
# File 'lib/mpp/methods/tempo/schemas.rb', line 69

def initialize(type:, signature:)
  raise ArgumentError, "type must be 'proof'" unless type == "proof"
  raise ArgumentError, "signature must be a hex string" unless signature.match?(HEX_PATTERN)

  super
end

Instance Attribute Details

#signatureObject (readonly)

Returns the value of attribute signature

Returns:

  • (Object)

    the current value of signature



68
69
70
# File 'lib/mpp/methods/tempo/schemas.rb', line 68

def signature
  @signature
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



68
69
70
# File 'lib/mpp/methods/tempo/schemas.rb', line 68

def type
  @type
end