This repository has been archived by the owner on Jan 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Fix examples, add valid keys case #56
Open
grimadas
wants to merge
9
commits into
hyperledger-iroha:docs
Choose a base branch
from
grimadas:docs
base: docs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a005277
Fix examples, add valid keys
grimadas bc33718
Merge branch 'docs' into docs
grimadas 78197f0
Remove three dots in docs
grimadas cc2aa64
Remove three dots in commands
grimadas bad2fd5
Merge branch 'docs' of https://github.com/grimadas/iroha-api into docs
grimadas f7f8caa
Add json fix, beautify and format
grimadas 815cf46
Update commands
grimadas a62411e
Fix commands parameters
grimadas 3672eac
Fix tx parameters
grimadas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,11 +38,11 @@ message Amount { | |
"account_id": "test@test", | ||
"asset_id": "coin#test", | ||
"amount": { | ||
"value": string, | ||
"precision": int | ||
"value": "200", | ||
"precision": 2 | ||
} | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -84,10 +84,10 @@ message Peer { | |
"command_type": "AddPeer", | ||
"peer": { | ||
"address": "192.168.1.1:50001", | ||
"peer_key": string(64) | ||
"peer_key": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83" | ||
} | ||
}, | ||
], … | ||
} | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -123,9 +123,9 @@ message AddSignatory { | |
{ | ||
"command_type": "AddSignatory", | ||
"account_id": "test@test", | ||
"public_key": string(64) | ||
"public_key": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83" | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -166,7 +166,7 @@ message AppendRole { | |
"account_id": "takemiya@test", | ||
"role_name": "Administrator" | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -203,9 +203,9 @@ message CreateAccount { | |
"command_type": "CreateAccount", | ||
"account_name": "makoto.takemiya", | ||
"domain_id": "test", | ||
"main_pubkey": string | ||
"main_pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83" | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -243,9 +243,9 @@ message CreateAsset { | |
"command_type": "CreateAsset", | ||
"asset_name": "usd", | ||
"domain_id": "test", | ||
"precision": "2" | ||
"precision": 2 | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -282,7 +282,7 @@ message CreateDomain { | |
"domain_id": "test2", | ||
"default_role": "User" | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -319,11 +319,10 @@ message CreateRole { | |
"command_type": "CreateRole", | ||
"role_name": "MoneyCreator", | ||
"permissions": [ | ||
"CanAddAssetQuantity", | ||
… | ||
"CanAddAssetQuantity" | ||
] | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -357,9 +356,9 @@ message DetachRole { | |
{ | ||
"command_type": "DetachRole", | ||
"account_id": "test@test", | ||
"role_name": "user" | ||
"role_name": "User" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Role should be in lower case |
||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -395,7 +394,7 @@ message GrantPermission { | |
"account_id": "takemiya@soramitsu", | ||
"permission_name": "CanAddAssetQuantity" | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -429,9 +428,9 @@ message RemoveSignatory { | |
{ | ||
"command_type": "RemoveSignatory", | ||
"account_id": "takemiya@test", | ||
"public_key": string(64) | ||
"public_key": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83" | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -471,7 +470,7 @@ message RevokePermission { | |
"account_id": "takemiya@soramitsu", | ||
"permission_name": "CanAddAssetQuantity" | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -508,7 +507,7 @@ message SetAccountDetail{ | |
"key": "position", | ||
"value": "Co-CEO" | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -546,7 +545,7 @@ message SetAccountQuorum { | |
"account_id": "takemiya@test", | ||
"quorum": 5 | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -599,11 +598,11 @@ message Amount { | |
"account_id": "test@test", | ||
"asset_id": "coin#test", | ||
"amount": { | ||
"value": string, | ||
"precision": int | ||
"value": "200", | ||
"precision": 2 | ||
} | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
@@ -651,7 +650,7 @@ message TransferAsset { | |
"precision": 0 | ||
} | ||
} | ||
], … | ||
] | ||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,8 @@ | |
GetRolePermissions get_role_permissions = 10; | ||
GetAssetInfo get_asset_info = 11; | ||
} | ||
// used to prevent replay attacks. | ||
uint64 query_counter = 12; | ||
} | ||
|
||
Payload payload = 1; | ||
Signature signature = 2; | ||
} | ||
|
@@ -81,10 +79,10 @@ message GetAccount { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetAccount", | ||
|
@@ -145,10 +143,10 @@ message GetSignatories { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why all of the signatures are the same? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is just an example, don't worry |
||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetSignatories", | ||
|
@@ -197,10 +195,10 @@ message GetAccountTransactions { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetAccountTransactions", | ||
|
@@ -251,10 +249,10 @@ message GetAccountAssetTransactions { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetAccountAssetTransactions", | ||
|
@@ -305,14 +303,14 @@ message GetTransactions { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetTransactions", | ||
"tx_hashes": [string(64),…] | ||
"tx_hashes": ["bf6edb882d53f5532cb416455834878db7af08fb814f8c95d6867a6d9eea4057"] | ||
} | ||
``` | ||
|
||
|
@@ -359,15 +357,15 @@ message GetAccountAssets { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetAccountAssets", | ||
"account_id": "test@test", | ||
"asset_id": "coin#test", | ||
"asset_id": "coin#test" | ||
} | ||
``` | ||
|
||
|
@@ -421,14 +419,14 @@ message GetAssetInfo { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetAssetInfo", | ||
"asset_id": "coin#test", | ||
"asset_id": "coin#test" | ||
} | ||
``` | ||
|
||
|
@@ -480,13 +478,13 @@ message GetRoles { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetRoles", | ||
"query_type" : "GetRoles" | ||
} | ||
``` | ||
|
||
|
@@ -527,14 +525,14 @@ message GetRolePermissions { | |
{ | ||
"signature": | ||
{ | ||
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" | ||
}, | ||
"created_ts": …, | ||
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetRolePermissions", | ||
"role_id" : "MoneyCreator", | ||
"role_id" : "MoneyCreator" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again role |
||
} | ||
``` | ||
|
||
|
@@ -554,4 +552,4 @@ message RolePermissionsResponse { | |
|
||
Field | Description | Constraint | ||
-------------- | -------------- | -------------- | ||
Permissions | array of permissions related to the role | string of permissions related to the role | ||
Permissions | array of permissions related to the role | string of permissions related to the role |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was changed to
can_add_asset_quantity
at hyperledger-iroha/iroha@999a1c7