Class: QuorumSdk::Node
- Inherits:
-
Object
- Object
- QuorumSdk::Node
- Defined in:
- lib/quorum_sdk/node.rb,
lib/quorum_sdk/node/trx.rb,
lib/quorum_sdk/node/auth.rb,
lib/quorum_sdk/node/group.rb,
lib/quorum_sdk/node/announce.rb,
lib/quorum_sdk/node/app_config.rb
Overview
Wrapper for HTTP APIs as light node client
Defined Under Namespace
Modules: Announce, AppConfig, Auth, Group, Trx
Constant Summary
Constants included from Trx
Trx::ARGUMENTS_FOR_BUILD_TRX, Trx::ARGUMENTS_FOR_SEND_TRX
Instance Attribute Summary collapse
-
#app_key ⇒ Object
readonly
Returns the value of attribute app_key.
-
#chain_url ⇒ Object
readonly
Returns the value of attribute chain_url.
-
#cipher_key ⇒ Object
readonly
Returns the value of attribute cipher_key.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#consensus_type ⇒ Object
readonly
Returns the value of attribute consensus_type.
-
#encryption_type ⇒ Object
readonly
Returns the value of attribute encryption_type.
-
#group_id ⇒ Object
readonly
Returns the value of attribute group_id.
-
#group_name ⇒ Object
readonly
Returns the value of attribute group_name.
-
#jwt ⇒ Object
readonly
Returns the value of attribute jwt.
-
#owner_pubkey ⇒ Object
readonly
Returns the value of attribute owner_pubkey.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Node
constructor
A new instance of Node.
Methods included from Trx
#build_trx, #list_trx, #send_trx
Methods included from Group
#info, #producers, #user_encrypt_pubkeys
Methods included from Auth
#allow_list, #auth_type, #deny_list
Methods included from AppConfig
Methods included from Announce
#announce, #announced_producers, #announced_users
Constructor Details
#initialize(**kwargs) ⇒ Node
Returns a new instance of Node.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/quorum_sdk/node.rb', line 16 def initialize(**kwargs) config = if kwargs[:seed].present? QuorumSdk::Utils.parse_seed kwargs[:seed] else kwargs end @group_id = config[:group_id] @group_name = config[:group_name] @consensus_type = config[:consensus_type] @encryption_type = config[:encryption_type] @app_key = config[:app_key] @owner_pubkey = config[:owner_pubkey] @signature = config[:signature] @cipher_key = config[:cipher_key] @chain_url = config[:chain_url] @jwt = config[:jwt] @client = QuorumSdk::Client.new(@chain_url, @jwt) end |
Instance Attribute Details
#app_key ⇒ Object (readonly)
Returns the value of attribute app_key.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def app_key @app_key end |
#chain_url ⇒ Object (readonly)
Returns the value of attribute chain_url.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def chain_url @chain_url end |
#cipher_key ⇒ Object (readonly)
Returns the value of attribute cipher_key.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def cipher_key @cipher_key end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def client @client end |
#consensus_type ⇒ Object (readonly)
Returns the value of attribute consensus_type.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def consensus_type @consensus_type end |
#encryption_type ⇒ Object (readonly)
Returns the value of attribute encryption_type.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def encryption_type @encryption_type end |
#group_id ⇒ Object (readonly)
Returns the value of attribute group_id.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def group_id @group_id end |
#group_name ⇒ Object (readonly)
Returns the value of attribute group_name.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def group_name @group_name end |
#jwt ⇒ Object (readonly)
Returns the value of attribute jwt.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def jwt @jwt end |
#owner_pubkey ⇒ Object (readonly)
Returns the value of attribute owner_pubkey.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def owner_pubkey @owner_pubkey end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
13 14 15 |
# File 'lib/quorum_sdk/node.rb', line 13 def signature @signature end |