Create a Wallet
To create a wallet, send a POST request to the /wallet/wallets
endpoint.
Create a new wallet
POST
https://api.playfix.io/wallet/wallets
Headers
Authorization*
String
Bearer <your_access_token>
Request Body
wallet*
Object
An object containing the configuration details of the wallet.
title*
String
The title of the wallet.
description
String
A short description of the wallet.
project*
String
The name
of the project that will contain the wallet. It begins with "project/
" followed by a ULID.
Example: projects/01gfav9m1c4zd6eq154th2pafz
network*
String
Name of the network where the token will be deployed. Accepted values include:
NETWORK_ETHEREUM
,
NETWORK_ETHEREUM_RINKERBY
,
NETWORK
_POLYGON
, or
NETWORK_POLYGON_MUMBAI
.
password*
String
The password for the wallet. The password must be exactly 32 characters long. Example: 32CharacterPassword2MoonarWallet
{
"name": "wallets/01ggpkj6gs2qtaykq4v6dqy16x",
"title": "Moonar",
"description": "My gaming wallet.",
"project": "<project_name>",
"network": "NETWORK_POLYGON_MUMBAI",
"address": "0xfa3492e3044AF1e70e8Be6cD3ff80CAB582B2Dd5",
"password": ""
}
The following example creates a wallet titled "Moonar".
Example cURL API Call
curl --request POST \
--url 'https://api.playfix.io/wallet/wallets' \
--header 'Authorization: Bearer <your_access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"wallet": {
"title": "Moonar",
"description": "My gaming wallet",
"project": "<project_name>",
"network": "NETWORK_POLYGON_MUMBAI"
},
"password": "<your_wallet_password>"
}'
Example Python API Call
import requests
import json
payload = {
"wallet": {
"title": "Moonar",
"description": "My gaming wallet",
"project": "<project_name>",
"network": "NETWORK_POLYGON_MUMBAI"
},
"password": "<wallet_password>"
}
r = requests.post(
"https://api.playfix.io/wallet/wallets",
headers={
"Authorization": "Bearer <your_access_token>",
"Accept": "application/json",
"Content-Type": "application/json"
},
data=json.dumps(payload)
)
print(r.text)
Request Body
wallet
- An object containing the configuration details of the wallet.title
- Title of the wallet.description
- A short description of the wallet.project
- Thename
of the project that will contain the wallet.network
- Name of the blockchain network the wallet will be created on. You can set this to any of the following network values, depending on your preference:NETWORK_ETHEREUM
: Ethereum mainnet.NETWORK_ETHEREUM_RINKEBY
: Ethereum Gorli testnet. For testing purposes only.NETWORK_POLYGON
: Polygon mainnet.NETWORK_POLYGON_MUMBAI
: Polygon Mumbai testnet. For testing purposes only.
password
- The password for the wallet. The password must be exactly 32 characters long. Example:32CharacterPassword2MoonarWallet
.
You will be required to enter this password to call operations on the wallet, such as transferring a token.
Response
{
"name": "wallets/01ggpkj6gs2qtaykq4v6dqy16x",
"title": "Moonar",
"description": "My gaming wallet.",
"project": "<project_name>",
"network": "NETWORK_POLYGON_MUMBAI",
"address": "0xfa3492e3044AF1e70e8Be6cD3ff80CAB582B2Dd5",
"password": ""
}
Response Fields
name
- This is a unique name of the wallet, automatically generated by Playfix. It begins with "wallets/
" followed by a ULID.password
- The wallet password. This will be an empty string because Playfix does not store your wallet password.
Last updated