Issues (104)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

src/FactomApi.php (31 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace AdrianMejias\FactomApi;
4
5
class FactomApi extends FactomConnector
6
{
7
    /**
8
     * Every directory block has a KeyMR (Key Merkle Root), which can be used to retrieve it.
9
     *
10
     * @url https://docs.factom.com/api#directory-block
11
     *
12
     * @return json { object header, object entryblocklist }
13
     */
14
    public function directoryBlock(string $keymr)
15
    {
16
        $result = $this->callEndpoint('directory-block', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('dir...ay('KeyMR' => $keymr)); of type object|string adds the type string to the return on line 21 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::directoryBlock of type AdrianMejias\FactomApi\json.
Loading history...
17
      'KeyMR' => $keymr,
18
    ]);
19
20
        // return Result
21
        return $result;
22
    }
23
24
    /**
25
     * The directory block head is the last known directory block by factom, or in other words, the
26
     * most recently recorded block.
27
     *
28
     * @url https://docs.factom.com/api#directory-block-head
29
     *
30
     * @return json { string keymr }
31
     */
32
    public function directoryBlockHead()
33
    {
34
        $result = $this->callEndpoint('directory-block-head', 'POST');
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('dir...y-block-head', 'POST'); of type object|string adds the type string to the return on line 37 which is incompatible with the return type documented by AdrianMejias\FactomApi\F...Api::directoryBlockHead of type AdrianMejias\FactomApi\json.
Loading history...
35
36
        // return Result
37
        return $result;
38
    }
39
40
    /**
41
     * Returns various heights that allows you to view the state of the blockchain.
42
     *
43
     * @url https://docs.factom.com/api#heights
44
     *
45
     * @return json { ... }
46
     */
47
    public function heights()
48
    {
49
        $result = $this->callEndpoint('heights', 'POST');
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('heights', 'POST'); of type object|string adds the type string to the return on line 52 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::heights of type AdrianMejias\FactomApi\json.
Loading history...
50
51
        // return Result
52
        return $result;
53
    }
54
55
    /**
56
     * Retrieve an entry or transaction in raw format, the data is a hex encoded string.
57
     *
58
     * @url https://docs.factom.com/api#raw-data
59
     *
60
     * @return json { string data }
61
     */
62
    public function rawData(string $hash)
63
    {
64
        $result = $this->callEndpoint('raw-data', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('raw...rray('hash' => $hash)); of type object|string adds the type string to the return on line 69 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::rawData of type AdrianMejias\FactomApi\json.
Loading history...
65
      'hash' => $hash,
66
    ]);
67
68
        // return Result
69
        return $result;
70
    }
71
72
    /**
73
     * Retrieve a directory block given only its height.
74
     *
75
     * @url https://docs.factom.com/api#dblock-by-height
76
     *
77
     * @return json { object dblock, string rawdata }
78
     */
79
    public function dblockByHeight(int $height)
80
    {
81
        $result = $this->callEndpoint('dblock-by-height', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('dbl...('height' => $height)); of type object|string adds the type string to the return on line 86 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::dblockByHeight of type AdrianMejias\FactomApi\json.
Loading history...
82
      'height' => $height,
83
    ]);
84
85
        // return Result
86
        return $result;
87
    }
88
89
    /**
90
     * Retrieve administrative blocks for any given height.
91
     *
92
     * @url https://docs.factom.com/api#ablock-by-height
93
     *
94
     * @return json { object ablock, string rawdata }
95
     */
96
    public function ablockByHeight(int $height)
97
    {
98
        $result = $this->callEndpoint('ablock-by-height', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('abl...('height' => $height)); of type object|string adds the type string to the return on line 103 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::ablockByHeight of type AdrianMejias\FactomApi\json.
Loading history...
99
      'height' => $height,
100
    ]);
101
102
        // return Result
103
        return $result;
104
    }
105
106
    /**
107
     * Retrieve the entry credit block for any given height.
108
     *
109
     * @url https://docs.factom.com/api#ecblock-by-height
110
     *
111
     * @return json { object ecblock, string rawdata }
112
     */
113
    public function ecblockByHeight(int $height)
114
    {
115
        $result = $this->callEndpoint('ecblock-by-height', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('ecb...('height' => $height)); of type object|string adds the type string to the return on line 120 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::ecblockByHeight of type AdrianMejias\FactomApi\json.
Loading history...
116
      'height' => $height,
117
    ]);
118
119
        // return Result
120
        return $result;
121
    }
122
123
    /**
124
     * Retrieve the factoid block for any given height.
125
     *
126
     * @url https://docs.factom.com/api#fblock-by-height
127
     *
128
     * @return json { object fblock, string rawdata }
129
     */
130
    public function fblockByHeight(int $height)
131
    {
132
        $result = $this->callEndpoint('fblock-by-height', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('fbl...('height' => $height)); of type object|string adds the type string to the return on line 137 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::fblockByHeight of type AdrianMejias\FactomApi\json.
Loading history...
133
      'height' => $height,
134
    ]);
135
136
        // return Result
137
        return $result;
138
    }
139
140
    /**
141
     * Retrieve a specified factoid block given its merkle root key.
142
     *
143
     * @url https://docs.factom.com/api#factoid-block
144
     *
145
     * @return json { object fblock, string rawdata }
146
     */
147
    public function factoidBlock(string $keymr)
148
    {
149
        $result = $this->callEndpoint('factoid-block', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('fac...ay('KeyMR' => $keymr)); of type object|string adds the type string to the return on line 154 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::factoidBlock of type AdrianMejias\FactomApi\json.
Loading history...
150
      'KeyMR' => $keymr,
151
    ]);
152
153
        // return Result
154
        return $result;
155
    }
156
157
    /**
158
     * Retrieve a specified entrycredit block given its merkle root key.
159
     *
160
     * @url https://docs.factom.com/api#entrycredit-block
161
     *
162
     * @return json { object ecblock, string rawdata }
163
     */
164
    public function entrycreditBlock(string $keymr)
165
    {
166
        $result = $this->callEndpoint('entrycredit-block', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('ent...ay('KeyMR' => $keymr)); of type object|string adds the type string to the return on line 171 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::entrycreditBlock of type AdrianMejias\FactomApi\json.
Loading history...
167
      'KeyMR' => $keymr,
168
    ]);
169
170
        // return Result
171
        return $result;
172
    }
173
174
    /**
175
     * Retrieve a specified admin block given its merkle root key.
176
     *
177
     * @url https://docs.factom.com/api#admin-block
178
     *
179
     * @return json { object ablock, string rawdata }
180
     */
181
    public function adminBlock(string $keymr)
182
    {
183
        $result = $this->callEndpoint('admin-block', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('adm...ay('KeyMR' => $keymr)); of type object|string adds the type string to the return on line 188 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::adminBlock of type AdrianMejias\FactomApi\json.
Loading history...
184
      'KeyMR' => $keymr,
185
    ]);
186
187
        // return Result
188
        return $result;
189
    }
190
191
    /**
192
     * Retrieve a specified entry block given its merkle root key.
193
     *
194
     * @url https://docs.factom.com/api#entry-block
195
     *
196
     * @return json { object header, object entrylist }
197
     */
198
    public function entryBlock(string $keymr)
199
    {
200
        $result = $this->callEndpoint('entry-block', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('ent...ay('KeyMR' => $keymr)); of type object|string adds the type string to the return on line 205 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::entryBlock of type AdrianMejias\FactomApi\json.
Loading history...
201
      'KeyMR' => $keymr,
202
    ]);
203
204
        // return Result
205
        return $result;
206
    }
207
208
    /**
209
     * Get an Entry from factomd specified by the Entry Hash.
210
     *
211
     * @url https://docs.factom.com/api#entry
212
     *
213
     * @return json { string chainid, string content, array extids }
214
     */
215
    public function entry(string $hash)
216
    {
217
        $result = $this->callEndpoint('entry', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('ent...rray('Hash' => $hash)); of type object|string adds the type string to the return on line 222 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::entry of type AdrianMejias\FactomApi\json.
Loading history...
218
      'Hash' => $hash,
219
    ]);
220
221
        // return Result
222
        return $result;
223
    }
224
225
    /**
226
     * Returns an array of the entries that have been submitted but have not been recoreded into the blockchain.
227
     *
228
     * @url https://docs.factom.com/api#pending-entries
229
     *
230
     * @return json { array ... }
231
     */
232
    public function pendingEntries()
233
    {
234
        $result = $this->callEndpoint('pending-entries', 'POST');
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('pending-entries', 'POST'); of type object|string adds the type string to the return on line 237 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::pendingEntries of type AdrianMejias\FactomApi\json.
Loading history...
235
236
        // return Result
237
        return $result;
238
    }
239
240
    /**
241
     * Retrieve details of a factoid transaction using a transactions hash.
242
     *
243
     * @url https://docs.factom.com/api#transaction
244
     *
245
     * @return json { object ... }
246
     */
247
    public function transaction(string $hash)
248
    {
249
        $result = $this->callEndpoint('transaction', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('tra...rray('hash' => $hash)); of type object|string adds the type string to the return on line 254 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::transaction of type AdrianMejias\FactomApi\json.
Loading history...
250
      'hash' => $hash,
251
    ]);
252
253
        // return Result
254
        return $result;
255
    }
256
257
    /**
258
     * This api call is used to find the status of a transaction, whether it be a factoid, reveal entry, or commit entry.
259
     *
260
     * @url https://docs.factom.com/api#ack
261
     *
262
     * @return json { object ... }
263
     */
264
    public function ack(string $hash, string $chainid, string $fulltransaction = null)
265
    {
266
        $result = $this->callEndpoint('ack', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('ack... => $fulltransaction)); of type object|string adds the type string to the return on line 273 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::ack of type AdrianMejias\FactomApi\json.
Loading history...
267
      'hash' => $hash,
268
      'chainid' => $chainid,
269
      'fulltransaction' => $fulltransaction,
270
    ]);
271
272
        // return Result
273
        return $result;
274
    }
275
276
    /**
277
     * Factoid Acknowledgements will give the current status of a transaction.
278
     *
279
     * @status Depricated - please refer to ack.
280
     *
281
     * @url https://docs.factom.com/api#factoid-ack
282
     *
283
     * @return json { object ... }
284
     */
285
    public function factoidAck(string $txid)
286
    {
287
        $result = $this->callEndpoint('factoid-ack', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('fac...rray('TxID' => $txid)); of type object|string adds the type string to the return on line 292 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::factoidAck of type AdrianMejias\FactomApi\json.
Loading history...
288
      'TxID' => $txid,
289
    ]);
290
291
        // return Result
292
        return $result;
293
    }
294
295
    /**
296
     * Entry Acknowledgements will give the current status of a transaction.
297
     *
298
     * @status Depricated - please refer to ack.
299
     *
300
     * @url https://docs.factom.com/api#factoid-ack
301
     *
302
     * @return json { object ... }
303
     */
304
    public function entryAck(string $txid)
305
    {
306
        $result = $this->callEndpoint('entry-ack', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('ent...rray('TxID' => $txid)); of type object|string adds the type string to the return on line 311 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::entryAck of type AdrianMejias\FactomApi\json.
Loading history...
307
      'TxID' => $txid,
308
    ]);
309
310
        // return Result
311
        return $result;
312
    }
313
314
    /**
315
     * Retrieve a reciept providing cryptographially verfiable proof that information was
316
     * recorded in the factom blockchain and that this was subsequently anchored in the
317
     * bitcoin blockchain.
318
     *
319
     * @url https://docs.factom.com/api#receipt
320
     *
321
     * @return json { object ... }
322
     */
323
    public function receipt(string $hash)
324
    {
325
        $result = $this->callEndpoint('receipt', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('rec...rray('hash' => $hash)); of type object|string adds the type string to the return on line 330 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::receipt of type AdrianMejias\FactomApi\json.
Loading history...
326
      'hash' => $hash,
327
    ]);
328
329
        // return Result
330
        return $result;
331
    }
332
333
    /**
334
     * Returns an array of factoid transactions that have not yet been recorded in the blockchain,
335
     * but are known to the system.
336
     *
337
     * @url https://docs.factom.com/api#pending-transactions
338
     *
339
     * @return json { string TransactionID, string Status }
340
     */
341
    public function pendingTransactions(string $address)
342
    {
343
        $result = $this->callEndpoint('pending-transactions', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('pen...Address' => $address)); of type object|string adds the type string to the return on line 348 which is incompatible with the return type documented by AdrianMejias\FactomApi\F...pi::pendingTransactions of type AdrianMejias\FactomApi\json.
Loading history...
344
      'Address' => $address,
345
    ]);
346
347
        // return Result
348
        return $result;
349
    }
