Download the PHP package ostdotcom/ost-sdk-php without Composer
On this page you can find all versions of the php package ostdotcom/ost-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ostdotcom/ost-sdk-php
More information about ostdotcom/ost-sdk-php
Files in ostdotcom/ost-sdk-php
Package ost-sdk-php
Short Description OST Platform SDK for PHP
License MIT
Homepage https://platform.ost.com/
Informations about the package ost-sdk-php
OST Server-Side PHP SDK
OST Platform SDK for PHP.
Introduction
OST is a complete technology solution enabling mainstream businesses to easily launch blockchain based economies without requiring blockchain development.
Brand Tokens (BTs) are white-label cryptocurrency tokens with utility representations running on highly-scalable Ethereum-based utility blockchains, backed by value token (such as OST, USDC) staked on Ethereum mainnet. Within a business`s token economy, BTs can only be transferred to whitelisted user addresses. This ensures that they stay within the token economy.
The OST technology stack is designed to give businesses everything they need to integrate, test, and deploy BTs. Within the OST suite of products, developers can use OST Platform to create, test, and launch Brand Tokens.
OST APIs and server-side SDKs make it simple and easy for developers to integrate blockchain tokens into their apps.
For documentation, visit https://dev.ost.com/
Getting Started
Setup Brand Token
- Sign-up on OST Platform and setup your Brand Token.
- Obtain your API Key and API Secret from developers page.
Installation
The preferred way to install the OST PHP SDK is to use latest stable version of the SDK. Simply type the following into a terminal window:
Install Composer:
Install the latest stable version of the SDK:
Usage
-
Require the Composer autoloader.
- Initialize the SDK object.
Users Module
-
Initialize Users service object to perform user specific actions.
-
Create User. This creates a unique identifier for each user.
-
Get User Detail using the userId obtained in user create.
- Get Users List. Pagination is supported in this API.
Devices Module
-
Initialize Devices service object to perform device specific actions.
-
Create a Device for User.
-
Get User Device Detail using userId and deviceAddress.
- Get User Devices List. Pagination is supported.
Device Managers Module
-
Initialize Device Manager service object to perform device manager specific actions.
- Get Device Manager Detail using userId.
Sessions Module
-
Initialize Sessions service object to perform session specific actions.
-
Get User Session Detail using userId and session address.
- Get User Sessions List using userId. Pagination is supported by this API.
Executing Transactions
For executing transactions, you need to understand the 4 modules described below.
Rules Module
-
Initialize Rules service object to perform rules specific actions.
- List Rules.
Price Points Module
-
Initialize Price Points service object to perform price points specific actions.
- Get Price Points Detail.
Transactions Module
-
Initialize Transactions service object to perform transaction specific actions.
-
DIRECT-TRANSFERS execute transaction should be used to transfer BTs to your end-users.
-
PAY Execute Transaction should be used when transactions of BTs equivalent to some fiat amount need to be executed.
-
Get Transaction Detail using userId and transactionId.
- Get User Transactions using userId. Pagination is supported by this API.
Balances Module
-
Initialize Balances service object to perform balances specific actions.
- Get User Balance using userId.
Recovery Owners Module
-
Initialize Recovery Owners service object to perform recovery owners specific actions.
- Get Recovery Owner Detail using userId and recovery owner address.
Tokens Module
-
Initialize Tokens service object to perform tokens specific actions.
- Get Token Detail.
Chains Module
-
Initialize Chains service object to perform chains specific actions.
- Get Chain Detail using chainId.
Base Tokens Module
-
Initialize Base Tokens service object to perform base tokens specific actions.
- Get Base Tokens Detail.
Webhooks Module
-
Initialize Webhooks service object to perform webhooks specific actions.
-
Create Webhook using the topics and the subscription url.
-
Update existing Webhook using a webhookId and an array of topics.
-
Get Webhook using webhookId.
-
Get Webhook List. Pagination is supported by this API.
-
Delete Webhook using webhookId.
- Verify webhook request signature. This can be used to validate if the webhook received at your end from OST platform is correctly signed.
Redemption Modules
Two modules of redemption, "Redeemable SKUs" and "User Redemptions", are described below.
Redeemable SKUs Module
-
Initialize Redeemable SKUs service object to perform redeemable skus specific actions.
-
Get Redeemable SKU detail using the redeemable sku id.
- Get Redeemable SKUs List. Pagination is supported by this API.
User Redemptions Module
-
Initialize Redemptions service object to perform user redemption specific actions.
-
Get User redemption details using the userId and redemptionId.
- Get User Redemptions List. Pagination is supported by this API.