This commit is contained in:
2026-05-21 20:05:00 +09:00
parent 77ff0ca084
commit 0a217049b1
3 changed files with 14 additions and 5 deletions
+8 -3
View File
@@ -183,6 +183,11 @@ sign_binary(Request) ->
gd_server:cast(?MODULE, {sign_binary, Request}).
-spec sign_binary(ID, Message) -> Result
when ID :: binary(),
Message :: binary(),
Result :: {ok, Sig :: binary()} | {error, bad_key}.
sign_binary(ID, Message) ->
gd_server:call(?MODULE, {sign_binary, ID, Message}).
@@ -461,6 +466,9 @@ handle_call(chain_id, _, State) ->
handle_call({sign_call, ChainID, PubKey, TX}, _, State) ->
Response = do_sign_call(State, ChainID, PubKey, TX),
{reply, Response, State};
handle_call({sign_binary, ID, Message}, _, State) ->
Response = do_sign_binary(ID, Message, State),
{reply, Response, State};
handle_call({open_wallet, Path, Phrase}, _, State) ->
{Response, NewState} = do_open_wallet(Path, Phrase, State),
{reply, Response, NewState};
@@ -522,9 +530,6 @@ handle_cast({sign_mess, Request}, State) ->
handle_cast({sign_binary, Request}, State) ->
ok = do_sign_binary(Request, State),
{noreply, State};
handle_cast({sign_binary, ID, Message}, State) ->
ok = do_sign_binary(ID, Message, State),
{noreply, State};
handle_cast({sign_tx, Request}, State) ->
ok = do_sign_tx(Request, State),
{noreply, State};