-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
111 lines (103 loc) · 2.93 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
defmodule Tradehub.MixProject do
use Mix.Project
@source_url "https://github.com/anhmv/tradehub-elixir"
@version "0.1.17"
def project do
[
name: "Tradehub",
app: :tradehub,
description: "Elixir wrapper for the Switcheo Tradehub API",
version: @version,
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
docs: docs(),
package: package()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
autostart_ws = Application.fetch_env!(:tradehub, :autostart_websocket)
extra_applications = [:logger, :crypto, :httpoison, :websockex, :libsecp256k1]
mod = if autostart_ws, do: {Tradehub.App, []}, else: []
[
mod: mod,
extra_applications: extra_applications
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:libsecp256k1, ">= 0.1.10"},
{:basefiftyeight, "~> 0.1.0"},
{:pbkdf2_elixir, ">= 1.3.0"},
{:bech32, "~> 1.0.0"},
{:httpoison, "~> 1.8.0"},
{:jason, "~> 1.2.2"},
{:websockex, "~> 0.4.3"},
{:phoenix_pubsub, "~> 2.0"},
{:ex_doc, "~> 0.14", only: :dev, runtime: false},
{:excoveralls, "~> 0.10", only: :test}
]
end
defp docs do
[
main: "readme",
authors: ["Anh Mac <anhmv91@gmail.com>"],
source_url: @source_url,
extras: ["README.md"],
groups_for_modules: [
Account: [Tradehub.Wallet, Tradehub.Account],
Authenticated: [
Tradehub.Tx,
Tradehub.Tx.ActivateSubAccount,
Tradehub.Tx.AddLiquidity,
Tradehub.Tx.CancelAllOrders,
Tradehub.Tx.CancelOrder,
Tradehub.Tx.ClaimPoolRewards,
Tradehub.Tx.CreateOrder,
Tradehub.Tx.CreateSubAccount,
Tradehub.Tx.CreateValidator,
Tradehub.Tx.DelegateTokens,
Tradehub.Tx.EditOrder,
Tradehub.Tx.RedelegatingTokens,
Tradehub.Tx.RemoveLiquidity,
Tradehub.Tx.SendToken,
Tradehub.Tx.SetLeverage,
Tradehub.Tx.SetMargin,
Tradehub.Tx.StakePoolToken,
Tradehub.Tx.Type,
Tradehub.Tx.UnbondingTokens,
Tradehub.Tx.UnstakePoolToken,
Tradehub.Tx.UpdateProfile,
Tradehub.Tx.Validator,
Tradehub.Tx.Withdraw,
Tradehub.Tx.WithdrawDelegatorRewards
],
Public: [
Tradehub.Exchange,
Tradehub.Fee,
Tradehub.Protocol,
Tradehub.Statistics,
Tradehub.Ticker,
Tradehub.Trade
],
WebSocket: [Tradehub.Stream]
]
]
end
defp package do
[
name: "tradehub",
licenses: ["MIT"],
links: %{"GitHub" => @source_url}
]
end
end