cardano_wallet 0.1.8 → 0.1.9

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: ebc7d4ddc02947d49ab653cfc6e1a86a09ff4e8cf7efb33921a1418a855dc68a
4
- data.tar.gz: 187877c6fe0fa07d231676f2140a93e30bf2934e325fa9761df63e72a3c85476
3
+ metadata.gz: aac2a09241bb9761fcd14be27d36baf749e7bce4211f0b153e01f086412fc7c7
4
+ data.tar.gz: 3a4accd8dc3e07e157cea62b640f934c703ccbf566a83ba3cd8012d017ed048a
5
5
  SHA512:
6
- metadata.gz: f4956699eb0dc284137b84f7aa53bc38f2fd6b7bed5e0f7793d6c4ec30b692f3f45160db173c175a2421cc889bb2d1d5861c7c5431dd1f924f38fb3d2e7245a2
7
- data.tar.gz: d0d63600ec42d8b59fb4f6f5bdf29e88c5e7aa42209b854d5a3da3cea84994f93dd3df5165ae46dd89ec1581137e7f6dfec779fb8d5b1e5fb1b114be548055c5
6
+ metadata.gz: d60a9175cac06389aa7ba70531a2b96be7611beff90eb28fc9a36f44e91e748ee6beee8d50ee9b9efc43340b101ee459752ef0e89c41d387558e3133810bb496
7
+ data.tar.gz: ce86f1f1c8cd233785cf12be8c90924ba2af63c6579590deed845e53fd5cd0dc97dc66b043c62392b962f2f136de6a324a6a83bb9866af835c3963f6d65df454
@@ -24,11 +24,11 @@ jobs:
24
24
  run: bundle install
25
25
  - name: Wait until node is synced
26
26
  run: bundle exec rake wait_until_node_synced
27
- - name: Run all tests (temporarily without nightly)
28
- run: bundle exec rspec . -t ~nightly
27
+ - name: Run all tests
28
+ run: bundle exec rspec .
29
29
  env:
30
30
  CI: true
31
31
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32
32
  NETWORK: testnet
33
33
  WALLET: dev-master-shelley
34
- NODE: 1.18.0
34
+ NODE: 1.19.0
@@ -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.18.0
41
+ NODE: 1.19.0
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency 'rake', '~> 12.3'
33
33
  spec.add_development_dependency 'rspec', '~> 3.7'
34
34
  spec.add_development_dependency 'bip_mnemonic', '~> 0.0.4'
35
- spec.add_development_dependency 'codecov'
35
+ spec.add_development_dependency 'codecov', '~> 0.2.8'
36
36
  spec.add_development_dependency 'simplecov'
37
37
 
38
38
  end
data/dev CHANGED
@@ -1 +1 @@
1
- NETWORK=testnet WALLET=dev-master-byron NODE=master docker-compose $1
1
+ NETWORK=testnet WALLET=dev-master-shelley NODE=1.19.0 NODE_CONFIG_PATH=`pwd`/spec/testnet docker-compose -f docker-compose-shelley.yml $1
@@ -195,23 +195,18 @@ module CardanoWallet
195
195
  # @param wid [String] source wallet id
196
196
  # @param passphrase [String] source wallet's passphrase
197
197
  # @param payments [Hash] addres, amount pair
198
- # @param withdrawal [Strin or Array] 'self' or mnemonic sentence
198
+ # @param withdrawal [String or Array] 'self' or mnemonic sentence
199
+ # @param metadata [Hash] special metadata JSON subset format (cf: https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postTransaction)
199
200
  #
200
201
  # @example
201
- # create(wid, passphrase, {addr1: 1000000}, 'self')
202
- def create(wid, passphrase, payments, withdrawal = nil)
202
+ # create(wid, passphrase, {addr1: 1000000}, 'self', {"1": "abc"})
203
+ def create(wid, passphrase, payments, withdrawal = nil, metadata = nil)
203
204
  payments_formatted = Utils.format_payments(payments)
204
-
205
- if withdrawal
206
- payload = { :payments => payments_formatted,
207
- :passphrase => passphrase,
208
- :withdrawal => withdrawal,
209
- }
210
- else
211
- payload = { :payments => payments_formatted,
212
- :passphrase => passphrase
213
- }
214
- end
205
+ payload = { :payments => payments_formatted,
206
+ :passphrase => passphrase
207
+ }
208
+ payload[:withdrawal] = withdrawal if withdrawal
209
+ payload[:metadata] = metadata if metadata
215
210
 
216
211
  self.class.post("/wallets/#{wid}/transactions",
217
212
  :body => payload.to_json,
@@ -222,17 +217,13 @@ module CardanoWallet
222
217
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/postTransactionFee
223
218
  #
224
219
  # @example
225
- # payment_fees(wid, {addr1: 1000000})
226
- def payment_fees(wid, payments, withdrawal = nil)
220
+ # payment_fees(wid, {addr1: 1000000}, {"1": "abc"})
221
+ def payment_fees(wid, payments, withdrawal = nil, metadata = nil)
227
222
  payments_formatted = Utils.format_payments(payments)
223
+ payload = { :payments => payments_formatted }
228
224
 
229
- if withdrawal
230
- payload = { :payments => payments_formatted,
231
- :withdrawal => withdrawal
232
- }
233
- else
234
- payload = { :payments => payments_formatted }
235
- end
225
+ payload[:withdrawal] = withdrawal if withdrawal
226
+ payload[:metadata] = metadata if metadata
236
227
 
237
228
  self.class.post("/wallets/#{wid}/payment-fees",
238
229
  :body => payload.to_json,
@@ -1,3 +1,3 @@
1
1
  module CardanoWallet
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
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.8
4
+ version: 0.1.9
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-31 00:00:00.000000000 Z
11
+ date: 2020-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: codecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.2.8
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.2.8
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement