Skip to main content

Vault Formation

Create Vault

Creates a new vault with specified configuration.

Endpoint
POST /api/v1/vaults
Sample Request
{
  "vault_name": "Example Vault",
  "vault_type": "public", 
  "privacy_type": "semi-private",
  "admin_user": {
    "wallet_address": "addr1q9example123",
    "email": "[email protected]"
  },
  "asset_settings": {
    "allowed_asset_types": ["NFT", "CNT"],
    "policy_ids": ["policy12345", "policy67890"], 
    "valuation_type": "LBE", 
    "floor_price_percentage": 90, 
    "max_assets": 100
  },
  "investment_settings": {
    "investment_window_duration": "48h",  // ISO-like duration
    "investment_start_time": "2024-11-24T10:00:00Z",  // Optional; defaults to vault creation time
    "minimum_investment_reserve": 10.0, 
    "ft_supply": 100000, 
    "ft_token_decimals": 6,
    "lp_percentage": 10
  },
  "governance_settings": {
    "creation_threshold": 5, 
    "start_threshold": 10, 
    "vote_threshold": 50,
    "execution_threshold": 60,
    "cosigning_threshold": 3
  }
}
Sample Response (201: Created)
{
  "vault_id": "vault123",
  "vault_name": "Example Vault",
  "transaction": {
    "tx_hash": "b26f8c9a0d1a4a9b8b12f9f9a8c1234567e9d0f1c234567890abcdef",
    "status": "confirmed",
    "block_height": 1234567
  },
  "investment_window": {
    "duration": "48h",
    "start_time": "2024-11-24T10:00:00Z",
    "end_time": "2024-11-26T10:00:00Z"
  },
  "status": "created",
  "created_at": "2024-11-23T10:00:00Z"
}

Add Assets to Vault

Add assets during the asset window period.

HTTP Request
POST /api/v1/vaults/{vaultId}/assets
Sample Request
{
  "policy_id": "policy12345",
  "asset_name": "ExampleAsset",
  "valuation_method": "floor_price",
  "metadata": {
    "creator": "CreatorAddress",
    "legal_proof": "https://proof.example.com/doc.pdf"
  }
}
Sample Response (201: Created)
{
  "vault_id": "vault123",
  "asset_id": "asset456",
  "transaction": {
    "tx_hash": "a92f81e3b69c4d12b34c567890fabcde1234567890abcdef56789abc",
    "status": "confirmed",
    "block_height": 1234570
  },
  "status": "added",
  "valuation": {
    "method": "floor_price",
    "value": 1000000
  },
  "created_at": "2024-11-23T11:00:00Z"
}

Remove Asset

Remove assets during the asset window period. Will fail if attempted before or after the window period.

Endpoint
DELETE /api/v1/vaults/{vaultId}/assets/{assetId}
Sample Response
{
  "status": "success",
  "data": {
    "assetId": "asset_123",
    "removalStatus": "COMPLETED",
    "transactionHash": "tx_hash789...",
    "updatedValuation": {
      "total": "140000",
      "timestamp": "2024-12-01T01:35:00Z"
    }
  }
}

Get Vault Valuation

Calculate current vault valuation based on assets.

HTTP Request
GET /api/v1/vaults/{vaultId}/valuation
Sample Response
{
  "status": "success",
  "data": {
    "valuation": {
      "total": "150000",
      "breakdown": {
        "nftValue": "120000",
        "cntValue": "30000"
      },
      "assetCounts": {
        "nfts": 2,
        "cnts": 1
      },
      "timestamp": "2024-12-01T01:30:00Z"
    }
  }
}

List Vault Assets

List all assets in the vault.

HTTP Request
GET /api/v1/vaults/{vaultId}/assets
Sample Response
{
  "status": "success",
  "data": {
    "assets": [{
      "assetId": "asset_123",
      "type": "NFT",
      "contractAddress": "addr_nft123...",
      "tokenId": "42",
      "addedAt": "2024-12-01T01:00:00Z",
      "status": "LOCKED",
      "currentValue": "90000"
    }],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 45
    }
  }
}

Update Vault AllowList

Updates the list of wallets allowed to participate in the vault, and their type.

HTTP Request
PATCH /api/v1/vaults/{vaultId}/allowlist
Sample Request
{
  "type": "ASSET|CONTRIBUTOR|INVESTOR",
  "operation": "ADD|REMOVE",
  "addresses": ["addr1...", "addr2..."]
}
Sample Response
{
  "status": "success",
  "data": {
    "updatedAllowList": {
      "type": "ASSET",
      "count": 24,
      "lastUpdated": "2024-12-01T02:00:00Z"
    }
  }
}

Vaut Performance Metrics

Returns some vault performance metrics.

HTTP Request
GET /api/v1/vaults/{vaultId}/metrics
Sample Response
{
  "status": "success",
  "data": {
    "valuation": {
      "initial": "100000",
      "current": "150000",
      "change": "50.00"
    },
    "participation": {
      "uniqueVoters": 45,
      "averageQuorum": "68.00",
      "proposalCount": 12
    },
    "timeline": {
      "created": "2024-11-20T10:00:00Z",
      "locked": "2024-12-01T02:00:00Z",
      "age": "11d 16h"
    }
  }
}

Vault Activity

Returns a vault activity log.

HTTP Request
GET /api/v1/vaults/{vaultId}/activity
Sample Response
{
  "status": "success",
  "data": {
    "activities": [{
      "type": "ASSET_ADDED|PROPOSAL_CREATED|VOTE_CAST",
      "timestamp": "2024-12-01T01:00:00Z",
      "actor": "addr_user123...",
      "details": {},
      "transactionHash": "tx_hash123..."
    }],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 156
    }
  }
}

Update Vault Settings

Lets you update modifiable vault settings.

Sample Request
{
  "investorAllowList": {
    "enabled": true,
    "addresses": ["addr1..."]
  },
  "valuationType": "LBE",
  "termination": {
    "fdp": "12.00"
  }
}

This would return the standard Success/Fail response object.