WIP
This commit is contained in:
+8
-3
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user