/api/wallet/coin-details

GET

Retrieve complete details for a specific coin including all 25 Authenticity Numbers and POWN string.

Description

The `/api/wallet/coin-details` endpoint searches the active wallet's Bank and Fracked folders for a specific coin matching the provided serial number and denomination. It returns the complete coin data including all 25 Authenticity Numbers (ANs) in hexadecimal format and the POWN string showing authentication status across all RAIDA servers.

Use Cases

This endpoint is useful for:

  • Inspecting a coin's authentication status across all 25 RAIDA servers
  • Viewing the complete set of Authenticity Numbers for a specific coin
  • Debugging coin authentication issues
  • Verifying coin data before operations like Fix or POWN
Search Scope

This endpoint only searches the Bank and Fracked folders. Coins in other folders (Counterfeit, Limbo, Import, etc.) will not be found.

Parameters

Parameter Type Required Description
serial_number integer Required The serial number of the coin to search for (e.g., 54321)
denomination integer Required The denomination code of the coin (e.g., 3 for 100 CloudCoins). See denomination table below.

Denomination Codes

Code Value Code Value
0 1 6 5,000
1 5 7 25,000
2 25 8 100,000
3 100 9 250,000
4 250 10 1,000,000
5 1,000 11 Key/NFT

Response

Returns a JSON object with complete coin details including all Authenticity Numbers.

Response Properties

status string
Always "success" for successful requests.
operation string
Always "coin-details".
serial_number integer
The serial number of the coin.
denomination integer
The denomination code (0-11).
value number
The numeric value in CloudCoins (e.g., 100).
folder string
The folder where the coin was found: "Bank" or "Fracked".
pown_string string
25-character string showing authentication status per RAIDA (p=pass, f=fail, n=no reply, e=error, etc.).
authenticity_numbers array[string]
Array of 25 Authenticity Numbers in hexadecimal format (32 characters each, representing 16 bytes).

Example Response (Success)

{
  "status": "success",
  "operation": "coin-details",
  "serial_number": 54321,
  "denomination": 3,
  "value": 100,
  "folder": "Bank",
  "pown_string": "ppppppppppppfnppppppppppp",
  "authenticity_numbers": [
    "F8564A07257F4137B4A80A0BFF363076",
    "1043161BBCF94298B344423D13F228AA",
    "F1692BA11BD945D89267BDEF0E856745",
    "F356AD50EA4E44D8A865599C28737122",
    "60CAA435D97147C59090BDD32DC3B099",
    "B2A81F56A04C4AB1BC1E816EFB4FBCB8",
    "5CC5307695844FF49FB0D0B0FC395612",
    "79B82FAC7B1446DC9B5572FE56CE05C8",
    "808B1172D7D541A491108545E436FE5A",
    "D0E8CACCA9154815A3DFC6FCFD32BF60",
    "F65D604057E0442F92A667CDF36FBE2B",
    "380DC067487D4C2DBDCC7AAA70B729EC",
    "47E6EAF912D24D6AB78656BAABA05C56",
    "B73C609BA893420E9AB8E21E8F39CE47",
    "71F5FB90AA144E33BB7BD2E147D7992B",
    "6354BBD9049246C3BDF5EFC085D4EEAF",
    "C0C0960F49A74B6A8150CBFE7DD8F6A5",
    "1A9B8E024D0B4948AE025CF75FEC3912",
    "C9C9B23DD9A5458892FA0E89F3C73A7B",
    "0EE83E628D224915A6C0409652F6572C",
    "4076CF627DC94D8280A4C318A092247D",
    "93827CF2EFC24393A27EED08587D6230",
    "50D71F182F914DBC9D21DE28CFAD7735",
    "509214863CFF435E941422D24EBFEC5E",
    "96900C146B0B46CAA473D4BBBE934408"
  ]
}

Example Error Response (Coin Not Found)

{
  "error": "Coin not found in Bank or Fracked folders"
}

Example Error Response (Missing Parameters)

{
  "error": "Missing required parameters: serial_number and denomination"
}

Examples

JavaScript (fetch)

const API_HOST = 'http://localhost:8080';

async function getCoinDetails(serialNumber, denomination) {
    try {
        const url = `${API_HOST}/api/wallet/coin-details?serial_number=${serialNumber}&denomination=${denomination}`;
        const response = await fetch(url);
        const result = await response.json();

        if (result.error) {
            console.error('Error:', result.error);
            return;
        }

        console.log(`Coin SN ${result.serial_number} (${result.value} CC):`);
        console.log(`  Location: ${result.folder}`);
        console.log(`  POWN String: ${result.pown_string}`);
        console.log('  Authenticity Numbers:');

        result.authenticity_numbers.forEach((an, index) => {
            const status = result.pown_string[index];
            console.log(`    RAIDA ${index.toString().padStart(2, '0')}: ${an} [${status}]`);
        });
    } catch (error) {
        console.error('Error fetching coin details:', error);
    }
}

// Example: Get details for coin with serial 54321, denomination 3 (100 CC)
getCoinDetails(54321, 3);

cURL

# Get details for coin with serial 54321, denomination 3 (100 CC)
curl -X GET "http://localhost:8080/api/wallet/coin-details?serial_number=54321&denomination=3"

# Pretty-print with jq
curl -X GET "http://localhost:8080/api/wallet/coin-details?serial_number=54321&denomination=3" | jq

Go

package main

import (
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
)

const ApiHost = "http://localhost:8080"

type CoinDetailsResponse struct {
    Status              string   `json:"status"`
    Operation           string   `json:"operation"`
    SerialNumber        int      `json:"serial_number"`
    Denomination        int      `json:"denomination"`
    Value               float64  `json:"value"`
    Folder              string   `json:"folder"`
    PownString          string   `json:"pown_string"`
    AuthenticityNumbers []string `json:"authenticity_numbers"`
}

func main() {
    serialNumber := 54321
    denomination := 3

    url := fmt.Sprintf("%s/api/wallet/coin-details?serial_number=%d&denomination=%d",
        ApiHost, serialNumber, denomination)

    resp, err := http.Get(url)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)

    var result CoinDetailsResponse
    if err := json.Unmarshal(body, &result); err != nil {
        panic(err)
    }

    fmt.Printf("Coin SN %d (%.0f CC):\n", result.SerialNumber, result.Value)
    fmt.Printf("  Location: %s\n", result.Folder)
    fmt.Printf("  POWN String: %s\n", result.PownString)
    fmt.Println("  Authenticity Numbers:")

    for i, an := range result.AuthenticityNumbers {
        status := result.PownString[i]
        fmt.Printf("    RAIDA %02d: %s [%c]\n", i, an, status)
    }
}

Related Endpoints

/api/wallet/show-coins

List all coins in a folder with basic information (serial number, denomination, POWN string).

/api/coins/authenticate

Authenticate coins with the RAIDA network to update POWN strings.

/api/coins/fix

Heal fracked coins by exchanging tickets with passing RAIDA servers.