|
1 | 1 | # OST PHP SDK |
2 | 2 | [](https://travis-ci.org/ostdotcom/ost-sdk-php) |
3 | 3 |
|
4 | | -The official [OST](https://dev.ost.com/) PHP SDK. |
| 4 | +[OST](https://dev.ost.com/) Platform SDK for PHP. |
5 | 5 |
|
6 | 6 | ## Introduction |
7 | 7 |
|
8 | 8 | OST is a complete technology solution enabling mainstream businesses |
9 | 9 | to easily launch blockchain-based economies without |
10 | 10 | requiring blockchain development. |
11 | 11 |
|
12 | | -At the core of OST is the concept of OST-powered Brand Tokens (BTs). |
13 | | -BTs are white-label cryptocurrency tokens with utility representations |
| 12 | +Brand Tokens (BTs) are white-label cryptocurrency tokens with utility representations |
14 | 13 | running on highly-scalable Ethereum-based side blockchains, |
15 | | -backed by OST tokens staked on Ethereum mainnet. Within a business’s |
| 14 | +backed by value token (such as OST, USDC) staked on Ethereum mainnet. Within a business’s |
16 | 15 | token economy, BTs can only be transferred to whitelisted user addresses. |
17 | 16 | This ensures that they stay within the token economy. |
18 | 17 |
|
19 | 18 | The OST technology stack is designed to give businesses everything they need |
20 | 19 | to integrate, test, and deploy BTs. Within the OST suite of products, developers |
21 | | -can use OST Platform to create, test, and launch Brand Tokens backed by OST. |
| 20 | +can use OST Platform to create, test, and launch Brand Tokens backed by value token (such as OST, USDC). |
22 | 21 |
|
23 | 22 | OST APIs and server-side SDKs make it simple and easy for developers to |
24 | 23 | integrate blockchain tokens into their apps. |
@@ -270,7 +269,7 @@ echo json_encode($response, JSON_PRETTY_PRINT); |
270 | 269 |
|
271 | 270 | #### Price Points Module |
272 | 271 |
|
273 | | -To know the OST price point in USD and when it was last updated, |
| 272 | +To know the value token (such as OST, USDC) price point in pay currency and when it was last updated, |
274 | 273 | use services provided by the Price Points module. |
275 | 274 |
|
276 | 275 | ```php |
@@ -336,8 +335,8 @@ $transferAmount = array("150000000000000000", "100000000000000000"); |
336 | 335 | $rawCallData['method'] = 'pay'; |
337 | 336 | $tokenHolderSender = '0xa9632350057c2226c5a10418b1c3bc9acdf7e2ee'; |
338 | 337 | $payCurrencyCode = 'USD'; |
339 | | -$ostToUsd = '23757000000000000'; // get price-point response |
340 | | -$rawCallData['parameters'] = array($tokenHolderSender, $transferTo, $transferAmount, $payCurrencyCode, $ostToUsd); |
| 338 | +$intendedPricePoint = '23757000000000000'; // get price-point response |
| 339 | +$rawCallData['parameters'] = array($tokenHolderSender, $transferTo, $transferAmount, $payCurrencyCode, $intendedPricePoint); |
341 | 340 | $executeParams['raw_calldata'] = json_encode($rawCallData); |
342 | 341 | //$executeParams['meta_property'] = $metaPropertyParams; |
343 | 342 | $response = $transactionsService->execute($executeParams)->wait(); |
@@ -455,3 +454,21 @@ $getParams['chain_id'] = '2000'; |
455 | 454 | $response = $chainsService->get($getParams)->wait(); |
456 | 455 | echo json_encode($response, JSON_PRETTY_PRINT); |
457 | 456 | ``` |
| 457 | + |
| 458 | +### Base Tokens Module |
| 459 | + |
| 460 | +To get information about the value tokens (such as OST, USDC) available on the OST Platform interface, use services |
| 461 | +provided by the Base Tokens module. You can use this service to obtain the value token details |
| 462 | +on OST Platform interface. |
| 463 | + |
| 464 | +```php |
| 465 | +$baseTokensService = $ostObj->services->baseTokens; |
| 466 | +``` |
| 467 | + |
| 468 | +Get Base Tokens Detail: |
| 469 | + |
| 470 | +```php |
| 471 | +$getParams = array(); |
| 472 | +$response = $baseTokensService->get($getParams)->wait(); |
| 473 | +echo json_encode($response, JSON_PRETTY_PRINT); |
| 474 | +``` |
0 commit comments