Wallets

Wallets are secure containers for managing digital assets. Fystack offers different wallet types to suit your needs, including standard wallets and MPC (Multi-Party Computation) wallets.

Wallet types

Fystack supports two distinct wallet types, each designed for specific use cases and security requirements:

Standard Wallet

Standard wallets are derived using Hierarchical Deterministic (HD) key derivation per workspace. This approach provides:

  • Efficient key management: Uses a single master seed to derive multiple wallet keys
  • End-user focused: Ideal for generating individual wallets for your end users
  • Quick creation: Instant wallet generation with immediate success status
  • Deterministic: Wallets can be recreated from the same seed if needed
  • Cost-effective: Lower computational overhead for high-volume wallet creation

Best for: Consumer applications, user wallets, high-volume wallet generation

MPC Wallet

MPC (Multi-Party Computation) wallets use advanced cryptographic techniques where the private key is split into multiple shares and distributed across different Mpcium nodes:

  • Enhanced security: Private key never exists in its complete form on any single node
  • Distributed trust: Key shares are distributed across multiple secure nodes
  • Hot wallet protection: Provides institutional-grade security for active wallets
  • Threshold signatures: Requires consensus from multiple nodes to sign transactions
  • Longer creation time: Key generation process takes more time due to cryptographic complexity

Best for: Hot wallets, institutional custody, high-value asset storage, exchange wallets

Choosing the right wallet type

Wallet Type

Standard

MPC

Security Level

High

Institutional-grade

Creation Speed

Instant

30-60 seconds

Use Case

End-user wallets

Hot wallets, custody

Key Management

HD derivation

Multi-party computation

Cost

Lower

Higher

Recovery

HD seed-based

Multi-party recovery

Choose Standard wallets when you need to quickly generate wallets for individual users. Choose MPC wallets when you need maximum security for operational wallets that hold significant value or require institutional-grade protection.


POST/wallets

Create a wallet

To create a new wallet, send a POST request to the /wallets endpoint with the required parameters.

Required parameters

  • Name
    name
    Type
    string
    Description

    A descriptive name for the wallet.

  • Name
    wallet_type
    Type
    string
    Description

    The type of wallet to create. Must be either standard or mpc.

Optional parameters

  • Name
    wallet_purpose
    Type
    string
    Description

    The purpose of the wallet. Must be either general or user. If set to user, the wallet will be hidden from the portal. Defaults to general.

  • Name
    sweep_task_params
    Type
    object
    Description

    Parameters for creating an automatic sweep task. Cannot be used with sweep_task_id.

  • Name
    min_trigger_value_usd
    Type
    decimal
    Description

    Minimum USD value threshold to trigger the sweep.

  • Name
    destination_wallet_id
    Type
    string
    Description

    UUID of the destination wallet or addressbook record ID if destination_type is address_book.

  • Name
    destination_type
    Type
    string
    Description

    Type of destination. Must be either internal_wallet or address_book. Defaults to internal_wallet.

  • Name
    sweep_task_id
    Type
    string
    Description

    UUID of an existing sweep task to attach to this wallet. If provided, sweep_task_params will be ignored.

Sweep Tasks

When creating a wallet, you can automatically set up fund sweeping by either:

  1. Creating a new sweep task with sweep_task_params
  2. Attaching an existing sweep task with sweep_task_id

How sweep tasks work

  • Automatic monitoring: The system continuously monitors the wallet balance
  • Threshold triggering: When the wallet's USD value reaches the min_trigger_value_usd, a sweep is triggered
  • Destination flexibility: Funds can be swept to internal wallets or external addresses from your address book
  • User wallets: Wallets with wallet_purpose: "user" are hidden from the portal interface

If both sweep_task_params and sweep_task_id are provided, the existing sweep task ID takes precedence and the parameters are ignored.

Response

  • Name
    success
    Type
    boolean
    Description

    Indicates whether the request was successful.

  • Name
    message
    Type
    string
    Description

    A message describing the result of the operation.

  • Name
    code
    Type
    integer
    Description

    A numeric code indicating the result status (0 for success).

  • Name
    data
    Type
    object
    Description

    Contains the wallet details.

  • Name
    wallet_id
    Type
    string
    Description

    The UUID of the newly created wallet.

  • Name
    status
    Type
    string
    Description

    The current status of the wallet creation process.

Request

