cardano_wallet 0.3.18 → 0.3.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cardano_wallet/shelley.rb +27 -3
- data/lib/cardano_wallet/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53b9ded131c1aedd5fe453ba2c20bb5d1192b0ad1bcb435919b3e7fe251f91ec
|
4
|
+
data.tar.gz: fa9423722096ff2579c87bbf67f03d2ee82295b05188463ed13e134adccd80df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33b57b9e32336232e474823d7c39903a222b8f690fc42e4c163c36131ca7010603f498b5654b831a1a04e930a0bdc917557cc43b42c4996cbb20c06d28ce24b3
|
7
|
+
data.tar.gz: f3216903a1f14c11cabdbaca1c574783d4a57da60cb7e5d8f1689f6f6fa5d6d7b84a9020815a07c229b467994aecbffc253a41936f504cac707c2623530640b3
|
@@ -122,6 +122,29 @@ module CardanoWallet
|
|
122
122
|
query_formatted = query.empty? ? '' : Utils.to_query(query)
|
123
123
|
self.class.get("/wallets/#{wid}/keys#{query_formatted}")
|
124
124
|
end
|
125
|
+
|
126
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getPolicyKey
|
127
|
+
def get_policy_key(wid, query = {})
|
128
|
+
query_formatted = query.empty? ? '' : Utils.to_query(query)
|
129
|
+
self.class.get("/wallets/#{wid}/policy-key#{query_formatted}")
|
130
|
+
end
|
131
|
+
|
132
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/#operation/postPolicyKey
|
133
|
+
def create_policy_key(wid, passphrase, query = {})
|
134
|
+
query_formatted = query.empty? ? '' : Utils.to_query(query)
|
135
|
+
payload = { passphrase: passphrase }
|
136
|
+
self.class.post("/wallets/#{wid}/policy-key#{query_formatted}",
|
137
|
+
body: payload.to_json,
|
138
|
+
headers: { 'Content-Type' => 'application/json' })
|
139
|
+
end
|
140
|
+
|
141
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/#operation/postPolicyId
|
142
|
+
def create_policy_id(wid, policy_script_template)
|
143
|
+
payload = { policy_script_template: policy_script_template }
|
144
|
+
self.class.post("/wallets/#{wid}/policy-id",
|
145
|
+
body: payload.to_json,
|
146
|
+
headers: { 'Content-Type' => 'application/json' })
|
147
|
+
end
|
125
148
|
end
|
126
149
|
|
127
150
|
# API for Wallets
|
@@ -301,7 +324,7 @@ module CardanoWallet
|
|
301
324
|
payload[:payments] = payments if payments
|
302
325
|
payload[:withdrawal] = withdrawal if withdrawal
|
303
326
|
payload[:metadata] = metadata if metadata
|
304
|
-
payload[:
|
327
|
+
payload[:mint_burn] = mint if mint
|
305
328
|
payload[:delegations] = delegations if delegations
|
306
329
|
payload[:validity_interval] = validity_interval if validity_interval
|
307
330
|
|
@@ -339,8 +362,9 @@ module CardanoWallet
|
|
339
362
|
|
340
363
|
# Get tx by id
|
341
364
|
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getTransaction
|
342
|
-
def get(wid, tx_id)
|
343
|
-
|
365
|
+
def get(wid, tx_id, query = {})
|
366
|
+
query_formatted = query.empty? ? '' : Utils.to_query(query)
|
367
|
+
self.class.get("/wallets/#{wid}/transactions/#{tx_id}#{query_formatted}")
|
344
368
|
end
|
345
369
|
|
346
370
|
# List all wallet's transactions
|
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.
|
4
|
+
version: 0.3.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Stachyra
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
|
-
rubygems_version: 3.
|
168
|
+
rubygems_version: 3.3.7
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: Ruby wrapper over cardano-wallet.
|