350
351
    /**
352
     * Return the keymr of the head of the chain for a chain ID
353
     * (the unique hash created when the chain was created).
354
     *
355
     * @url https://docs.factom.com/api#chain-head
356
     *
357
     * @return json { string ChainHead }
358
     */
359
    public function chainHead(string $chainid)
360
    {
361
        $result = $this->callEndpoint('chain-head', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('cha...ChainID' => $chainid)); of type object|string adds the type string to the return on line 366 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::chainHead of type AdrianMejias\FactomApi\json.
Loading history...
362
      'ChainID' => $chainid,
363
    ]);
364
365
        // return Result
366
        return $result;
367
    }
368
369
    /**
370
     * Return its current balance for a specific entry credit address.
371
     *
372
     * @url https://docs.factom.com/api#entry-credit-balance
373
     *
374
     * @return json { int balance }
375
     */
376
    public function entryCreditBalance(string $address)
377
    {
378
        $result = $this->callEndpoint('entry-credit-balance', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('ent...address' => $address)); of type object|string adds the type string to the return on line 383 which is incompatible with the return type documented by AdrianMejias\FactomApi\F...Api::entryCreditBalance of type AdrianMejias\FactomApi\json.
Loading history...
379
      'address' => $address,
380
    ]);
381
382
        // return Result
383
        return $result;
384
    }
385
386
    /**
387
     * This call returns the number of Factoshis (Factoids *10^-8) that are currently
388
     * available at the address specified.
389
     *
390
     * @url https://docs.factom.com/api#factoid-balance
391
     *
392
     * @return json { int balance }
393
     */
394
    public function factoidBalance(string $address)
395
    {
396
        $result = $this->callEndpoint('factoid-balance', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('fac...address' => $address)); of type object|string adds the type string to the return on line 401 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::factoidBalance of type AdrianMejias\FactomApi\json.
Loading history...
397
      'address' => $address,
398
    ]);
399
400
        // return Result
401
        return $result;
402
    }
403
404
    /**
405
     * Returns the number of Factoshis (Factoids *10^-8) that purchase a single Entry Credit.
406
     *
407
     * @url https://docs.factom.com/api#entry-credit-rate
408
     *
409
     * @return json { int rate }
410
     */
411
    public function entryCreditRate()
412
    {
413
        $result = $this->callEndpoint('entry-credit-rate', 'POST');
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('entry-credit-rate', 'POST'); of type object|string adds the type string to the return on line 416 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::entryCreditRate of type AdrianMejias\FactomApi\json.
Loading history...
414
415
        // return Result
416
        return $result;
417
    }
418
419
    /**
420
     * Retrieve current properties of the Factom system, including the software and the API versions.
421
     *
422
     * @url https://docs.factom.com/api#properties
423
     *
424
     * @return json { string factomdversion, string factomdapiversion }
425
     */
426
    public function properties()
427
    {
428
        $result = $this->callEndpoint('properties', 'POST');
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('properties', 'POST'); of type object|string adds the type string to the return on line 431 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::properties of type AdrianMejias\FactomApi\json.
Loading history...
429
430
        // return Result
431
        return $result;
432
    }
433
434
    /**
435
     * Submit a factoid transaction.
436
     *
437
     * @url https://docs.factom.com/api#factoid-submit
438
     *
439
     * @return json { string message, string txid }
440
     */
441
    public function factoidSubmit(string $transaction)
442
    {
443
        $result = $this->callEndpoint('factoid-submit', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('fac...ion' => $transaction)); of type object|string adds the type string to the return on line 448 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::factoidSubmit of type AdrianMejias\FactomApi\json.
Loading history...
444
      'transaction' => $transaction,
445
    ]);
446
447
        // return Result
448
        return $result;
449
    }
450
451
    /**
452
     * Send a Chain Commit Message to factomd to create a new Chain.
453
     *
454
     * @url https://docs.factom.com/api#commit-chain
455
     *
456
     * @return json { string message, string txid, string entryhash, string chainid }
457
     */
