Merge pull request 'Allow spending to contract addresses' (#23) from contract-spend into master

Reviewed-on: #23
This commit was merged in pull request #23.
This commit is contained in:
2026-05-10 17:57:00 +09:00
12 changed files with 18 additions and 19 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
{included_applications,[]},
{applications,[stdlib,kernel]},
{description,"Gajumaru interoperation library"},
{vsn,"0.9.0"},
{vsn,"0.9.1"},
{modules,[hakuzaru,hz,hz_aaci,hz_fetcher,hz_format,hz_grids,
hz_key_master,hz_man,hz_sophia,hz_sup]},
{mod,{hakuzaru,[]}}]}.
+1 -1
View File
@@ -6,7 +6,7 @@
%%% @end
-module(hakuzaru).
-vsn("0.9.0").
-vsn("0.9.1").
-author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("GPL-3.0-or-later").
+6 -7
View File
@@ -23,7 +23,7 @@
%%% @end
-module(hz).
-vsn("0.9.0").
-vsn("0.9.1").
-author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("GPL-3.0-or-later").
@@ -1708,7 +1708,7 @@ spend(SenderID,
Nonce,
Payload,
NetworkID) ->
case decode_account_id(unicode:characters_to_binary(SenderID)) of
case gmser_api_encoder:safe_decode(account_pubkey, unicode:characters_to_binary(SenderID)) of
{ok, DSenderID} ->
spend2(gmser_id:create(account, DSenderID),
SecKey,
@@ -1752,11 +1752,10 @@ spend2(DSenderID,
decode_account_id(B) ->
try
{account_pubkey, PK} = gmser_api_encoder:decode(B),
{ok, PK}
catch
E:R -> {E, R}
case gmser_api_encoder:safe_decode(account_pubkey, B) of
{ok, PK} -> {ok, PK};
{error, invalid_prefix} -> gmser_api_encoder:safe_decode(contract_pubkey, B);
Error -> Error
end.
+1 -1
View File
@@ -10,7 +10,7 @@
%%% @end
-module(hz_aaci).
-vsn("0.9.0").
-vsn("0.9.1").
-author("Jarvis Carroll <spiveehere@gmail.com>").
-copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("GPL-3.0-or-later").
+1 -1
View File
@@ -1,5 +1,5 @@
-module(hz_fetcher).
-vsn("0.9.0").
-vsn("0.9.1").
-author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("MIT").
+1 -1
View File
@@ -21,7 +21,7 @@
%%% @end
-module(hz_format).
-vsn("0.9.0").
-vsn("0.9.1").
-author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>").
-license("GPL-3.0-or-later").
+1 -1
View File
@@ -37,7 +37,7 @@
%%% @end
-module(hz_grids).
-vsn("0.9.0").
-vsn("0.9.1").
-export([url/2, url/3, url/4, parse/1, req/2, req/3, req/4]).
+1 -1
View File
@@ -8,7 +8,7 @@
%%% @end
-module(hz_key_master).
-vsn("0.9.0").
-vsn("0.9.1").
-export([make_key/1, encode/1, decode/1]).
-export([lcg/1]).
+1 -1
View File
@@ -9,7 +9,7 @@
%%% @end
-module(hz_man).
-vsn("0.9.0").
-vsn("0.9.1").
-behavior(gen_server).
-author("Craig Everett <ceverett@tsuriai.jp>").
-copyright("Craig Everett <ceverett@tsuriai.jp>").
+1 -1
View File
@@ -1,5 +1,5 @@
-module(hz_sophia).
-vsn("0.9.0").
-vsn("0.9.1").
-author("Jarvis Carroll <spiveehere@gmail.com>").
-copyright("Jarvis Carroll <spiveehere@gmail.com>").
-license("GPL-3.0-or-later").
+1 -1
View File
@@ -9,7 +9,7 @@
%%% @end
-module(hz_sup).
-vsn("0.9.0").
-vsn("0.9.1").
-behaviour(supervisor).
-author("Craig Everett <zxq9@zxq9.com>").
-copyright("Craig Everett <zxq9@zxq9.com>").
+2 -2
View File
@@ -1,10 +1,10 @@
{name,"Hakuzaru"}.
{type,app}.
{modules,[]}.
{author,"Craig Everett"}.
{prefix,"hz"}.
{desc,"Gajumaru interoperation library"}.
{author,"Craig Everett"}.
{package_id,{"otpr","hakuzaru",{0,9,0}}}.
{package_id,{"otpr","hakuzaru",{0,9,1}}}.
{deps,[{"otpr","sophia",{9,0,0}},
{"otpr","gmserialization",{0,1,3}},
{"otpr","gmbytecode",{3,4,1}},