Compare commits

...

4 Commits

13 changed files with 96 additions and 19 deletions

2
.gitignore vendored
View File

@ -8,9 +8,7 @@ cancer
erl_crash.dump erl_crash.dump
ebin/*.beam ebin/*.beam
doc/*.html doc/*.html
doc/*.css
doc/edoc-info doc/edoc-info
doc/erlang.png
rel/example_project rel/example_project
.concrete/DEV_MODE .concrete/DEV_MODE
.rebar .rebar

BIN
doc/erlang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

75
doc/stylesheet.css Normal file
View File

@ -0,0 +1,75 @@
/* standard EDoc style sheet */
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
margin-left: .25in;
margin-right: .2in;
margin-top: 0.2in;
margin-bottom: 0.2in;
color: #696969;
background-color: #ffffff;
}
a:link{
color: #000000;
}
a:visited{
color: #000000;
}
a:hover{
color: #d8613c;
}
h1,h2 {
margin-left: -0.2in;
}
div.navbar {
background-color: #000000;
padding: 0.2em;
}
h2.indextitle {
padding: 0.4em;
color: #dfdfdf;
background-color: #000000;
}
div.navbar a:link {
color: #dfdfdf;
}
div.navbar a:visited {
color: #dfdfdf;
}
div.navbar a:hover {
color: #d8613c;
}
h3.function,h3.typedecl {
background-color: #000000;
color: #dfdfdf;
padding-left: 1em;
}
div.spec {
margin-left: 2em;
background-color: #eeeeee;
}
a.module {
text-decoration:none
}
a.module:hover {
background-color: #eeeeee;
}
ul.definitions {
list-style-type: none;
}
ul.index {
list-style-type: none;
background-color: #eeeeee;
}
/*
* Minor style tweaks
*/
ul {
list-style-type: square;
}
table {
border-collapse: collapse;
}
td {
padding: 3
}

View File

@ -3,7 +3,7 @@
{included_applications,[]}, {included_applications,[]},
{applications,[stdlib,kernel]}, {applications,[stdlib,kernel]},
{description,"Gajumaru interoperation library"}, {description,"Gajumaru interoperation library"},
{vsn,"0.8.2"}, {vsn,"0.8.3"},
{modules,[hakuzaru,hz,hz_fetcher,hz_format,hz_grids, {modules,[hakuzaru,hz,hz_fetcher,hz_format,hz_grids,
hz_key_master,hz_man,hz_sup]}, hz_key_master,hz_man,hz_sup]},
{mod,{hakuzaru,[]}}]}. {mod,{hakuzaru,[]}}]}.

View File

@ -6,7 +6,7 @@
%%% @end %%% @end
-module(hakuzaru). -module(hakuzaru).
-vsn("0.8.2"). -vsn("0.8.3").
-author("Craig Everett <ceverett@tsuriai.jp>"). -author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>"). -copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("GPL-3.0-or-later"). -license("GPL-3.0-or-later").

View File

@ -23,7 +23,7 @@
%%% @end %%% @end
-module(hz). -module(hz).
-vsn("0.8.2"). -vsn("0.8.3").
-author("Craig Everett <ceverett@tsuriai.jp>"). -author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>"). -copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("GPL-3.0-or-later"). -license("GPL-3.0-or-later").

View File

@ -1,5 +1,5 @@
-module(hz_fetcher). -module(hz_fetcher).
-vsn("0.8.2"). -vsn("0.8.3").
-author("Craig Everett <ceverett@tsuriai.jp>"). -author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>"). -copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("MIT"). -license("MIT").

View File

@ -21,7 +21,7 @@
%%% @end %%% @end
-module(hz_format). -module(hz_format).
-vsn("0.8.2"). -vsn("0.8.3").
-author("Craig Everett <ceverett@tsuriai.jp>"). -author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>"). -copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("GPL-3.0-or-later"). -license("GPL-3.0-or-later").

View File

@ -37,8 +37,8 @@
%%% @end %%% @end
-module(hz_grids). -module(hz_grids).
-vsn("0.8.2"). -vsn("0.8.3").
-export([url/2, url/3, url/4, parse/1, req/2, req/3]). -export([url/2, url/3, url/4, parse/1, req/2, req/3, req/4]).
-spec url(Instruction, HTTP) -> Result -spec url(Instruction, HTTP) -> Result
@ -193,24 +193,28 @@ l_to_i(S) ->
req(Type, Message) -> req(Type, Message) ->
req(Type, Message, false). req(Type, Message, false).
req(sign, Message, ID) -> req(Type, Message, ID) ->
{ok, NetworkID} = hz:network_id(),
req(Type, Message, ID, NetworkID).
req(sign, Message, ID, NetworkID) ->
#{"grids" => 1, #{"grids" => 1,
"chain" => "gajumaru", "chain" => "gajumaru",
"network_id" => hz:network_id(), "network_id" => NetworkID,
"type" => "message", "type" => "message",
"public_id" => ID, "public_id" => ID,
"payload" => Message}; "payload" => Message};
req(tx, Data, ID) -> req(tx, Data, ID, NetworkID) ->
#{"grids" => 1, #{"grids" => 1,
"chain" => "gajumaru", "chain" => "gajumaru",
"network_id" => hz:network_id(), "network_id" => NetworkID,
"type" => "tx", "type" => "tx",
"public_id" => ID, "public_id" => ID,
"payload" => Data}; "payload" => Data};
req(ack, Message, ID) -> req(ack, Message, ID, NetworkID) ->
#{"grids" => 1, #{"grids" => 1,
"chain" => "gajumaru", "chain" => "gajumaru",
"network_id" => hz:network_id(), "network_id" => NetworkID,
"type" => "ack", "type" => "ack",
"public_id" => ID, "public_id" => ID,
"payload" => Message}. "payload" => Message}.

View File

@ -8,7 +8,7 @@
%%% @end %%% @end
-module(hz_key_master). -module(hz_key_master).
-vsn("0.8.2"). -vsn("0.8.3").
-export([make_key/1, encode/1, decode/1]). -export([make_key/1, encode/1, decode/1]).

View File

@ -9,7 +9,7 @@
%%% @end %%% @end
-module(hz_man). -module(hz_man).
-vsn("0.8.2"). -vsn("0.8.3").
-behavior(gen_server). -behavior(gen_server).
-author("Craig Everett <ceverett@tsuriai.jp>"). -author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>"). -copyright("Craig Everett <ceverett@tsuriai.jp>").

View File

@ -9,7 +9,7 @@
%%% @end %%% @end
-module(hz_sup). -module(hz_sup).
-vsn("0.8.2"). -vsn("0.8.3").
-behaviour(supervisor). -behaviour(supervisor).
-author("Craig Everett <zxq9@zxq9.com>"). -author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>"). -copyright("Craig Everett <zxq9@zxq9.com>").

View File

@ -4,7 +4,7 @@
{prefix,"hz"}. {prefix,"hz"}.
{desc,"Gajumaru interoperation library"}. {desc,"Gajumaru interoperation library"}.
{author,"Craig Everett"}. {author,"Craig Everett"}.
{package_id,{"otpr","hakuzaru",{0,8,2}}}. {package_id,{"otpr","hakuzaru",{0,8,3}}}.
{deps,[{"otpr","sophia",{9,0,0}}, {deps,[{"otpr","sophia",{9,0,0}},
{"otpr","gmserialization",{0,1,3}}, {"otpr","gmserialization",{0,1,3}},
{"otpr","gmbytecode",{3,4,1}}, {"otpr","gmbytecode",{3,4,1}},