Class: Solana::Ruby::Kit::Keys::SignatureBytes
- Inherits:
-
Object
- Object
- Solana::Ruby::Kit::Keys::SignatureBytes
- Extended by:
- T::Sig
- Defined in:
- lib/solana/ruby/kit/keys/signatures.rb
Overview
A 64-byte binary string holding raw Ed25519 signature bytes. Mirrors TypeScript:
type SignatureBytes = Brand<Uint8Array, 'SignatureBytes'>
Constant Summary collapse
- BYTE_LENGTH =
64
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
binary String, always 64 bytes.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #bytesize ⇒ Object
-
#initialize(value) ⇒ SignatureBytes
constructor
A new instance of SignatureBytes.
Constructor Details
#initialize(value) ⇒ SignatureBytes
Returns a new instance of SignatureBytes.
46 47 48 |
# File 'lib/solana/ruby/kit/keys/signatures.rb', line 46 def initialize(value) @value = T.let(value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
binary String, always 64 bytes
43 44 45 |
# File 'lib/solana/ruby/kit/keys/signatures.rb', line 43 def value @value end |
Instance Method Details
#==(other) ⇒ Object
54 55 56 |
# File 'lib/solana/ruby/kit/keys/signatures.rb', line 54 def ==(other) !!(other.is_a?(SignatureBytes) && @value == other.value) end |
#bytesize ⇒ Object
51 |
# File 'lib/solana/ruby/kit/keys/signatures.rb', line 51 def bytesize = @value.bytesize |