cryptum 0.0.355 → 0.0.356

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. metadata +13 -116
  3. data/.github/workflows/main.yml +0 -16
  4. data/.gitignore +0 -30
  5. data/.rspec +0 -3
  6. data/.rspec_status +0 -0
  7. data/.rubocop.yml +0 -31
  8. data/.rubocop_todo.yml +0 -32
  9. data/.ruby-gemset +0 -1
  10. data/.ruby-version +0 -1
  11. data/CODE_OF_CONDUCT.md +0 -84
  12. data/Gemfile +0 -38
  13. data/LICENSE +0 -674
  14. data/README.md +0 -87
  15. data/Rakefile +0 -19
  16. data/bin/cryptum +0 -73
  17. data/bin/cryptum-forecast +0 -200
  18. data/bin/cryptum-repl +0 -73
  19. data/bin/cryptum_autoinc_version +0 -38
  20. data/build_cryptum_gem.sh +0 -58
  21. data/cryptum.gemspec +0 -52
  22. data/cryptum_container.sh +0 -1
  23. data/docker/cryptum.json +0 -60
  24. data/docker/cryptum_container.sh +0 -59
  25. data/docker/packer_secrets.json.EXAMPLE +0 -7
  26. data/docker/provisioners/cryptum.sh +0 -11
  27. data/docker/provisioners/docker_bashrc.sh +0 -2
  28. data/docker/provisioners/docker_rvm.sh +0 -22
  29. data/docker/provisioners/init_image.sh +0 -28
  30. data/docker/provisioners/post_install.sh +0 -6
  31. data/docker/provisioners/ruby.sh +0 -16
  32. data/docker/provisioners/upload_globals.sh +0 -49
  33. data/etc/bot_confs/.gitkeep +0 -0
  34. data/etc/bot_confs/BOT_CONF.TEMPLATE +0 -10
  35. data/etc/coinbase_pro.yaml.EXAMPLE +0 -8
  36. data/etc/open_ai.yaml.EXAMPLE +0 -1
  37. data/git_commit.sh +0 -22
  38. data/lib/cryptum/api.rb +0 -688
  39. data/lib/cryptum/bot_conf.rb +0 -197
  40. data/lib/cryptum/event/bot_conf.rb +0 -34
  41. data/lib/cryptum/event/buy.rb +0 -145
  42. data/lib/cryptum/event/cancel.rb +0 -35
  43. data/lib/cryptum/event/exit.rb +0 -35
  44. data/lib/cryptum/event/gtfo.rb +0 -36
  45. data/lib/cryptum/event/history.rb +0 -105
  46. data/lib/cryptum/event/key_press.rb +0 -64
  47. data/lib/cryptum/event/order_book.rb +0 -34
  48. data/lib/cryptum/event/pane.rb +0 -65
  49. data/lib/cryptum/event/parse.rb +0 -181
  50. data/lib/cryptum/event/scroll.rb +0 -200
  51. data/lib/cryptum/event/sell.rb +0 -124
  52. data/lib/cryptum/event.rb +0 -27
  53. data/lib/cryptum/log.rb +0 -34
  54. data/lib/cryptum/matrix.rb +0 -181
  55. data/lib/cryptum/open_ai.rb +0 -156
  56. data/lib/cryptum/option/choice.rb +0 -28
  57. data/lib/cryptum/option.rb +0 -206
  58. data/lib/cryptum/order_book/generate.rb +0 -114
  59. data/lib/cryptum/order_book/indicator.rb +0 -15
  60. data/lib/cryptum/order_book/market_trend.rb +0 -137
  61. data/lib/cryptum/order_book/profit_margin.rb +0 -55
  62. data/lib/cryptum/order_book.rb +0 -19
  63. data/lib/cryptum/portfolio/balance.rb +0 -123
  64. data/lib/cryptum/portfolio.rb +0 -15
  65. data/lib/cryptum/ui/command.rb +0 -314
  66. data/lib/cryptum/ui/key_press_event.rb +0 -33
  67. data/lib/cryptum/ui/market_trend.rb +0 -74
  68. data/lib/cryptum/ui/order_execute_details.rb +0 -297
  69. data/lib/cryptum/ui/order_execution.rb +0 -573
  70. data/lib/cryptum/ui/order_plan.rb +0 -503
  71. data/lib/cryptum/ui/order_plan_details.rb +0 -240
  72. data/lib/cryptum/ui/order_timer.rb +0 -121
  73. data/lib/cryptum/ui/portfolio.rb +0 -221
  74. data/lib/cryptum/ui/signal_engine.rb +0 -109
  75. data/lib/cryptum/ui/terminal_window.rb +0 -111
  76. data/lib/cryptum/ui/ticker.rb +0 -319
  77. data/lib/cryptum/ui.rb +0 -343
  78. data/lib/cryptum/version.rb +0 -5
  79. data/lib/cryptum/web_sock/coinbase.rb +0 -102
  80. data/lib/cryptum/web_sock/event_machine.rb +0 -274
  81. data/lib/cryptum/web_sock.rb +0 -16
  82. data/lib/cryptum.rb +0 -120
  83. data/order_books/.gitkeep +0 -0
  84. data/reinstall_cryptum_gemset.sh +0 -29
  85. data/spec/lib/cryptum/api_spec.rb +0 -10
  86. data/spec/lib/cryptum/event_spec.rb +0 -10
  87. data/spec/lib/cryptum/log_spec.rb +0 -10
  88. data/spec/lib/cryptum/option_spec.rb +0 -10
  89. data/spec/lib/cryptum/order_book/generate_spec.rb +0 -10
  90. data/spec/lib/cryptum/order_book/market_trend_spec.rb +0 -10
  91. data/spec/lib/cryptum/order_book_spec.rb +0 -10
  92. data/spec/lib/cryptum/ui/command_spec.rb +0 -10
  93. data/spec/lib/cryptum/ui/ticker_spec.rb +0 -10
  94. data/spec/lib/cryptum/ui_spec.rb +0 -10
  95. data/spec/lib/cryptum/web_sock_spec.rb +0 -10
  96. data/spec/lib/cryptum_spec.rb +0 -10
  97. data/spec/spec_helper.rb +0 -3
  98. data/upgrade_Gemfile_gems.sh +0 -20
  99. data/upgrade_cryptum.sh +0 -13
  100. data/upgrade_gem.sh +0 -4
  101. data/upgrade_ruby.sh +0 -45