458
    public function commitChain(string $message)
459
    {
460
        $result = $this->callEndpoint('commit-chain', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('com...message' => $message)); of type object|string adds the type string to the return on line 465 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::commitChain of type AdrianMejias\FactomApi\json.
Loading history...
461
      'message' => $message,
462
    ]);
463
464
        // return Result
465
        return $result;
466
    }
467
468
    /**
469
     * Reveal the First Entry in a Chain to factomd after the Commit to compleate the Chain creation.
470
     *
471
     * @url https://docs.factom.com/api#reveal-chain
472
     *
473
     * @return json { string message, string txid, string entryhash, string chainid }
474
     */
475
    public function revealChain(string $entry)
476
    {
477
        $result = $this->callEndpoint('reveal-chain', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('rev...ay('entry' => $entry)); of type object|string adds the type string to the return on line 482 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::revealChain of type AdrianMejias\FactomApi\json.
Loading history...
478
      'entry' => $entry,
479
    ]);
480
481
        // return Result
482
        return $result;
483
    }
484
485
    /**
486
     * Send an Entry Commit Message to factom to create a new Entry.
487
     *
488
     * @url https://docs.factom.com/api#commit-entry
489
     *
490
     * @return json { string message, string txid, string entryhash }
491
     */
492
    public function commitEntry(string $message)
493
    {
494
        $result = $this->callEndpoint('commit-entry', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('com...message' => $message)); of type object|string adds the type string to the return on line 499 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::commitEntry of type AdrianMejias\FactomApi\json.
Loading history...
495
      'message' => $message,
496
    ]);
497
498
        // return Result
499
        return $result;
500
    }
501
502
    /**
503
     * Reveal an Entry to factomd after the Commit to compleate the Entry creation.
504
     *
505
     * @url https://docs.factom.com/api#reveal-entry
506
     *
507
     * @return json { string message, string txid, string entryhash, string chainid }
508
     */
509
    public function revealEntry(string $entry)
510
    {
511
        $result = $this->callEndpoint('reveal-entry', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('rev...ay('entry' => $entry)); of type object|string adds the type string to the return on line 516 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::revealEntry of type AdrianMejias\FactomApi\json.
Loading history...
512
      'entry' => $entry,
513
    ]);
514
515
        // return Result
516
        return $result;
517
    }
518
519
    /**
520
     * Send a raw hex encoded binary message to the Factom network.
521
     *
522
     * @url https://docs.factom.com/api#send-raw-message
523
     *
524
     * @return json { string message }
525
     */
526
    public function sendRawMessage(string $message)
527
    {
528
        $result = $this->callEndpoint('send-raw-message', 'POST', [
0 ignored issues
show
Bug Compatibility introduced by
The expression $this->callEndpoint('sen...message' => $message)); of type object|string adds the type string to the return on line 533 which is incompatible with the return type documented by AdrianMejias\FactomApi\FactomApi::sendRawMessage of type AdrianMejias\FactomApi\json.
Loading history...
529
      'message' => $message,
530
    ]);
531
532
        // return Result
533
        return $result;
534
    }
535
}
536