golos_cloud 1.0.0alpha

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.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/CODE_OF_CONDUCT.md +74 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +13 -0
  6. data/README.md +48 -0
  7. data/Rakefile +22 -0
  8. data/bin/golos_cloud +23 -0
  9. data/golos_cloud.gemspec +29 -0
  10. data/lib/golos_cloud/models/account.rb +84 -0
  11. data/lib/golos_cloud/models/block.rb +19 -0
  12. data/lib/golos_cloud/models/comment.rb +73 -0
  13. data/lib/golos_cloud/models/connection.rb +33 -0
  14. data/lib/golos_cloud/models/sql_base.rb +28 -0
  15. data/lib/golos_cloud/models/token.rb +27 -0
  16. data/lib/golos_cloud/models/transaction.rb +29 -0
  17. data/lib/golos_cloud/models/tx/account_create.rb +26 -0
  18. data/lib/golos_cloud/models/tx/account_recover.rb +20 -0
  19. data/lib/golos_cloud/models/tx/account_update.rb +22 -0
  20. data/lib/golos_cloud/models/tx/account_witness_proxy.rb +19 -0
  21. data/lib/golos_cloud/models/tx/account_witness_vote.rb +20 -0
  22. data/lib/golos_cloud/models/tx/claim_reward_balance.rb +21 -0
  23. data/lib/golos_cloud/models/tx/comment.rb +24 -0
  24. data/lib/golos_cloud/models/tx/comments_option.rb +23 -0
  25. data/lib/golos_cloud/models/tx/convert.rb +20 -0
  26. data/lib/golos_cloud/models/tx/custom/follow.rb +32 -0
  27. data/lib/golos_cloud/models/tx/custom/reblog.rb +22 -0
  28. data/lib/golos_cloud/models/tx/custom/witness.rb +11 -0
  29. data/lib/golos_cloud/models/tx/custom.rb +19 -0
  30. data/lib/golos_cloud/models/tx/delegate_vesting_share.rb +20 -0
  31. data/lib/golos_cloud/models/tx/delete_comment.rb +19 -0
  32. data/lib/golos_cloud/models/tx/escrow_approve.rb +23 -0
  33. data/lib/golos_cloud/models/tx/escrow_dispute.rb +22 -0
  34. data/lib/golos_cloud/models/tx/escrow_release.rb +25 -0
  35. data/lib/golos_cloud/models/tx/escrow_transfer.rb +28 -0
  36. data/lib/golos_cloud/models/tx/feed.rb +20 -0
  37. data/lib/golos_cloud/models/tx/limit_order.rb +26 -0
  38. data/lib/golos_cloud/models/tx/pow.rb +19 -0
  39. data/lib/golos_cloud/models/tx/transfer.rb +24 -0
  40. data/lib/golos_cloud/models/tx/vote.rb +21 -0
  41. data/lib/golos_cloud/models/tx/withdraw.rb +19 -0
  42. data/lib/golos_cloud/models/tx/withdraw_vesting_route.rb +21 -0
  43. data/lib/golos_cloud/models/tx/witness_update.rb +24 -0
  44. data/lib/golos_cloud/models/vo/author_reward.rb +22 -0
  45. data/lib/golos_cloud/models/vo/curation_reward.rb +21 -0
  46. data/lib/golos_cloud/models/vo/fill_convert_request.rb +21 -0
  47. data/lib/golos_cloud/models/vo/fill_order.rb +23 -0
  48. data/lib/golos_cloud/models/vo/fill_vesting_withdraw.rb +21 -0
  49. data/lib/golos_cloud/models/vo/interest.rb +19 -0
  50. data/lib/golos_cloud/models/vo/shutdown_witness.rb +18 -0
  51. data/lib/golos_cloud/version.rb +3 -0
  52. data/lib/golos_cloud.rb +50 -0
  53. data/lib/version.rb +3 -0
  54. data/steem_source_docs.md +12167 -0
  55. metadata +180 -0
