tron.rb 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27f04bbb5255aefafd7aa39189ae5e27d455c93aecc83525f0428aaeed7e2ce0
4
- data.tar.gz: c356c4f6c5567f5566e8f84a01ae4b06c620a17bde5f770e4e1854bae169d59f
3
+ metadata.gz: 585ad45b691372d3698239c2bd3ad6c81a2f70409869867fb8e645ccba7aa29c
4
+ data.tar.gz: c45974ccdd37b4ce9ba68d0b395fc03ff08dad33d0997d90665ee376db2dfb0d
5
5
  SHA512:
6
- metadata.gz: b51a2c27b361c2c568cfbe3244c5d7946ed34fcf0a12cc1b21bb9cec61d7ebac33befe0ebe144f433801386937972af3de152bb375cd7429dc2303c287640e9d
7
- data.tar.gz: 422b6855fce5d09fba35152bd332a41cbd65bf8f6343d10f1ad3f5a2c50c7614ecd77672ba49d785141e36fdb34b794045055eab124087947abaf9d5751470a1
6
+ metadata.gz: b79bee6d4053770cc2f9f2d3fe8971c23a7cc828f59d28364695653f5843be4badab7a6bc0753b715c6ff651ca96dbe9eaaa7a8afb11ce3462e0708ca42bf32a
7
+ data.tar.gz: 39a090312157fe64b22ad82d3c76aac72a9ba2be75279ddd276b29f3e5ec282248d5d15ad76fb90debe4d200b984b6c4aa698f8660a0b076cf8db76b5f6f260b
data/lib/tron/client.rb CHANGED
@@ -4,6 +4,7 @@ require_relative 'services/balance'
4
4
  require_relative 'services/resources'
5
5
  require_relative 'services/price'
6
6
  require_relative 'services/contract'
7
+ require_relative 'services/transaction'
7
8
 
8
9
  module Tron
9
10
  # The main client class for interacting with the TRON blockchain
@@ -81,6 +82,13 @@ module Tron
81
82
  @contract_service ||= Services::Contract.new(@configuration)
82
83
  end
83
84
 
85
+ # Returns the transaction service instance
86
+ #
87
+ # @return [Tron::Services::Transaction] the transaction service
88
+ def transaction_service
89
+ @transaction_service ||= Services::Transaction.new(@configuration)
90
+ end
91
+
84
92
  # Get wallet balance information including TRX and TRC20 tokens
85
93
  #
86
94
  # @param address [String] TRON address to check
@@ -30,6 +30,17 @@ module Tron
30
30
  broadcast_transaction(signed_tx)
31
31
  end
32
32
 
33
+ # Gets transaction information by transaction ID
34
+ #
35
+ # @param tx_id [String] the transaction ID (txID)
36
+ # @return [Hash] the transaction information from the blockchain
37
+ def get_transaction(tx_id)
38
+ endpoint = "#{@base_url}/wallet/gettransactionbyid"
39
+ payload = { value: tx_id }
40
+
41
+ Utils::HTTP.post(endpoint, payload)
42
+ end
43
+
33
44
  private
34
45
 
35
46
  # Signs a transaction locally using the private key
data/lib/tron/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  # lib/tron/version.rb
4
4
  module Tron
5
- VERSION = "1.1.4".freeze
5
+ VERSION = "1.1.5".freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tron.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bolo Michelin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-28 00:00:00.000000000 Z
11
+ date: 2025-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base58-alphabets