Class: Solana::Ruby::Kit::Keys::Signature

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/solana/ruby/kit/keys/signatures.rb

Overview

A validated base58-encoded Ed25519 signature string (64 bytes on-wire). Mirrors TypeScript:

type Signature = Brand<EncodedString<string, 'base58'>, 'Signature'>

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Signature

Returns a new instance of Signature.



21
22
23
# File 'lib/solana/ruby/kit/keys/signatures.rb', line 21

def initialize(value)
  @value = T.let(value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



18
19
20
# File 'lib/solana/ruby/kit/keys/signatures.rb', line 18

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



29
30
31
# File 'lib/solana/ruby/kit/keys/signatures.rb', line 29

def ==(other)
  !!(other.is_a?(Signature) && @value == other.value)
end

#to_sObject



26
# File 'lib/solana/ruby/kit/keys/signatures.rb', line 26

def to_s = @value