@@ -1,59 +0,0 @@
1
- #!/bin/bash --login
2
- debug=false
3
- export PACKER_LOG=1
4
- set -e
5
-
6
- function usage() {
7
- echo -e "USAGE: ${0} <build || debug>"
8
- exit 1
9
- }
10
-
11
- function pack() {
12
- packer_provider_template=$1
13
- debug=$2
14
- packer_secrets='./packer_secrets.json'
15
-
16
- if [[ $CRYPTUM_ROOT == '' ]]; then
17
- if [[ ! -d '/opt/cryptum' ]]; then
18
- cryptum_root=$(pwd)
19
- else
20
- cryptum_root='/opt/cryptum'
21
- fi
22
- else
23
- cryptum_root="${CRYPTUM_ROOT}"
24
- fi
25
-
26
- cd $cryptum_root/docker
27
-
28
- if $debug; then
29
- packer build \
30
- -debug \
31
- -only docker \
32
- -var "box_version=latest" \
33
- -var "ssh_auth_sock=${SSH_AUTH_SOCK}" \
34
- -var-file=$packer_secrets \
35
- $packer_provider_template
36
- else
37
- packer build \
38
- -only docker \
39
- -var "box_version=latest" \
40
- -var "ssh_auth_sock=${SSH_AUTH_SOCK}" \
41
- -var-file=$packer_secrets \
42
- $packer_provider_template
43
- fi
44
- }
45
-
46
- if [[ $# < 1 ]]; then
47
- usage
48
- fi
49
-
50
- action="${1}"
51
-
52
- case $action in
53
- 'build')
54
- pack ./cryptum.json false;;
55
- 'debug')
56
- pack ./cryptum.json true;;
57
- '*')
58
- usage;;
59
- esac
@@ -1,7 +0,0 @@
1
- {
2
- "repository": "AWS ECR Repository to Upload Container",
3
- "aws_access_key": "AWS ACCESS KEY",
4
- "aws_secret_key": "AWS SECRET ACCESS KEY"
5
- "aws_token": "AWS STS TOKEN"
6
- "aws_profile": "AWS Shared Credentials Profile Used for Communication"
7
- }
@@ -1,11 +0,0 @@
1
- #!/bin/bash --login
2
- source /etc/profile.d/globals.sh
3
-
4
- cryptum_root="${CRYPTUM_ROOT}"
5
-
6
- echo "Installing cryptum Dependencies..."
7
- $screen_cmd "${apt} install -y tmux ${assess_update_errors}"
8
- grok_error
9
-
10
- sudo /bin/bash --login -c "cd ${cryptum_root} && ./build_cryptum_gem.sh"
11
- /bin/bash --login -c "cd ${cryptum_root} && ./init_cryptum_web.sh start"
@@ -1,2 +0,0 @@
1
- #!/bin/bash
2
- echo 'source /etc/profile.d/rvm.sh' >> ~/.bashrc
@@ -1,22 +0,0 @@
1
- #!/bin/bash --login
2
- source /etc/profile.d/globals.sh
3
-
4
- key1='409B6B1796C275462A1703113804BB82D39DC0E3'
5
- key2='7D2BAF1CF37B13E2069D6956105BD0E739499BDB'
6
-
7
- # sudo /bin/bash --login -c "gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys ${key1} ${key2}"
8
- $screen_cmd "curl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import - ${assess_update_errors}"
9
- grok_error
10
-
11
- $screen_cmd "curl -sSL https://rvm.io/pkuczynski.asc | sudo gpg2 --import - ${assess_update_errors}"
12
- grok_error
13
-
14
- $screen_cmd "echo -e \"trust\n5\ny\n\" | gpg2 --no-tty --command-fd 0 --edit-key ${key1} ${assess_update_errors}"
15
- grok_error
16
-
17
- $screen_cmd "echo -e \"trust\n5\ny\n\" | gpg2 --no-tty --command-fd 0 --edit-key ${key2} ${assess_update_errors}"
18
- grok_error
19
-
20
- # Multi-user install required due to the need to run MSFRPCD as root w/in metasploit gemset
21
- $screen_cmd "curl -sSL https://get.rvm.io | sudo bash -s latest ${assess_update_errors}"
22
- grok_error
@@ -1,28 +0,0 @@
1
- #!/bin/bash --login
2
- source /etc/profile.d/globals.sh
3
-
4
- cryptum_env_file='/etc/profile.d/cryptum_envs.sh'
5
-
6
- $screen_cmd "chmod 755 ${cryptum_env_file} ${assess_update_errors}"
7
- grok_error
8
-
9
- $screen_cmd "${apt} install -y curl gnupg2 openssh-server net-tools"
10
- grok_error
11
-
12
- $screen_cmd "service ssh start"
13
- grok_error
14
-
15
- $screen_cmd "${apt} dist-upgrade -y ${assess_update_errors}"
16
- grok_error
17
-
18
- $screen_cmd "${apt} full-upgrade -y ${assess_update_errors}"
19
- grok_error
20
-
21
- $screen_cmd "useradd -m -s /bin/bash admin ${assess_update_errors}"
22
- grok_error
23
-
24
- $screen_cmd "usermod -aG sudo admin ${assess_update_errors}"
25
- grok_error
26
-
27
- # Restrict Home Directory
28
- sudo chmod 700 /home/admin
@@ -1,6 +0,0 @@
1
- #!/bin/bash --login
2
- # TODO: Cleanup up history, cloning keys, etc.
3
-
4
- ln -sf /dev/null /root/.bash_history
5
- ln -sf /dev/null /home/admin/.bash_history
6
- history -c
@@ -1,16 +0,0 @@
1
- #!/bin/bash --login
2
- source /etc/profile.d/globals.sh
3
-
4
- cryptum_root="${CRYPTUM_ROOT}"
5
-
6
- $screen_cmd "${apt} install -y build-essential bison openssl libreadline-dev curl git-core git zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev autoconf libc6-dev ncurses-dev automake libtool libpcap-dev libsqlite3-dev libgmp-dev ${assess_update_errors}"
7
- grok_error
8
-
9
- # Clone now to get the proper version of Ruby
10
- sudo /bin/bash --login -c "mkdir /root/.ssh"
11
- sudo /bin/bash --login -c "ssh-keyscan -H github.com > /root/.ssh/known_hosts"
12
- sudo /bin/bash --login -c "git clone ssh://git@github.com/0dayinc/cryptum.git ${cryptum_root}"
13
-
14
- ruby_version=`cat ${cryptum_root}/.ruby-version`
15
- ruby_gemset=`cat ${cryptum_root}/.ruby-gemset`
16
- sudo /bin/bash --login -c "source /etc/profile.d/rvm.sh && rvm install ruby-${ruby_version}"
@@ -1,49 +0,0 @@
1
- #!/bin/bash --login
2
- cryptum_env_file='/etc/profile.d/cryptum_envs.sh'
3
-
4
- apt update && apt install -y sudo screen apt-utils
5
-
6
- sudo tee -a $cryptum_env_file << EOF
7
- export SSH_AUTH_SOCK=/ssh-agent
8
- export CRYPTUM_ROOT='/opt/cryptum'
9
- EOF
10
-
11
- sudo tee -a /etc/profile.d/globals.sh << 'EOF'
12
- #!/bin/bash --login
13
- export DEBIAN_FRONTEND=noninteractive
14
- export TERM=xterm
15
-
16
- screen_session=`basename -- ${0} .sh`
17
- screen_cmd="screen -T xterm -L -S ${screen_session} -d -m sudo /bin/bash --login -c"
18
- assess_update_errors='|| echo IMAGE_ABORT && exit 1'
19
- debconf_set='/usr/bin/debconf-set-selections'
20
- apt="DEBIAN_FRONTEND=noninteractive apt -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confnew'"
21
-
22
- grok_error() {
23
- while true; do
24
- # Wait until screen exits session
25
- screen -ls | grep $screen_session
26
- if [[ $? == 1 ]]; then
27
- grep IMAGE_ABORT screenlog.*
28
- if [[ $? == 0 ]]; then
29
- echo "Failures encountered in $(ls screenlog.*) for ${screen_session} session!!!"
30
- cat screenlog.*
31
- rm screenlog.*
32
- exit 1
33
- else
34
- echo "No errors in $(ls screenlog.*) detected...moving onto the next."
35
- ls screenlog.* > /dev/null 2>&1
36
- if [[ $? == 0 ]]; then
37
- rm screenlog.*
38
- fi
39
- break
40
- fi
41
- else
42
- printf '.'
43
- sleep 9
44
- fi
45
- done
46
- }
47
- EOF
48
-
49
- sudo chmod 755 /etc/profile.d/globals.sh
File without changes
@@ -1,10 +0,0 @@
1
- #---------------------------------------#
2
- # Enable Artifical Intelligence #
3
- #---------------------------------------#
4
- artifical_intelligence: true
5
-
6
- #---------------------------------------#
7
- # Goals & Risk Management %s #
8
- #---------------------------------------#
9
- autotrade_portfolio_percent: 10.00
10
- target_profit_margin_percent: 20.00
@@ -1,8 +0,0 @@
1
- prod:
2
- api_key: ''
3
- api_secret: ''
4
- api_passphrase: ''
5
- sandbox:
6
- api_key: ''
7
- api_secret: ''
8
- api_passphrase: ''
@@ -1 +0,0 @@
1
- bearer_token: ''
data/git_commit.sh DELETED
@@ -1,22 +0,0 @@
1
- #!/bin/bash --login
2
- if [[ $1 != "" && $2 != "" && $3 != "" ]]; then
3
- # Default Strategy is to merge codebase
4
- git config pull.rebase false
5
- git config commit.gpgsign true
6
- git pull origin master
7
- git add . --all
8
- echo 'Updating Gems to Latest Versions in Gemfile...'
9
- ./upgrade_Gemfile_gems.sh
10
- cryptum_autoinc_version
11
- git commit -a -S --author="${1} <${2}>" -m "${3}"
12
- ./upgrade_cryptum.sh
13
- # Tag for every 100 commits (i.e. 0.1.100, 0.1.200, etc)
14
- tag_this_version_bool=`ruby -r 'cryptum' -e 'if Cryptum::VERSION.split(".")[-1].to_i % 100 == 0; then print true; else print false; end'`
15
- if [[ $tag_this_version_bool == 'true' ]]; then
16
- this_version=`ruby -r 'cryptum' -e 'print Cryptum::VERSION'`
17
- echo "Tagging: ${this_version}"
18
- git tag $this_version
19
- fi
20
- else
21
- echo "USAGE: ${0} '<full name>' <email address> '<git commit comments>'"
22
- fi