Skip to content

Commit e78b07d

Browse files
authored
Merge pull request #3 from semasping/master
New commands in database api
2 parents 40e77fc + eab2637 commit e78b07d

5 files changed

+68
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
4+
namespace GrapheneNodeClient\Commands\DataBase;
5+
6+
7+
class GetAccountCountCommand extends CommandAbstract
8+
{
9+
/** @var string */
10+
protected $method = 'get_account_count';
11+
12+
/** @var array */
13+
protected $queryDataMap = [];
14+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
4+
namespace GrapheneNodeClient\Commands\DataBase;
5+
6+
7+
class GetAccountHistoryCommand extends CommandAbstract
8+
{
9+
/** @var string */
10+
protected $method = 'get_account_history';
11+
12+
/** @var array */
13+
protected $queryDataMap = [
14+
'0' => ['string'], //authors
15+
'1' => ['integer'], //from
16+
'2' => ['integer'], //limit max 2000
17+
];
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
4+
namespace GrapheneNodeClient\Commands\DataBase;
5+
6+
7+
class GetAccountVotesCommand extends CommandAbstract
8+
{
9+
/** @var string */
10+
protected $method = 'get_account_votes';
11+
12+
/** @var array */
13+
protected $queryDataMap = [
14+
'0' => ['string'], //account name
15+
];
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
4+
namespace GrapheneNodeClient\Commands\DataBase;
5+
6+
7+
class GetBlockHeaderCommand extends CommandAbstract
8+
{
9+
/** @var string */
10+
protected $method = 'get_block_header';
11+
12+
/** @var array */
13+
protected $queryDataMap = [
14+
'0' => ['integer'], //block_id
15+
];
16+
}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,13 @@ namespace:
8585
### database_api
8686
- GetDynamicGlobalPropertiesCommand
8787
- GetBlockCommand
88+
- GetBlockHeaderCommand
8889
- GetWitnessesByVoteCommand
8990
- GetActiveWitnessesCommand
9091
- GetAccountCommand
92+
- GetAccountCountCommand
93+
- GetAccountHistoryCommand
94+
- GetAccountVotesCommand
9195
- GetContentCommand
9296
- GetDiscussionsByAuthorBeforeDateCommand
9397
- GetDiscussionsByBlogCommand

0 commit comments

Comments
 (0)