Skip to content

Commit

Permalink
Merge pull request #965 from mesg-foundation/feature/single-output-pt…
Browse files Browse the repository at this point in the history
…-1-2

Simplify output for system services
  • Loading branch information
krhubert authored May 20, 2019
2 parents 0b54217 + 0bf787f commit edef6f5
Show file tree
Hide file tree
Showing 4 changed files with 273 additions and 344 deletions.
102 changes: 30 additions & 72 deletions systemservices/ethwallet/mesg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,11 @@ tasks:
name: "List accounts"
description: "Return the addresses of existing account."
outputs:
success:
name: "Success"
description: "Output when the task executes successfully."
data:
addresses:
name: "Addresses"
description: "List of addresses."
type: String
repeated: true
error: &outputError
name: "Error"
description: "Output when an error occurs."
data:
message:
name: "Message"
description: "The error message."
type: String
addresses:
name: "Addresses"
description: "List of addresses."
type: String
repeated: true
create:
name: "Create a new account"
description: "Create a new account with a passphrase. Make sure to backup the passphrase."
Expand All @@ -37,53 +25,38 @@ tasks:
description: "Passphrase to use with the account."
type: String
outputs:
success:
name: "Success"
description: "Output when the task executes successfully."
data:
address: &address
name: "Address"
description: "The public address of the account."
type: String
error: *outputError
address: &address
name: "Address"
description: "The public address of the account."
type: String
delete:
name: "Delete an account"
description: "Delete an account from the wallet. Need the address and its associated passphrase."
inputs:
address: *address
passphrase: *passphrase
outputs:
success:
name: "Success"
description: "Output when the task executes successfully."
data:
address: *address
error: *outputError
address: *address
export:
name: "Export an account"
description: "Export an existing account in order to backup it and import it in an other wallet. Respect the Web3 Secret Storage specification. See https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition for more information."
inputs:
address: *address
passphrase: *passphrase
outputs:
success:
name: "Success"
description: "Output when the task executes successfully."
data: &account
address: *address
id:
name: "ID"
description: "The id of the account."
type: String
version:
name: "Version"
description: "The version used to export the account."
type: Number
crypto:
name: "Crypto"
description: "The encrypted account."
type: Object
error: *outputError
outputs: &account
address: *address
id:
name: "ID"
description: "The id of the account."
type: String
version:
name: "Version"
description: "The version used to export the account."
type: Number
crypto:
name: "Crypto"
description: "The encrypted account."
type: Object
import:
name: "Import an account"
description: "Import an account. The account have to respect the Web3 Secret Storage specification. See https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition for more information."
Expand All @@ -95,12 +68,7 @@ tasks:
object: *account
passphrase: *passphrase
outputs:
success:
name: "Success"
description: "Output when the task executes successfully."
data:
address: *address
error: *outputError
address: *address
sign:
name: "Sign transaction"
description: "Sign a transaction with the specified account."
Expand Down Expand Up @@ -141,15 +109,10 @@ tasks:
description: "The data of the transaction."
type: String
outputs:
success:
name: "Success"
description: "Output when the task executes successfully."
data:
signedTransaction:
name: "Signed transaction"
description: "The signed transaction."
type: String
error: *outputError
signedTransaction:
name: "Signed transaction"
description: "The signed transaction."
type: String
importFromPrivateKey:
name: "Import an account from a private key"
description: "Import an account from a private key."
Expand All @@ -160,9 +123,4 @@ tasks:
type: String
passphrase: *passphrase
outputs:
success:
name: "Success"
description: "Output when the task executes successfully."
data:
address: *address
error: *outputError
address: *address
Loading

0 comments on commit edef6f5

Please sign in to comment.