cardano_wallet 0.3.24 → 0.3.25
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/shared.rb +32 -1
- data/lib/cardano_wallet/shelley.rb +7 -3
- data/lib/cardano_wallet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2a89888b8835a0dd36002a87747de771d664596fd414acb093dcf66d01b9d67
|
4
|
+
data.tar.gz: c1f776e1399798f21c65fa9b774085ad4eb52b8155216d6cbbac429dff6761ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f28a7f65d8b655a6992627309bd9bf41b1bfbbdf25c4e500058e36202b58b9f02c5142a984ec1d8f4efec38fff0b0fd365bd342d54481df8959e21b493942921
|
7
|
+
data.tar.gz: 86128a38a67f2396c18df3018539ddd1d363a18e8a60b9a87098085da28b77b17437b373f89cd66a896869ff37be6352e52f6331d63c6dea52b0c7f621bfc1d2
|
@@ -45,13 +45,15 @@ module CardanoWallet
|
|
45
45
|
# @param mint [Array of Hashes] mint object
|
46
46
|
# @param delegations [Array of Hashes] delegations object
|
47
47
|
# @param validity_interval [Hash] validity_interval object
|
48
|
+
# @param encoding [String] output encoding ("base16" or "base64")
|
48
49
|
def construct(wid,
|
49
50
|
payments = nil,
|
50
51
|
withdrawal = nil,
|
51
52
|
metadata = nil,
|
52
53
|
delegations = nil,
|
53
54
|
mint = nil,
|
54
|
-
validity_interval = nil
|
55
|
+
validity_interval = nil,
|
56
|
+
encoding = nil)
|
55
57
|
payload = {}
|
56
58
|
payload[:payments] = payments if payments
|
57
59
|
payload[:withdrawal] = withdrawal if withdrawal
|
@@ -59,6 +61,7 @@ module CardanoWallet
|
|
59
61
|
payload[:mint_burn] = mint if mint
|
60
62
|
payload[:delegations] = delegations if delegations
|
61
63
|
payload[:validity_interval] = validity_interval if validity_interval
|
64
|
+
payload[:encoding] = encoding if encoding
|
62
65
|
|
63
66
|
self.class.post("/shared-wallets/#{wid}/transactions-construct",
|
64
67
|
body: payload.to_json,
|
@@ -76,6 +79,34 @@ module CardanoWallet
|
|
76
79
|
body: payload.to_json,
|
77
80
|
headers: { 'Content-Type' => 'application/json' })
|
78
81
|
end
|
82
|
+
|
83
|
+
# Sign transaction
|
84
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/signSharedTransaction
|
85
|
+
# @param wid [String] source wallet id
|
86
|
+
# @param passphrase [String] wallet's passphrase
|
87
|
+
# @param transaction [String] CBOR transaction data
|
88
|
+
# @param encoding [String] output encoding ("base16" or "base64")
|
89
|
+
def sign(wid, passphrase, transaction, encoding = nil)
|
90
|
+
payload = {
|
91
|
+
'passphrase' => passphrase,
|
92
|
+
'transaction' => transaction
|
93
|
+
}
|
94
|
+
payload[:encoding] = encoding if encoding
|
95
|
+
self.class.post("/wallets/#{wid}/transactions-sign",
|
96
|
+
body: payload.to_json,
|
97
|
+
headers: { 'Content-Type' => 'application/json' })
|
98
|
+
end
|
99
|
+
|
100
|
+
# Submit transaction
|
101
|
+
# @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/submitSharedTransaction
|
102
|
+
# @param wid [String] source wallet id
|
103
|
+
# @param transaction [String] CBOR transaction data
|
104
|
+
def submit(wid, transaction)
|
105
|
+
payload = { 'transaction' => transaction }
|
106
|
+
self.class.post("/wallets/#{wid}/transactions-submit",
|
107
|
+
body: payload.to_json,
|
108
|
+
headers: { 'Content-Type' => 'application/json' })
|
109
|
+
end
|
79
110
|
end
|
80
111
|
|
81
112
|
# API for Addresses
|
@@ -313,13 +313,15 @@ module CardanoWallet
|
|
313
313
|
# @param mint [Array of Hashes] mint object
|
314
314
|
# @param delegations [Array of Hashes] delegations object
|
315
315
|
# @param validity_interval [Hash] validity_interval object
|
316
|
+
# @param encoding [String] output encoding ("base16" or "base64")
|
316
317
|
def construct(wid,
|
317
318
|
payments = nil,
|
318
319
|
withdrawal = nil,
|
319
320
|
metadata = nil,
|
320
321
|
delegations = nil,
|
321
322
|
mint = nil,
|
322
|
-
validity_interval = nil
|
323
|
+
validity_interval = nil,
|
324
|
+
encoding = nil)
|
323
325
|
payload = {}
|
324
326
|
payload[:payments] = payments if payments
|
325
327
|
payload[:withdrawal] = withdrawal if withdrawal
|
@@ -327,6 +329,7 @@ module CardanoWallet
|
|
327
329
|
payload[:mint_burn] = mint if mint
|
328
330
|
payload[:delegations] = delegations if delegations
|
329
331
|
payload[:validity_interval] = validity_interval if validity_interval
|
332
|
+
payload[:encoding] = encoding if encoding
|
330
333
|
|
331
334
|
self.class.post("/wallets/#{wid}/transactions-construct",
|
332
335
|
body: payload.to_json,
|
@@ -338,12 +341,13 @@ module CardanoWallet
|
|
338
341
|
# @param wid [String] source wallet id
|
339
342
|
# @param passphrase [String] wallet's passphrase
|
340
343
|
# @param transaction [String] CBOR transaction data
|
341
|
-
|
344
|
+
# @param encoding [String] output encoding ("base16" or "base64")
|
345
|
+
def sign(wid, passphrase, transaction, encoding = nil)
|
342
346
|
payload = {
|
343
347
|
'passphrase' => passphrase,
|
344
348
|
'transaction' => transaction
|
345
349
|
}
|
346
|
-
|
350
|
+
payload[:encoding] = encoding if encoding
|
347
351
|
self.class.post("/wallets/#{wid}/transactions-sign",
|
348
352
|
body: payload.to_json,
|
349
353
|
headers: { 'Content-Type' => 'application/json' })
|
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.25
|
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-08
|
11
|
+
date: 2022-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|