@@ -0,0 +1,24 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Comment < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxComments
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::Comment(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # author: varchar,
17
+ # permlink: varchar,
18
+ # parent_author: varchar,
19
+ # parent_permlink: varchar,
20
+ # title: text,
21
+ # body: text,
22
+ # json_metadata: varchar_max,
23
+ # timestamp: datetime
24
+ # )
@@ -0,0 +1,23 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class CommentsOption < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxCommentsOptions
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::CommentsOption(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # author: varchar,
17
+ # permlink: varchar,
18
+ # max_accepted_payout: money,
19
+ # percent_steem_dollars: integer,
20
+ # allow_votes: boolean,
21
+ # allow_curation_rewards: boolean,
22
+ # timestamp: datetime
23
+ # )
@@ -0,0 +1,20 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Convert < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxConverts
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::Convert(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # owner: varchar,
17
+ # requestid: integer,
18
+ # amount: money,
19
+ # timestamp: datetime
20
+ # )
@@ -0,0 +1,32 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Custom::Follow < GolosCloud::Tx::Custom
4
+ default_scope {
5
+ where(tid: :follow).
6
+ where("JSON_VALUE(json_metadata, '$[0]') = 'follow'")
7
+ }
8
+
9
+ scope :mode, lambda { |mode, options = {invert: false}|
10
+ invert = options[:invert] || false
11
+
12
+ if invert
13
+ where("JSON_VALUE(json_metadata, '$[1].what[0]') <> ?", mode)
14
+ else
15
+ where("JSON_VALUE(json_metadata, '$[1].what[0]') = ?", mode)
16
+ end
17
+ }
18
+
19
+ scope :blog, -> { mode('blog') }
20
+ scope :ignore, -> { mode('ignore') }
21
+ scope :reset, -> { mode('') }
22
+
23
+ scope :follower, lambda { |follower|
24
+ blog.where("JSON_VALUE(json_metadata, '$[1].follower') = ?", follower)
25
+ }
26
+
27
+ scope :following, lambda { |following|
28
+ blog.where("JSON_VALUE(json_metadata, '$[1].following') = ?", following)
29
+ }
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,22 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Custom::Reblog < GolosCloud::Tx::Custom
4
+ default_scope {
5
+ where(tid: :follow).
6
+ where("JSON_VALUE(json_metadata, '$[0]') = 'reblog'")
7
+ }
8
+
9
+ scope :account, lambda { |account|
10
+ where("JSON_VALUE(json_metadata, '$[1].account') = ?", account)
11
+ }
12
+
13
+ scope :author, lambda { |author|
14
+ where("JSON_VALUE(json_metadata, '$[1].author') = ?", author)
15
+ }
16
+
17
+ scope :permlink, lambda { |permlink|
18
+ where("JSON_VALUE(json_metadata, '$[1].permlink') = ?", permlink)
19
+ }
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,11 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Custom::Witness < GolosCloud::Tx::Custom
4
+ default_scope { where(tid: :witness) }
5
+
6
+ scope :account, lambda { |account|
7
+ where("JSON_VALUE(json_metadata, '$[1].account') = ?", account)
8
+ }
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,19 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Custom < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxCustoms
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::Custom(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # tid: varchar,
17
+ # json_metadata: varchar_max,
18
+ # timestamp: datetime
19
+ # )
@@ -0,0 +1,20 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class DelegateVestingShare < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxDelegateVestingShares
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::DelegateVestingShare(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # delegator: varchar,
17
+ # delegatee: varchar,
18
+ # vesting_shares: money,
19
+ # timestamp: datetime
20
+ # )
@@ -0,0 +1,19 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class DeleteComment < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxDeleteComments
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::DeleteComment(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # author: varchar,
17
+ # permlink: varchar_max,
18
+ # timestamp: datetime
19
+ # )
@@ -0,0 +1,23 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class EscrowApprove < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxEscrowApproves
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::EscrowApprove(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # from: varchar,
17
+ # to: varchar,
18
+ # agent: varchar,
19
+ # who: varchar,
20
+ # escrow_id: integer,
21
+ # approve: boolean,
22
+ # timestamp: datetime
23
+ # )
@@ -0,0 +1,22 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class EscrowDispute < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxEscrowDisputes
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::EscrowDispute(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # from: varchar,
17
+ # to: varchar,
18
+ # agent: varchar,
19
+ # who: varchar,
20
+ # escrow_id: integer,
21
+ # timestamp: datetime
22
+ # )
@@ -0,0 +1,25 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class EscrowRelease < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxEscrowReleases
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::EscrowRelease(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # from: varchar,
17
+ # to: varchar,
18
+ # agent: varchar,
19
+ # who: varchar,
20
+ # receiver: varchar,
21
+ # escrow_id: integer,
22
+ # sdb_amount: money,
23
+ # steem_amount: money,
24
+ # timestamp: datetime
25
+ # )
@@ -0,0 +1,28 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class EscrowTransfer < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxEscrowTransfers
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::EscrowTransfer(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # from: varchar,
17
+ # to: varchar,
18
+ # sdb_amount: money,
19
+ # steem_amount: money,
20
+ # escrow_id: integer,
21
+ # agent: varchar,
22
+ # fee: money,
23
+ # fee_symbol: varchar,
24
+ # json_meta: varchar_max,
25
+ # ratification_deadline: datetime,
26
+ # escrow_expiration: datetime,
27
+ # timestamp: datetime
28
+ # )
@@ -0,0 +1,20 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Feed < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxFeeds
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::Feed(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # publisher: varchar,
17
+ # exchange_rate_base: money,
18
+ # exchange_rate_quote: money,
19
+ # timestamp: datetime
20
+ # )
@@ -0,0 +1,26 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class LimitOrder < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxLimitOrders
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::LimitOrder(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # owner: varchar,
17
+ # orderid: integer,
18
+ # cancel: boolean,
19
+ # amount_to_sell: money,
20
+ # min_to_receive: money,
21
+ # exchange_rate_base: money,
22
+ # exchange_rate_quote: money,
23
+ # fill_or_kill: boolean,
24
+ # expiration: datetime,
25
+ # timestamp: datetime
26
+ # )
@@ -0,0 +1,19 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Pow < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxPows
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::Pow(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # worker_account: varchar,
17
+ # block_id: varchar,
18
+ # timestamp: datetime
19
+ # )
@@ -0,0 +1,24 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Transfer < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxTransfers
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::Transfer(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # type: varchar,
17
+ # from: varchar,
18
+ # to: varchar,
19
+ # amount: money,
20
+ # amount_symbol: varchar,
21
+ # memo: text,
22
+ # request_id: integer,
23
+ # timestamp: datetime
24
+ # )
@@ -0,0 +1,21 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Vote < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxVotes
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::Vote(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # voter: varchar,
17
+ # author: varchar,
18
+ # permlink: varchar,
19
+ # weight: integer,
20
+ # timestamp: datetime
21
+ # )
@@ -0,0 +1,19 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class Withdraw < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxWithdraws
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::Withdraw(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # account: varchar,
17
+ # vesting_shares: money,
18
+ # timestamp: datetime
19
+ # )
@@ -0,0 +1,21 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class WithdrawVestingRoute < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxWithdrawVestingRoutes
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::WithdrawVestingRoute(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # from_account: varchar,
17
+ # to_account: varchar,
18
+ # percent: integer,
19
+ # auto_vest: boolean,
20
+ # timestamp: datetime
21
+ # )
@@ -0,0 +1,24 @@
1
+ module GolosCloud
2
+ module Tx
3
+ class WitnessUpdate < GolosCloud::SqlBase
4
+
5
+ self.table_name = :TxWitnessUpdates
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Tx::WitnessUpdate(
14
+ # ID: integer,
15
+ # tx_id: integer,
16
+ # owner: varchar,
17
+ # url: varchar_max,
18
+ # block_signing_key: varchar,
19
+ # props_account_creation_fee: money,
20
+ # props_maximum_block_size: integer,
21
+ # props_sbd_interest_rate: integer,
22
+ # fee: money,
23
+ # timestamp: datetime
24
+ # )
@@ -0,0 +1,22 @@
1
+ module GolosCloud
2
+ module Vo
3
+ class AuthorReward < GolosCloud::SqlBase
4
+
5
+ self.table_name = :VOAuthorRewards
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Vo::AuthorReward(
14
+ # ID: integer,
15
+ # block_num: integer,
16
+ # timestamp: datetime,
17
+ # author: varchar,
18
+ # permlink: varchar,
19
+ # sdb_payout: money,
20
+ # steem_payout: money,
21
+ # vesting_payout: money
22
+ # )
@@ -0,0 +1,21 @@
1
+ module GolosCloud
2
+ module Vo
3
+ class CurationReward < GolosCloud::SqlBase
4
+
5
+ self.table_name = :VOCurationRewards
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Vo::CurationReward(
14
+ # ID: integer,
15
+ # block_num: integer,
16
+ # timestamp: datetime,
17
+ # curator: varchar,
18
+ # author: varchar,
19
+ # permlink: varchar,
20
+ # reward: varchar
21
+ # )
@@ -0,0 +1,21 @@
1
+ module GolosCloud
2
+ module Vo
3
+ class FillConvertRequest < GolosCloud::SqlBase
4
+
5
+ self.table_name = :VOFillConvertRequest
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Vo::FillConvertRequest(
14
+ # ID: integer,
15
+ # block_num: integer,
16
+ # timestamp: datetime,
17
+ # owner: varchar,
18
+ # requestid: integer,
19
+ # amount_in: varchar,
20
+ # amount_out: varchar
21
+ # )
@@ -0,0 +1,23 @@
1
+ module GolosCloud
2
+ module Vo
3
+ class FillOrder < GolosCloud::SqlBase
4
+
5
+ self.table_name = :VOFillOrders
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Vo::FillOrder(
14
+ # ID: integer,
15
+ # block_num: integer,
16
+ # timestamp: datetime,
17
+ # current_owner: varchar,
18
+ # current_orderid: integer,
19
+ # current_pays: varchar,
20
+ # open_owner: varchar,
21
+ # open_orderid: integer,
22
+ # open_pays: varchar
23
+ # )
@@ -0,0 +1,21 @@
1
+ module GolosCloud
2
+ module Vo
3
+ class FillVestingWithdraw < GolosCloud::SqlBase
4
+
5
+ self.table_name = :VOFillVestingWithdraws
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Vo::FillVestingWithdraw(
14
+ # ID: integer,
15
+ # block_num: integer,
16
+ # timestamp: datetime,
17
+ # from_account: varchar,
18
+ # to_account: varchar,
19
+ # withdrawn: varchar,
20
+ # deposited: varchar
21
+ # )
@@ -0,0 +1,19 @@
1
+ module GolosCloud
2
+ module Vo
3
+ class Interest < GolosCloud::SqlBase
4
+
5
+ self.table_name = :VOInterests
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Vo::Interest(
14
+ # ID: integer,
15
+ # block_num: integer,
16
+ # timestamp: datetime,
17
+ # owner: varchar,
18
+ # Interest: money
19
+ # )
@@ -0,0 +1,18 @@
1
+ module GolosCloud
2
+ module Vo
3
+ class ShutdownWitness < GolosCloud::SqlBase
4
+
5
+ self.table_name = :VOShutdownWitnesses
6
+
7
+ end
8
+ end
9
+ end
10
+
11
+ # Structure
12
+ #
13
+ # GolosCloud::Vo::ShutdownWitness(
14
+ # ID: integer,
15
+ # block_num: integer,
16
+ # timestamp: datetime,
17
+ # owner: varchar
18
+ # )
@@ -0,0 +1,3 @@
1
+ module GolosCloud
2
+ VERSION = '1.0.0alpha'
3
+ end