fireblocks 0.2.1 → 0.2.2

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: 4125b5bd7ad82dca9fe2b1044e220cfc913a13477d0b31694e2b934b0632de5a
4
- data.tar.gz: 3b098eaaf0949cb1e56b27a70aee6e9b630116d086c244219bb0c8f417e3d5d8
3
+ metadata.gz: 698977d65ef3d94c725839c2cc0524b76cbe5e7e1e7b58ad0a554a6d302a09a9
4
+ data.tar.gz: e610c06d37553145c0b61614e7baaeea857dbf759c3b6ff89881f63d5709a568
5
5
  SHA512:
6
- metadata.gz: 1197ef7dd0d74c79d45170183d93752c95de13902dc4da5a839b34f409af587f7e134aa99cf188d485e91ac1f01cdb7aca4f97c71afa270eae8b2a4b3cccd9c4
7
- data.tar.gz: 6c25ad5cd9b497713cf435aaa236cd0e3c651df5110348c24598a337f53f3dc8fd007901b22b9895951aa127330f80881dc6aed12a0fc95a8911a118be0d6c74
6
+ metadata.gz: 496d903636cfd07a622dac22cfc0adf5f84246fa16400449a54f4e31e2da4d5b02b9008003cadf2a8decbe428f494839863d344c767fa0655676bcda57f81182
7
+ data.tar.gz: 27dbf1e7ec02dddaabb2562669a8805dbb077cd7ddf377cd36201705db4a461567afa9308aa8c95333eb5700f76271441813dd7b2ca890ecf16ccea6204a9f98
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install fireblocks
13
13
  Add to your `Gemfile`:
14
14
 
15
15
  ```ruby
16
- gem "fireblocks", "~> 0.2.0"
16
+ gem "fireblocks", "~> 0.2.2"
17
17
  ```
18
18
 
19
19
  Run `bundle install`
@@ -5,6 +5,7 @@ require 'fireblocks/configuration'
5
5
  require 'fireblocks/api/api'
6
6
  require 'fireblocks/api/request'
7
7
  require 'fireblocks/api/token'
8
+ require 'fireblocks/api/transactions'
8
9
 
9
10
  # Parent module for all classes
10
11
  module Fireblocks
@@ -25,7 +25,7 @@ module Fireblocks
25
25
  end
26
26
 
27
27
  def expire_at
28
- Time.now.to_i + 20
28
+ Time.now.to_i + 55
29
29
  end
30
30
 
31
31
  def call
@@ -0,0 +1,44 @@
1
+ module Fireblocks
2
+ class API
3
+ class Transactions
4
+ class << self
5
+ VALID_TRANSACTION_KEYS = [
6
+ :amount,
7
+ :assetId,
8
+ :source,
9
+ :destination,
10
+ :fee,
11
+ :gasPrice,
12
+ :note,
13
+ :autoStaking,
14
+ :networkStaking,
15
+ :cpuStaking
16
+ ]
17
+
18
+ def create(options)
19
+ body = options.slice(*VALID_TRANSACTION_KEYS)
20
+ Fireblocks::Request.post(body: body, path: '/v1/transactions')
21
+ end
22
+
23
+ def from_vault_to_external(amount:, asset_id:, source_id:, destination_id:, one_time_address:)
24
+ body = {
25
+ amount: amount,
26
+ assetId: asset_id,
27
+ source: {
28
+ type: 'VAULT_ACCOUNT',
29
+ id: source_id
30
+ },
31
+ destination: {
32
+ type: 'EXTERNAL_WALLET',
33
+ id: destination_id,
34
+ oneTimeAddress: {
35
+ address: one_time_address
36
+ }
37
+ }
38
+ }
39
+ create(body)
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fireblocks
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fireblocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryam Noguera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-12 00:00:00.000000000 Z
11
+ date: 2020-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -107,6 +107,7 @@ files:
107
107
  - lib/fireblocks/api/api.rb
108
108
  - lib/fireblocks/api/request.rb
109
109
  - lib/fireblocks/api/token.rb
110
+ - lib/fireblocks/api/transactions.rb
110
111
  - lib/fireblocks/configuration.rb
111
112
  - lib/fireblocks/version.rb
112
113
  - test/fireblocks/configuration_test.rb