diff --git a/source/includes/_commands.md b/source/includes/_commands.md index f0418ed..0230e29 100644 --- a/source/includes/_commands.md +++ b/source/includes/_commands.md @@ -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" } - ], … + ] } ``` @@ -164,9 +164,9 @@ message AppendRole { { "command_type": "AppendRole", "account_id": "takemiya@test", - "role_name": "Administrator" + "role_name": "admin" } - ], … + ] } ``` @@ -201,11 +201,11 @@ message CreateAccount { "commands": [ { "command_type": "CreateAccount", - "account_name": "makoto.takemiya", + "account_name": "makoto", "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 } - ], … + ] } ``` @@ -280,9 +280,9 @@ message CreateDomain { { "command_type": "CreateDomain", "domain_id": "test2", - "default_role": "User" + "default_role": "user" } - ], … + ] } ``` @@ -317,13 +317,12 @@ message CreateRole { "commands": [ { "command_type": "CreateRole", - "role_name": "MoneyCreator", + "role_name": "moneycreator", "permissions": [ - "CanAddAssetQuantity", - … + "can_add_asset_qty" ] } - ], … + ] } ``` @@ -359,7 +358,7 @@ message DetachRole { "account_id": "test@test", "role_name": "user" } - ], … + ] } ``` @@ -393,9 +392,9 @@ message GrantPermission { { "command_type": "GrantPermission", "account_id": "takemiya@soramitsu", - "permission_name": "CanAddAssetQuantity" + "permission_name": "can_add_asset_qty" } - ], … + ] } ``` @@ -429,9 +428,9 @@ message RemoveSignatory { { "command_type": "RemoveSignatory", "account_id": "takemiya@test", - "public_key": string(64) + "public_key": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83" } - ], … + ] } ``` @@ -469,9 +468,9 @@ message RevokePermission { { "command_type": "RevokePermission", "account_id": "takemiya@soramitsu", - "permission_name": "CanAddAssetQuantity" + "permission_name": "can_add_asset_qty" } - ], … + ] } ``` @@ -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 } } - ], … + ] } ``` diff --git a/source/includes/_queries.md b/source/includes/_queries.md index d60d999..3d449e3 100644 --- a/source/includes/_queries.md +++ b/source/includes/_queries.md @@ -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" }, - "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" } ``` @@ -554,4 +552,4 @@ message RolePermissionsResponse { Field | Description | Constraint -------------- | -------------- | -------------- -Permissions | array of permissions related to the role | string of permissions related to the role \ No newline at end of file +Permissions | array of permissions related to the role | string of permissions related to the role diff --git a/source/includes/_transactions.md b/source/includes/_transactions.md index ac0e7e3..5ce66c0 100644 --- a/source/includes/_transactions.md +++ b/source/includes/_transactions.md @@ -9,13 +9,24 @@ message Transaction { } ``` ```json -{ - /* Transaction */ - "signatures": array of objects, - "created_ts": int(13), - "creator_account_id": string(?), - "tx_counter": int, - "commands": array of objects +{ + "signatures":[ + { + "pubkey":"407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", + "signature":"81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" + } + ], + "created_ts":1517560129182, + "creator_account_id":"admin@test", + "tx_counter":1, + "commands":[ + { + "command_type":"CreateAccount", + "account_name":"makoto", + "domain_id":"test", + "main_pubkey":"407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83" + } + ] } ``` @@ -50,16 +61,15 @@ message Payload { } ``` ```json -{ - "commands": [ - { - "command_type": string(?), - /* other command-specific fields */ - } - ], - "creator_account_id": string(?), - "tx_counter": int, - "created_ts": int(13) +{ + "commands":[ + { + /* command-specific fields */ + } + ], + "creator_account_id":"admin@test", + "tx_counter":1, + "created_ts":1517560129182 } ``` @@ -72,13 +82,13 @@ message Signature { } ``` ```json -{ - "signatures": [ - { - "pubkey": string(64), - "signature": string(128), - } - ], … +{ + "signatures":[ + { + "pubkey":"407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", + "signature":"81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" + } + ] } ```