cardano_wallet 0.3.1 → 0.3.2

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: f416f0ff4fd389ce9af664e9c128f0765cda62c346f6b2f3b5237a884e43a253
4
- data.tar.gz: 5769fb34859b6c2ddc7376a718ba5c0fc7962810cc1d3fc6012a82219d979302
3
+ metadata.gz: 36d3287106ec62dbb1ce9d909645f5e30710b4bcef36d1377ee90a63f73f6dfb
4
+ data.tar.gz: b020e0372998c38ea574b6078402f4a0f15c7a7e87172a1871bb878512b397ae
5
5
  SHA512:
6
- metadata.gz: 8b3492bd2f7f215a3ef7008ae997189eab233ab821764f93a1bae69f3bf859258c519dd808e433ec2edcc6f9ba183e59dc28e3439d974dc35dec498f106becf7
7
- data.tar.gz: 877550274108bc8c06203b9f488493c930d57b45c71ce7601f0116d129826f5638801dc46355b123ec2bf784977129e9a73fdfbc430e1d52f7bd13c28dbe39f8
6
+ metadata.gz: b887638f175e47ad6dd9a42b21a84654260e06eada82218eba10a985c5da80882bc65487317be2a19356f6ce2d849dab093cf439fc13b0266f444494b35d2979
7
+ data.tar.gz: 8274bf5c20ce7e38b99fe0cfc4ba5684507cdd5c4dd3800ecd30712f9c8ab3803b1301cec72803da472bee259943be45280aafae5dfe5cdd66348c1ba4ede5b4
@@ -18,7 +18,7 @@ services:
18
18
  - ${NODE_CONFIG_PATH}:/config
19
19
  ports:
20
20
  - 8090:8090
21
- command: serve --testnet /config/${NETWORK}-byron-genesis.json --node-socket /ipc/node.socket --database /wallet-db --listen-address 0.0.0.0
21
+ command: serve --testnet /config/${NETWORK}-byron-genesis.json --node-socket /ipc/node.socket --database /wallet-db --listen-address 0.0.0.0 --token-metadata-server http://metadata-server-mock.herokuapp.com/
22
22
  restart: on-failure
23
23
 
24
24
  volumes:
@@ -221,15 +221,19 @@ module CardanoWallet
221
221
  # @example
222
222
  # random(wid, [{addr1: 1000000}, {addr2: 1000000}])
223
223
  # random(wid, [{ "address": "addr1..", "amount": { "quantity": 42000000, "unit": "lovelace" }, "assets": [{"policy_id": "pid", "asset_name": "name", "quantity": 0 } ] } ])
224
- def random(wid, payments)
224
+ def random(wid, payments, withdrawal = nil, metadata = nil)
225
225
  Utils.verify_param_is_array!(payments)
226
226
  if payments.any?{|p| p.has_key?("address".to_sym) || p.has_key?("address")}
227
227
  payments_formatted = payments
228
228
  else
229
229
  payments_formatted = Utils.format_payments(payments)
230
230
  end
231
+ payload = { :payments => payments_formatted }
232
+ payload[:withdrawal] = withdrawal if withdrawal
233
+ payload[:metadata] = metadata if metadata
234
+
231
235
  self.class.post("/wallets/#{wid}/coin-selections/random",
232
- :body => {:payments => payments_formatted}.to_json,
236
+ :body => payload.to_json,
233
237
  :headers => { 'Content-Type' => 'application/json' })
234
238
  end
235
239
 
@@ -1,3 +1,3 @@
1
1
  module CardanoWallet
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
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.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Stachyra
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-03 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty