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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df0d8f6569ab3be773efe025fa14ec11e90fdfc9a51a08817182ec99de86eaec
4
- data.tar.gz: 4ce00832c57f2afea0c2019d7772f8037b5fb4523e1f8f3be5aa3dfb4040a6d6
3
+ metadata.gz: 170a67d50c0941bcc6827d81d5025594aecd75fcde3736e0d28c1e11efec839f
4
+ data.tar.gz: 0e4e039fac16f50a6a6bb94c381ddf4c89b14cb3ab2f09556054fc4288238c21
5
5
  SHA512:
6
- metadata.gz: 97f5be475f2b18c6344e619fb33866a41d0449baf6801820aacc3123a0390195d4ed29a3d253b9b4e9004c6cd96246100a4b9df4a7ec54cb7e4ace3e37beeac8
7
- data.tar.gz: e38d3564c8d28a01cc585ffbf3bf38d061f498301f26c1464aa9703bc927f18230af5bd3dbd27600a2b27b91a6dadc4059b6c91875a2dd2394951ded48af8cc2
6
+ metadata.gz: 37902c4bc67884beb01bad10a4771ef1fb9cfcd7ae2a722b25e856249ba9ec92580dc076960c0b7e288729f852c2ff778589eff67f1d34465c320d0fde8b189c
7
+ data.tar.gz: 5370e532f52ff2459957309d2109ae1cfebf2e99fe3332a39a5580e0d073fac69b6080a4fd1ab265f6b781ce483d17275df4609332332904aa03b0f686b37775
@@ -31,4 +31,4 @@ jobs:
31
31
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32
32
  NETWORK: testnet
33
33
  WALLET: dev-master-shelley
34
- NODE: 1.14.2
34
+ NODE: master
@@ -38,4 +38,4 @@ jobs:
38
38
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39
39
  NETWORK: testnet
40
40
  WALLET: dev-master-shelley
41
- NODE: 1.14.2
41
+ NODE: master
@@ -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
@@ -1,3 +1,3 @@
1
1
  module CardanoWallet
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
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-06 00:00:00.000000000 Z
11
+ date: 2020-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty