-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathArkClient.php
More file actions
101 lines (82 loc) · 2.22 KB
/
ArkClient.php
File metadata and controls
101 lines (82 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
declare(strict_types=1);
namespace ArkEcosystem\Client;
use ArkEcosystem\Client\API\ApiNodes;
use ArkEcosystem\Client\API\Blockchain;
use ArkEcosystem\Client\API\Blocks;
use ArkEcosystem\Client\API\Commits;
use ArkEcosystem\Client\API\Contracts;
use ArkEcosystem\Client\API\EVM;
use ArkEcosystem\Client\API\Node;
use ArkEcosystem\Client\API\Peers;
use ArkEcosystem\Client\API\Receipts;
use ArkEcosystem\Client\API\Rounds;
use ArkEcosystem\Client\API\Transactions;
use ArkEcosystem\Client\API\Validators;
use ArkEcosystem\Client\API\Votes;
use ArkEcosystem\Client\API\Wallets;
use GuzzleHttp\HandlerStack;
class ArkClient
{
public Connection $connection;
public function __construct(string|array $hostOrHosts, array $clientConfig = [], ?HandlerStack $handler = null)
{
$this->connection = new Connection($hostOrHosts, $clientConfig, $handler);
}
public function apiNodes(): ApiNodes
{
return new ApiNodes($this->connection);
}
public function blockchain(): Blockchain
{
return new Blockchain($this->connection);
}
public function blocks(): Blocks
{
return new Blocks($this->connection);
}
public function commits(): Commits
{
return new Commits($this->connection);
}
public function contracts(): Contracts
{
return new Contracts($this->connection);
}
public function evm(): EVM
{
return new EVM($this->connection);
}
public function node(): Node
{
return new Node($this->connection);
}
public function peers(): Peers
{
return new Peers($this->connection);
}
public function receipts(): Receipts
{
return new Receipts($this->connection);
}
public function rounds(): Rounds
{
return new Rounds($this->connection);
}
public function transactions(): Transactions
{
return new Transactions($this->connection);
}
public function validators(): Validators
{
return new Validators($this->connection);
}
public function votes(): Votes
{
return new Votes($this->connection);
}
public function wallets(): Wallets
{
return new Wallets($this->connection);
}
}