cardano_wallet 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/nightly.yml +1 -1
- data/.github/workflows/tests.yml +1 -1
- data/lib/cardano_wallet/byron.rb +36 -0
- data/lib/cardano_wallet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 170a67d50c0941bcc6827d81d5025594aecd75fcde3736e0d28c1e11efec839f
|
4
|
+
data.tar.gz: 0e4e039fac16f50a6a6bb94c381ddf4c89b14cb3ab2f09556054fc4288238c21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37902c4bc67884beb01bad10a4771ef1fb9cfcd7ae2a722b25e856249ba9ec92580dc076960c0b7e288729f852c2ff778589eff67f1d34465c320d0fde8b189c
|
7
|
+
data.tar.gz: 5370e532f52ff2459957309d2109ae1cfebf2e99fe3332a39a5580e0d073fac69b6080a4fd1ab265f6b781ce483d17275df4609332332904aa03b0f686b37775
|
data/.github/workflows/tests.yml
CHANGED
data/lib/cardano_wallet/byron.rb
CHANGED
@@ -22,6 +22,12 @@ module CardanoWallet
|
|
22
22
|
Addresses.new @opt
|
23
23
|
end
|
24
24
|
|
25
|
+
# API for CoinSelections
|
26
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Byron-Coin-Selections
|
27
|
+
def coin_selections
|
28
|
+
CoinSelections.new @opt
|
29
|
+
end
|
30
|
+
|
25
31
|
# Get API for Byron transactions
|
26
32
|
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postByronTransactionFee
|
27
33
|
def transactions
|
@@ -152,6 +158,36 @@ module CardanoWallet
|
|
152
158
|
self.class.put("/byron-wallets/#{wid}/addresses/#{addr_id}")
|
153
159
|
end
|
154
160
|
|
161
|
+
# Import addresses to Byron wallet.
|
162
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/importAddresses
|
163
|
+
# @param wid [String] wallet id
|
164
|
+
# @param addresses [Array] array of addresses
|
165
|
+
def bulk_import(wid, addresses)
|
166
|
+
self.class.put("/byron-wallets/#{wid}/addresses",
|
167
|
+
:body => { :addresses => addresses
|
168
|
+
}.to_json,
|
169
|
+
:headers => { 'Content-Type' => 'application/json' } )
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# API for CoinSelections
|
174
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#tag/Byron-Coin-Selections
|
175
|
+
class CoinSelections < Base
|
176
|
+
def initialize opt
|
177
|
+
super
|
178
|
+
end
|
179
|
+
|
180
|
+
# Show random coin selection for particular payment
|
181
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/byronSelectCoins
|
182
|
+
#
|
183
|
+
# @example
|
184
|
+
# random(wid, {address1: 123, address2: 456})
|
185
|
+
def random(wid, payments)
|
186
|
+
payments_formatted = Utils.format_payments(payments)
|
187
|
+
self.class.post("/byron-wallets/#{wid}/coin-selections/random",
|
188
|
+
:body => {:payments => payments_formatted}.to_json,
|
189
|
+
:headers => { 'Content-Type' => 'application/json' })
|
190
|
+
end
|
155
191
|
end
|
156
192
|
|
157
193
|
# Byron transactions
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cardano_wallet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Stachyra
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|