Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Fix examples, add valid keys case #56

Open
wants to merge 9 commits into
base: docs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 28 additions & 29 deletions source/includes/_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ message Amount {
"account_id": "test@test",
"asset_id": "coin#test",
"amount": {
"value": string,
"precision": int
"value": "200",
"precision": 2
}
}
], …
]
}
```

Expand Down Expand Up @@ -84,10 +84,10 @@ message Peer {
"command_type": "AddPeer",
"peer": {
"address": "192.168.1.1:50001",
"peer_key": string(64)
"peer_key": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83"
}
},
], …
}
]
}
```

Expand Down Expand Up @@ -123,9 +123,9 @@ message AddSignatory {
{
"command_type": "AddSignatory",
"account_id": "test@test",
"public_key": string(64)
"public_key": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83"
}
], …
]
}
```

Expand Down Expand Up @@ -166,7 +166,7 @@ message AppendRole {
"account_id": "takemiya@test",
"role_name": "Administrator"
}
], …
]
}
```

Expand Down Expand Up @@ -203,9 +203,9 @@ message CreateAccount {
"command_type": "CreateAccount",
"account_name": "makoto.takemiya",
"domain_id": "test",
"main_pubkey": string
"main_pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83"
}
], …
]
}
```

Expand Down Expand Up @@ -243,9 +243,9 @@ message CreateAsset {
"command_type": "CreateAsset",
"asset_name": "usd",
"domain_id": "test",
"precision": "2"
"precision": 2
}
], …
]
}
```

Expand Down Expand Up @@ -282,7 +282,7 @@ message CreateDomain {
"domain_id": "test2",
"default_role": "User"
}
], …
]
}
```

Expand Down Expand Up @@ -319,11 +319,10 @@ message CreateRole {
"command_type": "CreateRole",
"role_name": "MoneyCreator",
"permissions": [
"CanAddAssetQuantity",
"CanAddAssetQuantity"
Copy link

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

]
}
], …
]
}
```

Expand Down Expand Up @@ -357,9 +356,9 @@ message DetachRole {
{
"command_type": "DetachRole",
"account_id": "test@test",
"role_name": "user"
"role_name": "User"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Role should be in lower case

}
], …
]
}
```

Expand Down Expand Up @@ -395,7 +394,7 @@ message GrantPermission {
"account_id": "takemiya@soramitsu",
"permission_name": "CanAddAssetQuantity"
}
], …
]
}
```

Expand Down Expand Up @@ -429,9 +428,9 @@ message RemoveSignatory {
{
"command_type": "RemoveSignatory",
"account_id": "takemiya@test",
"public_key": string(64)
"public_key": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83"
}
], …
]
}
```

Expand Down Expand Up @@ -471,7 +470,7 @@ message RevokePermission {
"account_id": "takemiya@soramitsu",
"permission_name": "CanAddAssetQuantity"
}
], …
]
}
```

Expand Down Expand Up @@ -508,7 +507,7 @@ message SetAccountDetail{
"key": "position",
"value": "Co-CEO"
}
], …
]
}
```

Expand Down Expand Up @@ -546,7 +545,7 @@ message SetAccountQuorum {
"account_id": "takemiya@test",
"quorum": 5
}
], …
]
}
```

Expand Down Expand Up @@ -599,11 +598,11 @@ message Amount {
"account_id": "test@test",
"asset_id": "coin#test",
"amount": {
"value": string,
"precision": int
"value": "200",
"precision": 2
}
}
], …
]
}
```

Expand Down Expand Up @@ -651,7 +650,7 @@ message TransferAsset {
"precision": 0
}
}
], …
]
}
```

Expand Down
68 changes: 33 additions & 35 deletions source/includes/_queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -145,10 +143,10 @@ message GetSignatories {
{
"signature":
{
"pubkey": "",
"signature": ""
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83",
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all of the signatures are the same?

Copy link
Contributor

Choose a reason for hiding this comment

The 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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"]
}
```

Expand Down Expand Up @@ -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"
}
```

Expand Down Expand Up @@ -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"
}
```

Expand Down Expand Up @@ -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"
}
```

Expand Down Expand Up @@ -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"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again role

}
```

Expand All @@ -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
Loading