Class: Solace::SquadsSmartAccounts::SmartAccountSigner

Inherits:
Data
  • Object
show all
Defined in:
lib/solace/squads_smart_accounts/types/smart_account_signer.rb

Overview

Immutable value object representing a signer entry on a smart account.

Examples:

SmartAccountSigner.new(
  pubkey:     '7xKX...',
  permission: Permissions::ALL
)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pubkey:, permission:) ⇒ SmartAccountSigner

Normalizes the pubkey to its base58 string so callers can pass a String, Keypair, or PublicKey interchangeably.

Parameters:

  • pubkey (#to_s)

    The signer’s public key in any representation.

  • permission (Integer)

    Bitmask built from Permissions constants.



21
22
23
# File 'lib/solace/squads_smart_accounts/types/smart_account_signer.rb', line 21

def initialize(pubkey:, permission:)
  super(pubkey: pubkey.to_s, permission:)
end

Instance Attribute Details

#permissionObject (readonly)

Returns the value of attribute permission

Returns:

  • (Object)

    the current value of permission



12
13
14
# File 'lib/solace/squads_smart_accounts/types/smart_account_signer.rb', line 12

def permission
  @permission
end

#pubkeyObject (readonly)

Returns the value of attribute pubkey

Returns:

  • (Object)

    the current value of pubkey



12
13
14
# File 'lib/solace/squads_smart_accounts/types/smart_account_signer.rb', line 12

def pubkey
  @pubkey
end