POST
/wallets
import { FystackSDK, Environment } from "@fystack/sdk"
const apiCredentials = {
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET
}
const sdk = new FystackSDK({
credentials: apiCredentials,
environment: Environment.Sandbox,
logger: true
})
// Create wallet with new sweep task
await sdk.createWallet({
name: 'MPC wallet with sweep',
walletType: WalletType.MPC,
walletPurpose: WalletPurpose.User,
sweepTaskParams: {
minTriggerValueUsd: '100.00',
destinationWalletId: '123e4567-e89b-12d3-a456-426614174001',
destinationType: 'internal_wallet'
}
})
// Or attach existing sweep task
await sdk.createWallet({
name: 'Standard wallet',
walletType: WalletType.Standard,
sweepTaskId: '987f6543-e21c-43b2-a654-321098765432'
})

Response

{
  "success": true,
  "message": "success",
  "code": 0,
  "data": {
    "wallet_id": "c2b71329-34c9-45aa-89d3-ddde8b15dec5",
    "status": "pending"
  }
}

GET/wallets/creation-status/:wallet_id

Wallet creation status

When you create a wallet, the process happens asynchronously. The initial response will include a status field with one of the following values:

  • pending: The wallet creation process has started but is not yet complete.
  • success: The wallet has been successfully created.
  • error: There was an error creating the wallet.

For standard wallet types, the status will be success immediately after creation.

For mpc wallet types, the creation process may take longer as it involves secure key generation across multiple parties.

Response

  • Name
    wallet_id
    Type
    string
    Description

    The UUID of the wallet being created.

  • Name
    status
    Type
    string
    Description

    Current status of the wallet creation process. Can be pending, success, or error.

cURL

curl -X GET https://api.fystack.io/api/v1/wallets/creation-status/c2b71329-34c9-45aa-89d3-ddde8b15dec5 \
  -H "ACCESS-API-KEY: your_api_key" \
  -H "ACCESS-TIMESTAMP: 1667836889" \
  -H "ACCESS-SIGN: YourBase64EncodedSignature=="

Response

{
  "wallet_id": "c2b71329-34c9-45aa-89d3-ddde8b15dec5",
  "status": "pending"
}

GET/wallets

List all wallets

This endpoint allows you to retrieve a paginated list of all wallets in your workspace.

Optional parameters

  • Name
    workspace_id
    Type
    string
    Description

    Filter wallets by workspace ID.

  • Name
    wallet_type
    Type
    string
    Description

    Filter wallets by type.

  • Name
    limit
    Type
    integer
    Description

    Limit the number of wallets returned.

  • Name
    offset
    Type
    integer
    Description

    Number of wallets to skip before starting to return results.

cURL

curl -X GET https://api.fystack.io/api/v1/wallets \
  -H "ACCESS-API-KEY: your_api_key" \
  -H "ACCESS-TIMESTAMP: 1667836889" \
  -H "ACCESS-SIGN: YourBase64EncodedSignature==" \
  -G \
  -d workspace_id=123e4567-e89b-12d3-a456-426614174000

Response

{
  "wallets": [
    {
      "id": "7f89a112-3b8f-4eeb-9e0f-124c76bfb2e0",
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "MPC wallet",
      "wallet_type": "mpc",
      "status": "success",
      "created_at": "2023-01-01T12:00:00Z"
    },
    {
      "id": "8a91b223-4c9f-5ffc-0f1g-235787cfc3f1",
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Standard wallet",
      "wallet_type": "standard",
      "status": "success",
      "created_at": "2023-01-02T14:30:00Z"
    }
  ],
  "pagination": {
    "total": 2,
    "limit": 10,
    "offset": 0
  }
}
GET/wallets/:wallet_id/deposit-address

Get deposit address

This endpoint returns a deposit address for the specified wallet and asset.

Query parameters

  • Name
    asset_id
    Type
    string
    Description

    The UUID of the asset to get the deposit address for.

  • Name
    address_type
    Type
    string
    Description

    The type of blockchain address to generate. Must be one of: evm, sol.

Response

  • Name
    success
    Type
    boolean
    Description

    Indicates whether the request was successful.

  • Name
    data
    Type
    object
    Description

    Contains the deposit address details.

  • Name
    asset_id
    Type
    string
    Description

    The UUID of the asset.

  • Name
    address
    Type
    string
    Description

    The blockchain address for deposits.

  • Name
    qr_code
    Type
    string
    Description

    URL to a QR code image of the deposit address.

tron address type is coming soon.

Request

GET
/wallets/:wallet_id/deposit-address
import { FystackSDK, Environment } from "@fystack/sdk"
const apiCredentials = {
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET
}
const sdk = new FystackSDK({
credentials: apiCredentials,
environment: Environment.Sandbox,
logger: true
})
// Get EVM deposit address
const response = await sdk.getDepositAddress(
"c2b71329-34c9-45aa-89d3-ddde8b15dec5",
AddressType.Evm
)
// Get Solana deposit address
const response = await sdk.getDepositAddress(
"c2b71329-34c9-45aa-89d3-ddde8b15dec5",
AddressType.Solana
)