cardano_wallet 0.2.4 → 0.2.5

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: 138963a69580ac035ec96fe4d0aa0b312ad9896c202e84079a2bb017fba537d2
4
- data.tar.gz: 3e5131b4d9fac94536f4002827d233d0054d2e648bb1e8846e3ed751a0432e3a
3
+ metadata.gz: 880714f1f46b46a2b97b2ba99700acfc06c576df55fb457a852152832d964c4e
4
+ data.tar.gz: 35964e6bb0356db5f0ae855efc60694857f4987c537e9b563dda8b3253883b2b
5
5
  SHA512:
6
- metadata.gz: 8ab66b2b2d66b6c80d2c0972ca2c3605c7d0bbafb3bff4af9fce72dba96adebc471d01410a7fad3900999d5cb6138c3e2d1078527e0d3fc73d9cabb370739489
7
- data.tar.gz: 12d5479650d0e9b5af8c766709ae6ff9e3ade893d58dbfe5e211286d3346ec4f7ec156322b5d513fce84b93c826893f905bfc45f915786ff78b51960bedece64
6
+ metadata.gz: 747a1f8a8c669547c8a076ac8adcbdc463355c094522f2ac50fdae69afba4f22d3aa443fe7d7c1e1b80064699b5fcfcd2b1fa4ad03397ba699f5fba80a645929
7
+ data.tar.gz: 78ce365d4ae47bc8b406d719a66e387eb9c26256286f8babbd1ac3499820c3d534b5ce491d7ce745d8267aa9df2b33e4f4fa60cbedb9d4b660faa5aa54002b28
@@ -239,16 +239,18 @@ module CardanoWallet
239
239
  # @param payments [Array of Hashes] addres, amount pair
240
240
  # @param withdrawal [String or Array] 'self' or mnemonic sentence
241
241
  # @param metadata [Hash] special metadata JSON subset format (cf: https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postTransaction)
242
+ # @param ttl [Int] transaction's time-to-live in seconds
242
243
  #
243
244
  # @example
244
- # create(wid, passphrase, [{addr1: 1000000}, {addr2: 1000000}], 'self', {"1": "abc"})
245
- def create(wid, passphrase, payments, withdrawal = nil, metadata = nil)
245
+ # create(wid, passphrase, [{addr1: 1000000}, {addr2: 1000000}], 'self', {"1": "abc"}, ttl = 10)
246
+ def create(wid, passphrase, payments, withdrawal = nil, metadata = nil, ttl = nil)
246
247
  payments_formatted = Utils.format_payments(payments)
247
248
  payload = { :payments => payments_formatted,
248
249
  :passphrase => passphrase
249
250
  }
250
251
  payload[:withdrawal] = withdrawal if withdrawal
251
252
  payload[:metadata] = metadata if metadata
253
+ payload[:time_to_live] = { quantity: ttl, unit: "second" } if ttl
252
254
 
253
255
  self.class.post("/wallets/#{wid}/transactions",
254
256
  :body => payload.to_json,
@@ -259,13 +261,14 @@ module CardanoWallet
259
261
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postTransactionFee
260
262
  #
261
263
  # @example
262
- # payment_fees(wid, [{addr1: 1000000}, {addr2: 1000000}], {"1": "abc"})
263
- def payment_fees(wid, payments, withdrawal = nil, metadata = nil)
264
+ # payment_fees(wid, [{addr1: 1000000}, {addr2: 1000000}], {"1": "abc"}, ttl = 10)
265
+ def payment_fees(wid, payments, withdrawal = nil, metadata = nil, ttl = nil)
264
266
  payments_formatted = Utils.format_payments(payments)
265
267
  payload = { :payments => payments_formatted }
266
268
 
267
269
  payload[:withdrawal] = withdrawal if withdrawal
268
270
  payload[:metadata] = metadata if metadata
271
+ payload[:time_to_live] = { quantity: ttl, unit: "second" } if ttl
269
272
 
270
273
  self.class.post("/wallets/#{wid}/payment-fees",
271
274
  :body => payload.to_json,
@@ -1,3 +1,3 @@
1
1
  module CardanoWallet
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
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.2.4
4
+ version: 0.2.5
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-10-23 00:00:00.000000000 Z
11
+ date: 2020-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubygems_version: 3.1.2
150
+ rubygems_version: 3.1.4
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: Ruby wrapper over cardano-wallet.