cardano_wallet 0.3.8 → 0.3.12

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: 3ff97345f66a326cdbb4cfa28e0458ea55a0bb5eca469c2f86ef939837618c03
4
- data.tar.gz: a8a4515006fa955c86f072ce4b3233023cff3ffdf049958858a24b7dc7099842
3
+ metadata.gz: 3d537fcde82dbf5b749eb610fe65c56650e81d894ae4cebe70597214e8b7c5a9
4
+ data.tar.gz: 3f69daffc7168cf217583ea22711dc376117e2f7e22cc94796718f498d410a37
5
5
  SHA512:
6
- metadata.gz: 5a661209422fe8e47bb7bc964107fb7726fb08b350db98e636eaeb224ce09447b7ea23b2663152bd27094a48e306f93c826b15b2d912c6111491f82bb22677aa
7
- data.tar.gz: 8070466c5997132e9c878b302065a3796415494c36b0b7f579f8da7d64d553d4d141a0be1d276d77f5cca3da0ebdfcaa949b8be75f07d6a0c8f289d591f55e73
6
+ metadata.gz: 2aef5a637abe1835ee974da83b945fa6512f1386c45677e27b6d7b523d26900242e7f15f9de70a5246b85309f7df7f59e7ddfb66e5af4e9395a0caa7f2eb279b
7
+ data.tar.gz: f36919d5ed2d2c6c7a1859f9c3d27b3217d3adde85fecb76e93d790e632e4064d660f1888ce9cb7eeee885d28d287d361fb27f9a01b55f14c08bd1d62d08da5c
@@ -117,6 +117,11 @@ module CardanoWallet
117
117
  self.class.get("/byron-wallets/#{wid}/statistics/utxos")
118
118
  end
119
119
 
120
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getByronWalletUtxoSnapshot
121
+ def utxo_snapshot(wid)
122
+ self.class.get("/byron-wallets/#{wid}/utxo")
123
+ end
124
+
120
125
  # Update Byron wallet's passphrase.
121
126
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/putByronWalletPassphrase
122
127
  #
@@ -49,8 +49,9 @@ module CardanoWallet
49
49
  end
50
50
 
51
51
  # @see https://input-output-hk.github.io/cardano-wallet/api/#operation/postAccountKeyShared
52
- def create_acc_public_key(wid, index, pass, format)
53
- payload = { passphrase: pass, format: format }
52
+ def create_acc_public_key(wid, index, payload)
53
+ # payload = { passphrase: pass, format: format }
54
+ Utils.verify_param_is_hash!(payload)
54
55
  self.class.post("/shared-wallets/#{wid}/keys/#{index}",
55
56
  body: payload.to_json,
56
57
  headers: { 'Content-Type' => 'application/json' })
@@ -62,6 +62,21 @@ module CardanoWallet
62
62
  ##
63
63
  # Base class for Shelley Assets API
64
64
  class Assets < Base
65
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/mintBurnAssets
66
+ def mint(wid, mint_burn, pass, metadata = nil, ttl = nil)
67
+ payload = {
68
+ mint_burn: mint_burn,
69
+ passphrase: pass
70
+ }
71
+
72
+ payload[:metadata] = metadata if metadata
73
+ payload[:time_to_live] = { quantity: ttl, unit: 'second' } if ttl
74
+
75
+ self.class.post("/wallets/#{wid}/assets",
76
+ body: payload.to_json,
77
+ headers: { 'Content-Type' => 'application/json' })
78
+ end
79
+
65
80
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listAssets
66
81
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getAsset
67
82
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getAssetDefault
@@ -93,8 +108,9 @@ module CardanoWallet
93
108
  end
94
109
 
95
110
  # @see https://input-output-hk.github.io/cardano-wallet/api/#operation/postAccountKey
96
- def create_acc_public_key(wid, index, pass, format)
97
- payload = { passphrase: pass, format: format }
111
+ def create_acc_public_key(wid, index, payload)
112
+ # payload = { passphrase: pass, format: format, purpose: purpose }
113
+ Utils.verify_param_is_hash!(payload)
98
114
  self.class.post("/wallets/#{wid}/keys/#{index}",
99
115
  body: payload.to_json,
100
116
  headers: { 'Content-Type' => 'application/json' })
@@ -166,6 +182,11 @@ module CardanoWallet
166
182
  self.class.get("/wallets/#{wid}/statistics/utxos")
167
183
  end
168
184
 
185
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getWalletUtxoSnapshot
186
+ def utxo_snapshot(wid)
187
+ self.class.get("/wallets/#{wid}/utxo")
188
+ end
189
+
169
190
  # Update wallet's passphrase
170
191
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/putWalletPassphrase
171
192
  #
@@ -349,6 +370,12 @@ module CardanoWallet
349
370
  self.class.get("/stake-pools#{query}")
350
371
  end
351
372
 
373
+ # List all stake keys
374
+ # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listStakeKeys
375
+ def list_stake_keys(wid)
376
+ self.class.get("/wallets/#{wid}/stake-keys")
377
+ end
378
+
352
379
  # Join stake pool
353
380
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/joinStakePool
354
381
  def join(sp_id, wid, passphrase)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CardanoWallet
4
- VERSION = '0.3.8'
4
+ VERSION = '0.3.12'
5
5
  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.8
4
+ version: 0.3.12
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-05-26 00:00:00.000000000 Z
11
+ date: 2021-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubygems_version: 3.2.15
167
+ rubygems_version: 3.2.22
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: Ruby wrapper over cardano-wallet.