rq rename
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
%% @doc dindu: Decentralized Identity Namespace Disambiguation Utility
|
%% @doc rq: Decentralized Identity Namespace Disambiguation Utility
|
||||||
-module(dindu).
|
-module(rq).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.0").
|
||||||
-author("Peter Harpending").
|
-author("Peter Harpending").
|
||||||
-copyright("Peter Harpending").
|
-copyright("Peter Harpending").
|
||||||
@@ -12,46 +12,45 @@
|
|||||||
|
|
||||||
start(ArgV) ->
|
start(ArgV) ->
|
||||||
ok = hz(),
|
ok = hz(),
|
||||||
du(ArgV);
|
du(ArgV).
|
||||||
|
|
||||||
|
|
||||||
du(["-s" | Rest]) -> dindu(Rest);
|
du(["-s" | Rest]) -> rq(Rest);
|
||||||
du(["--shell" | Rest]) -> dindu(Rest);
|
du(["--shell" | Rest]) -> rq(Rest);
|
||||||
du(Rest) -> dindu(Rest), zx:silent_stop().
|
du(Rest) -> rq(Rest), zx:silent_stop().
|
||||||
|
|
||||||
|
|
||||||
dindu(["debug" | _]) ->
|
rq(["nuffin"]) ->
|
||||||
|
ok = io:format("hz status: ~tp~n", [hz:status()]),
|
||||||
ok = io:format("rbx_tuples: ~tp~n", [rbx_tuples()]),
|
ok = io:format("rbx_tuples: ~tp~n", [rbx_tuples()]),
|
||||||
ok = io:format("my akstr:~n~ts~n~n", [my_akstr()]),
|
ok = io:format("my akstr:~n~ts~n~n", [my_akstr()]),
|
||||||
ok = io:format("names ct aaci:~n~tp~n~n", [nct_aaci()]),
|
ok = io:format("names ct aaci:~n~tp~n~n", [nct_aaci()]),
|
||||||
ok = io:format("rubicon ct aaci:~n~tp~n~n", [rct_aaci()]),
|
ok = io:format("rubicon ct aaci:~n~tp~n~n", [rct_aaci()]),
|
||||||
ok;
|
ok;
|
||||||
dindu(["src", "names.aes"]) ->
|
rq(["src", "names.aes"]) ->
|
||||||
{ok, Bytes} = file:read_file(nct_filepath());
|
{ok, Bytes} = file:read_file(nct_filepath()),
|
||||||
io:format("~s", [Bytes]);
|
io:format("~s", [Bytes]);
|
||||||
dindu(["src", "rubicon.aes"]) ->
|
rq(["src", "rubicon.aes"]) ->
|
||||||
{ok, Bytes} = file:read_file(rct_filepath());
|
{ok, Bytes} = file:read_file(rct_filepath()),
|
||||||
io:format("~s", [Bytes]);
|
io:format("~s", [Bytes]);
|
||||||
dindu(["-h" | _]) ->
|
|
||||||
dindu_help();
|
|
||||||
dindu(["--help" | _]) ->
|
|
||||||
dindu_help();
|
|
||||||
dindu(["help" | _]) ->
|
|
||||||
dindu_help();
|
|
||||||
dindu(BadArgs) ->
|
|
||||||
io:format("arguments are a failure: ~tp~n", [BadArgs]),
|
|
||||||
dindu_help().
|
|
||||||
|
|
||||||
dindu_help() ->
|
rq(["-h" | _]) -> rq_help();
|
||||||
|
rq(["--help" | _]) -> rq_help();
|
||||||
|
rq(["help" | _]) -> rq_help();
|
||||||
|
rq(BadArgs) ->
|
||||||
|
io:format("arguments are a failure: ~tp~n", [BadArgs]),
|
||||||
|
rq_help().
|
||||||
|
|
||||||
|
rq_help() ->
|
||||||
io:format("~ts~n", [help_screen()]).
|
io:format("~ts~n", [help_screen()]).
|
||||||
|
|
||||||
help_screen() ->
|
help_screen() ->
|
||||||
"""
|
"""
|
||||||
dindu = Decentralized Identity Namespace Disambiguation Utility
|
rq = Decentralized Identity Namespace Disambiguation Utility
|
||||||
version 0.0.0 + 0.0.1i
|
version 0.0.0 + 0.0.1i
|
||||||
|
|
||||||
USAGE: dindu [ARGS]
|
USAGE: rq [ARGS]
|
||||||
"""
|
""".
|
||||||
|
|
||||||
%du_register(
|
%du_register(
|
||||||
|
|
||||||
@@ -87,9 +86,6 @@ ct_dir() ->
|
|||||||
my_akstr() ->
|
my_akstr() ->
|
||||||
unicode:characters_to_list(gmser_api_encoder:encode(account_pubkey, my_pubkey32())).
|
unicode:characters_to_list(gmser_api_encoder:encode(account_pubkey, my_pubkey32())).
|
||||||
|
|
||||||
my_balance() ->
|
|
||||||
|
|
||||||
|
|
||||||
my_pubkey32() ->
|
my_pubkey32() ->
|
||||||
maps:get(public, my_keypair()).
|
maps:get(public, my_keypair()).
|
||||||
|
|
||||||
@@ -108,8 +104,7 @@ my_seed() ->
|
|||||||
hz() ->
|
hz() ->
|
||||||
ok = application:ensure_started(hakuzaru),
|
ok = application:ensure_started(hakuzaru),
|
||||||
ok = hz:tls(false),
|
ok = hz:tls(false),
|
||||||
ok = hz:chain_nodes(hz_nodes()),
|
ok = hz:chain_nodes(hz_nodes()).
|
||||||
ok = io:format("hz status: ~tp~n", [hz:status()]).
|
|
||||||
|
|
||||||
hz_nodes() ->
|
hz_nodes() ->
|
||||||
[ {"tsuriai.jp", 4013}
|
[ {"tsuriai.jp", 4013}
|
||||||
@@ -127,7 +122,7 @@ rbx_tuples() ->
|
|||||||
|
|
||||||
%% deploying
|
%% deploying
|
||||||
deploy_rct_with(RbxTuples) ->
|
deploy_rct_with(RbxTuples) ->
|
||||||
case hz:contract_create(my_akstr(), rct_filepath(), [rbx_tuples()]) of
|
case hz:contract_create(my_akstr(), rct_filepath(), [RbxTuples]) of
|
||||||
{ok, CreateTx} ->
|
{ok, CreateTx} ->
|
||||||
deploy_rct_II(CreateTx);
|
deploy_rct_II(CreateTx);
|
||||||
Error ->
|
Error ->
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
{name,"dindu"}.
|
{name,"rq"}.
|
||||||
{type,cli}.
|
{type,cli}.
|
||||||
{modules,[]}.
|
{modules,[]}.
|
||||||
{mod,"dindu"}.
|
{mod,"rq"}.
|
||||||
{author,"Peter Harpending"}.
|
{author,"Peter Harpending"}.
|
||||||
{prefix,none}.
|
{prefix,none}.
|
||||||
{desc,[]}.
|
{desc,[]}.
|
||||||
{package_id,{"otpr","dindu",{0,1,0}}}.
|
{package_id,{"otpr","rq",{0,1,0}}}.
|
||||||
{deps,[{"otpr","base58",{0,1,1}},
|
{deps,[{"otpr","base58",{0,1,1}},
|
||||||
{"otpr","eblake2",{1,0,1}},
|
{"otpr","eblake2",{1,0,1}},
|
||||||
{"otpr","gmserialization",{0,1,3}},
|
{"otpr","gmserialization",{0,1,3}},
|
||||||
Reference in New Issue
Block a user