Class: BSV::Identity::ClientOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/bsv/identity/types.rb

Overview

Configuration options for an IdentityClient instance.

Constant Summary collapse

DEFAULT =

Default options matching the TS SDK DEFAULT_IDENTITY_CLIENT_OPTIONS constant.

new(
  protocol_id: [1, 'identity'].freeze,
  key_id: '1',
  token_amount: 1,
  output_index: 0
).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(protocol_id:, key_id:, token_amount:, output_index:) ⇒ ClientOptions

Returns a new instance of ClientOptions.

Parameters:

  • protocol_id (Array)
  • key_id (String)
  • token_amount (Integer)
  • output_index (Integer)


102
103
104
105
106
107
# File 'lib/bsv/identity/types.rb', line 102

def initialize(protocol_id:, key_id:, token_amount:, output_index:)
  @protocol_id  = protocol_id
  @key_id       = key_id
  @token_amount = token_amount
  @output_index = output_index
end

Instance Attribute Details

#key_idString (readonly)

Returns key identifier within the protocol.

Returns:

  • (String)

    key identifier within the protocol



90
91
92
# File 'lib/bsv/identity/types.rb', line 90

def key_id
  @key_id
end

#output_indexInteger (readonly)

Returns output index within the token transaction.

Returns:

  • (Integer)

    output index within the token transaction



96
97
98
# File 'lib/bsv/identity/types.rb', line 96

def output_index
  @output_index
end

#protocol_idArray (readonly)

Returns BRC-42/43 wallet protocol identifier, e.g. [1, ‘identity’].

Returns:

  • (Array)

    BRC-42/43 wallet protocol identifier, e.g. [1, ‘identity’]



87
88
89
# File 'lib/bsv/identity/types.rb', line 87

def protocol_id
  @protocol_id
end

#token_amountInteger (readonly)

Returns token amount in satoshis for identity operations.

Returns:

  • (Integer)

    token amount in satoshis for identity operations



93
94
95
# File 'lib/bsv/identity/types.rb', line 93

def token_amount
  @token_amount
end