diff --git a/libs/awcp/src/awcp.ts b/libs/awcp/src/awcp.ts index c1163a1..850a4d4 100644 --- a/libs/awcp/src/awcp.ts +++ b/libs/awcp/src/awcp.ts @@ -140,32 +140,12 @@ * @module */ -// TODO: TS code style guide -// TODO: annotate everything with examples // TODONE: enumerate RPC errors -// TODO: move Safe in here +// TODO: examples + // TODO: constants for method names -//============================================================================= -// IMPORTS -//============================================================================= - -//import type { -// ERROR_TYPE_RpcInvalidTransactionError, -// ERROR_TYPE_RpcBroadcastError, -// ERROR_TYPE_RpcRejectedByUserError, -// ERROR_TYPE_RpcUnsupportedProtocolError, -// ERROR_TYPE_RpcConnectionDenyError, -// ERROR_TYPE_RpcNotAuthorizeError, -// ERROR_TYPE_RpcPermissionDenyError, -// ERROR_TYPE_RpcInternalError, -// ERROR_TYPE_RpcMethodNotFoundError, -//} from './errcode.js'; - - - - //============================================================================= // EXPORTS //============================================================================= @@ -226,6 +206,13 @@ export { RpcResp_W2A_tx_sign_noprop, EventData_A2W_tx_sign_noprop, EventData_W2A_tx_sign_noprop + // transaction.sign (do not propagate) + Params_A2W_msg_sign, + Result_W2A_msg_sign, + RpcCall_A2W_msg_sign, + RpcResp_W2A_msg_sign, + EventData_A2W_msg_sign, + EventData_W2A_msg_sign }; @@ -715,6 +702,71 @@ type EventData_A2W_tx_sign_noprop +/** + * Event data for aepp-to-waellet "transaction.sign" (do not propagate) response + * + * (layer 2) + */ +type EventData_W2A_tx_sign_noprop + = EventData_W2A; + + +//---------------------------------------------------------------------------- +// message.sign +//---------------------------------------------------------------------------- + +/** + * Parameters for "transaction.sign" (do not propagate) + * + * (layer 4) + */ +type Params_A2W_msg_sign + = {message : string, + onAccount : string} + + + +/** + * Success result type for "transaction.sign" (do not propagate) + * + * (layer 4) + */ +type Result_W2A_tx_sign_noprop + = {signedTransaction : string}; + + +/** + * Request type for "transaction.sign" (do not propagate) + * + * (layer 3) + */ +type RpcCall_A2W_tx_sign_noprop + = RpcCall<"transaction.sign", + Params_A2W_tx_sign_noprop>; + + + +/** + * Response type for "transaction.sign" (do not propagate) + * + * (layer 3) + */ +type RpcResp_W2A_tx_sign_noprop + = RpcResp<"transaction.sign", + Result_W2A_tx_sign_noprop>; + + + +/** + * Event data for aepp-to-waellet "transaction.sign" (do not propagate) message + * + * (layer 2) + */ +type EventData_A2W_tx_sign_noprop + = EventData_A2W; + + + /** * Event data for aepp-to-waellet "transaction.sign" (do not propagate) response * diff --git a/sidekick/jex.eterms b/sidekick/jex.eterms index 46cae36..1e1ea93 100644 --- a/sidekick/jex.eterms +++ b/sidekick/jex.eterms @@ -1,5 +1,5 @@ {type, library}. {realm, local}. {name, sidekick}. -{version, "0.1.0"}. +{version, "0.2.0"}. {deps, ["local-awcp-0.1.0"]}.