Update Wallet Details

To update the details of a wallet such as title, project, or password, a PATCH request to the /wallet/<wallet_name> endpoint.

Update wallet details

PATCH https://api.playfix.io/wallet/<wallet_name>

Path Parameters

Name
Type
Description

<wallet_name>*

String

Name of the wallet you want to update. This should be the value of name from a previously created wallet. It begins with "wallets/" followed by a ULID.

Headers

Name
Type
Description

Authorization*

String

Bearer <your_access_token>

Request Body

Name
Type
Description

password

String

The password for the wallet. The password must be exactly 32 characters long. Example: 32CharacterPassword2MoonarWallet

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 .

project

String

The name of the project that will contain the wallet.

description

String

A short description of the wallet.

title

String

The title of the wallet.

{
  "name": "wallets/01ggpkj6gs2qtaykq4v6dqy16x",
  "title": "Moonar",
  "description": "My moon game wallet.",
  "project": "<project_name>",
  "network": "NETWORK_POLYGON_MUMBAI",
  "address": "0xfa3492e3044AF1e70e8Be6cD3ff80CAB582B2Dd5",
  "password": ""
}

Example cURL Call

curl --request PATCH \
  --url 'https://api.playfix.io/wallet/<wallet_name>' \
  --header 'Authorization: Bearer <your_access_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "title": "Moonar",
    "description": "My moon game wallet",
    "project": "<project_name>",
    "network": "NETWORK_POLYGON_MUMBAI",
    "password": "<your_wallet_password>"
  }'

Example Python API Call

import requests
import json

payload = {
        "title": "Moonar",
        "description": "My moon game wallet",
        "project": "<project_name>",
        "network": "NETWORK_POLYGON_MUMBAI",
        "password": "<your_wallet_password>"
    }

r = requests.patch(
    "https://api.playfix.io/wallet/<wallet_name>",
    headers={
        "Authorization": "Bearer <your_access_token>",
        "Accept": "application/json",
        "Content-Type": "application/json"
        },
    data=json.dumps(payload)
    )

print(r.text)

Request Body

  • title - The title of the wallet.

  • description - A short description of the wallet.

  • project - The name 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

Response

{
  "name": "wallets/01ggpkj6gs2qtaykq4v6dqy16x",
  "title": "Moonar",
  "description": "My moon game wallet.",
  "project": "<project_name>",
  "network": "NETWORK_POLYGON_MUMBAI",
  "address": "0xfa3492e3044AF1e70e8Be6cD3ff80CAB582B2Dd5",
  "password": ""
}

The response fields are the same as in the wallet creation process.

Last updated