P2E
Describes APIs provided to partners who want to use Item Manager of PlayDapp's Shop in Shop service that supports P2E-related functions (staking, reward).
This is a list of APIs that can request P2E-related integration.
Game company can specify the description for staking and the reward currency through PlayDapp Developers Console, but the policy for staking and reward payment must be managed by the game company.
Users' staking information for reward payment management can be inquired through the List User's staking information API.
List User's staking information
This API is used by game company to look up a list of users' staking information.
Refer to diagram Staking & Lookup.
List User's staking information
GET
https://{itemManagerHost}/v1/staking
This API is used by game company to look up a list of users' staking information.
In order to serve P2E, game company must manage a reward payment policy based on users' staking status.
Query Parameters
Name | Type | Description |
---|---|---|
userIds* | Array | Array<String> Max length of userIds array: 300 User ID list managed by the game server The userIds query parameter can be passed in the form below.
|
Headers
Name | Type | Description |
---|---|---|
svc-api-key* | String | svc-api-key is issued for each registered game. |
signature* | String | The result of an API request signed by a secret key issued per registered game. For more details, refer to Authentication. |
timestamp* | String | The time at which the request was sent, set to a Unix Epoch Timestamp value. |
nonce* | String | Random string of 8 characters, composed of uppercase or lowercase alphabets and numbers. A nonce can't be reused within 20 seconds after the successful request. |
Reward Payment
This API used to provides P2E reward to users.
Refer to diagram Reward Payment.
Reward Payment
POST
https://{itemManagerHost}/v1/reward
This API used to provides P2E reward to users.
Playdapp does not manage any policy to pay reward from the game company, and it must be managed by the game company according to the user's staking status value.
After checking the user's reward list managed by the game company, the game company can pay the user a reward by calling the Reward Payment API when the game company needs to pay the user a reward.
Using the hash value sent as a response from the Reward Payment API, you can check whether the reward payment was successful by retrieving the transaction hash value through Explorer.
Headers
Name | Type | Description |
---|---|---|
svc-api-key* | String | svc-api-key is issued for each registered game. |
signature* | String | The result of an API request signed by a secret key issued per registered game. For more details, refer to Authentication. |
timestamp | String | The time at which the request was sent, set to a Unix Epoch Timestamp value. |
nonce | String | Random string of 8 characters, composed of uppercase or lowercase alphabets and numbers. A nonce can't be reused within 20 seconds after the successful request. |
Request Body
Name | Type | Description |
---|---|---|
rewards* | Array | Array<Reward> Max length of rewards array: 300 Reward: { userId: String, amount: Number } userId: User ID managed by the game server amount: The amount of rewards to be paid. The unit of quantity is the unit of reward currency set in PlayDapp Developers Console. |
key* | string | Required for duplicate processing when registering a reward and for checking the reward by the service company. You can freely create the values you need. Ex) ${date}-${season}-${amount} |
Last updated