Skip to content

Commit 3cf3a23

Browse files
author
Michael
committed
Update ReadMe Examples for Litecoin
1 parent aac2019 commit 3cf3a23

File tree

2 files changed

+42
-27
lines changed

2 files changed

+42
-27
lines changed

.idea/workspace.xml

Lines changed: 28 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ Then call methods defined in [Litecoin Core API Documentation](https://litecoin.
4040
/**
4141
* Get block info.
4242
*/
43-
$block = $litecoind->getBlock('000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f');
43+
$block = $litecoind->getBlock('9d4d9fd2f4dee46d5918861b7bbff81f52c581c3b935ad186fe4c5b6dc58d2f8');
4444

45-
$block('hash')->get(); // 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
46-
$block['height']; // 0 (array access)
47-
$block->get('tx.0'); // 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
48-
$block->count('tx'); // 1
45+
$block('hash')->get(); // 9d4d9fd2f4dee46d5918861b7bbff81f52c581c3b935ad186fe4c5b6dc58d2f8
46+
$block['height']; // 1298009 (array access)
47+
$block->get('tx.0'); // a8971eaf8dfda3ee5dd20b3de3fb6c22e936339bbb53f8fa0f2379941ac5ff3f
48+
$block->count('tx'); // 26
4949
$block->has('version'); // key must exist and CAN NOT be null
5050
$block->exists('version'); // key must exist and CAN be null
5151
$block->contains(0); // check if response contains value
@@ -59,7 +59,7 @@ $block('tx')->last(); // txid of last transaction
5959
/**
6060
* Send transaction.
6161
*/
62-
$result = $litecoind->sendToAddress('mmXgiR6KAhZCyQ8ndr2BCfEq1wNG2UnyG6', 0.1);
62+
$result = $litecoind->sendToAddress('LKdsQGCwBbgJNdXSQtAvVbFMpwgwThtsSY', 0.1);
6363
$txid = $result->get();
6464

6565
/**
@@ -74,7 +74,7 @@ To send asynchronous request, add Async to method name:
7474
use Majestic\Litecoin\LitecoindResponse;
7575

7676
$promise = $litecoind->getBlockAsync(
77-
'000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
77+
'9d4d9fd2f4dee46d5918861b7bbff81f52c581c3b935ad186fe4c5b6dc58d2f8',
7878
function (LitecoindResponse $success) {
7979
//
8080
},
@@ -91,12 +91,12 @@ You can also send requests using request method:
9191
/**
9292
* Get block info.
9393
*/
94-
$block = $litecoind->request('getBlock', '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f');
94+
$block = $litecoind->request('getBlock', '9d4d9fd2f4dee46d5918861b7bbff81f52c581c3b935ad186fe4c5b6dc58d2f8');
9595

96-
$block('hash'); // 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
97-
$block['height']; // 0 (array access)
98-
$block->get('tx.0'); // 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
99-
$block->count('tx'); // 1
96+
$block('hash'); // 9d4d9fd2f4dee46d5918861b7bbff81f52c581c3b935ad186fe4c5b6dc58d2f8
97+
$block['height']; // 1298009 (array access)
98+
$block->get('tx.0'); // a8971eaf8dfda3ee5dd20b3de3fb6c22e936339bbb53f8fa0f2379941ac5ff3f
99+
$block->count('tx'); // 26
100100
$block->has('version'); // key must exist and CAN NOT be null
101101
$block->exists('version'); // key must exist and CAN be null
102102
$block->contains(0); // check if response contains value
@@ -107,7 +107,7 @@ $block->random(1, 'tx'); // get random txid
107107
/**
108108
* Send transaction.
109109
*/
110-
$result = $BTC->request('sendtoaddress', ['mmXgiR6KAhZCyQ8ndr2BCfEq1wNG2UnyG6', 0.06]);
110+
$result = $BTC->request('sendtoaddress', ['LKdsQGCwBbgJNdXSQtAvVbFMpwgwThtsSY', 0.06]);
111111
$txid = $result->get();
112112

113113
```
@@ -117,7 +117,7 @@ use Majestic\Litecoin\LitecoindResponse;
117117

118118
$promise = $litecoind->requestAsync(
119119
'getBlock',
120-
'000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f',
120+
'9d4d9fd2f4dee46d5918861b7bbff81f52c581c3b935ad186fe4c5b6dc58d2f8',
121121
function (LitecoindResponse $success) {
122122
//
123123
},

0 commit comments

Comments
 (0)