Class: Solace::Programs::Base Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/solace/programs/base.rb

Overview

This class is abstract.

Base class for program-specific clients.

Provides a consistent interface for interacting with on-chain programs.

See Also:

Since:

  • 0.0.2

Direct Known Subclasses

AssociatedTokenAccount, SplToken

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection:, program_id:) ⇒ Base

Initializes a new program client.

Parameters:

  • connection (Solace::Connection)

    The connection to the Solana cluster.

  • program_id (String)

    The base58 public key of the on-chain program.

Since:

  • 0.0.2



22
23
24
25
# File 'lib/solace/programs/base.rb', line 22

def initialize(connection:, program_id:)
  @connection = connection
  @program_id = program_id
end

Instance Attribute Details

#connectionObject (readonly)

Since:

  • 0.0.2



16
17
18
# File 'lib/solace/programs/base.rb', line 16

def connection
  @connection
end

#program_idObject (readonly)

Since:

  • 0.0.2



16
17
18
# File 'lib/solace/programs/base.rb', line 16

def program_id
  @program_id
end