cardano_wallet 0.3.17 → 0.3.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -3
- data/cardano_wallet.gemspec +1 -0
- data/lib/cardano_wallet/byron.rb +12 -1
- data/lib/cardano_wallet/shelley.rb +36 -2
- data/lib/cardano_wallet/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14c547e38f46a65fec1d75bdf6d629881ef9aa6238cc8512171f39150a515b80
|
4
|
+
data.tar.gz: ef6cb57c23cd9521fbb1303efb61a73c6149b3c4e2c0fa990ccf94892ddcf71b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2d655e969090373c0b86e2e27363e1e564d86c9456f4384d75ad7acd74e207a96ba52e09f3b9fbc6f4b0825ddb58a5c1283cbb497bed5d6b5f8266811ac5c19
|
7
|
+
data.tar.gz: 6e3afa0d08cc69033db5c2a01fa332bcd9ac4e4cff1d849731ce16559ead31db69aaa040e09a0992d6877be9cc51000abd2c2d3e57e126d26099c6c68b4fc736
|
data/Rakefile
CHANGED
data/cardano_wallet.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.metadata['homepage_uri'] = spec.homepage
|
20
20
|
spec.metadata['source_code_uri'] = spec.homepage
|
21
21
|
spec.metadata['changelog_uri'] = spec.homepage
|
22
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
22
23
|
|
23
24
|
# Specify which files should be added to the gem when it is released.
|
24
25
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
data/lib/cardano_wallet/byron.rb
CHANGED
@@ -233,7 +233,7 @@ module CardanoWallet
|
|
233
233
|
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/signByronTransaction
|
234
234
|
# @param wid [String] source wallet id
|
235
235
|
# @param passphrase [String] wallet's passphrase
|
236
|
-
# @param
|
236
|
+
# @param transaction [String] CBOR transaction data
|
237
237
|
def sign(wid, passphrase, transaction)
|
238
238
|
payload = {
|
239
239
|
'passphrase' => passphrase,
|
@@ -245,6 +245,17 @@ module CardanoWallet
|
|
245
245
|
headers: { 'Content-Type' => 'application/json' })
|
246
246
|
end
|
247
247
|
|
248
|
+
# Submit transaction
|
249
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/submitByronTransaction
|
250
|
+
# @param wid [String] source wallet id
|
251
|
+
# @param transaction [String] CBOR transaction data
|
252
|
+
def submit(wid, transaction)
|
253
|
+
payload = { 'transaction' => transaction }
|
254
|
+
self.class.post("/byron-wallets/#{wid}/transactions-submit",
|
255
|
+
body: payload.to_json,
|
256
|
+
headers: { 'Content-Type' => 'application/json' })
|
257
|
+
end
|
258
|
+
|
248
259
|
# Get tx by id
|
249
260
|
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getByronTransaction
|
250
261
|
def get(wid, tx_id)
|
@@ -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
|
|
@@ -314,7 +337,7 @@ module CardanoWallet
|
|
314
337
|
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/signTransaction
|
315
338
|
# @param wid [String] source wallet id
|
316
339
|
# @param passphrase [String] wallet's passphrase
|
317
|
-
# @param
|
340
|
+
# @param transaction [String] CBOR transaction data
|
318
341
|
def sign(wid, passphrase, transaction)
|
319
342
|
payload = {
|
320
343
|
'passphrase' => passphrase,
|
@@ -326,6 +349,17 @@ module CardanoWallet
|
|
326
349
|
headers: { 'Content-Type' => 'application/json' })
|
327
350
|
end
|
328
351
|
|
352
|
+
# Submit transaction
|
353
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/submitTransaction
|
354
|
+
# @param wid [String] source wallet id
|
355
|
+
# @param transaction [String] CBOR transaction data
|
356
|
+
def submit(wid, transaction)
|
357
|
+
payload = { 'transaction' => transaction }
|
358
|
+
self.class.post("/wallets/#{wid}/transactions-submit",
|
359
|
+
body: payload.to_json,
|
360
|
+
headers: { 'Content-Type' => 'application/json' })
|
361
|
+
end
|
362
|
+
|
329
363
|
# Get tx by id
|
330
364
|
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/getTransaction
|
331
365
|
def get(wid, tx_id)
|
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.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Stachyra
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -149,6 +149,7 @@ metadata:
|
|
149
149
|
homepage_uri: https://github.com/piotr-iohk/cardano-wallet-rb
|
150
150
|
source_code_uri: https://github.com/piotr-iohk/cardano-wallet-rb
|
151
151
|
changelog_uri: https://github.com/piotr-iohk/cardano-wallet-rb
|
152
|
+
rubygems_mfa_required: 'true'
|
152
153
|
post_install_message:
|
153
154
|
rdoc_options: []
|
154
155
|
require_paths:
|
@@ -164,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
165
|
- !ruby/object:Gem::Version
|
165
166
|
version: '0'
|
166
167
|
requirements: []
|
167
|
-
rubygems_version: 3.2.
|
168
|
+
rubygems_version: 3.2.32
|
168
169
|
signing_key:
|
169
170
|
specification_version: 4
|
170
171
|
summary: Ruby wrapper over cardano-wallet.
|