พอร์ทัลนักพัฒนา

พอร์ทัลนักพัฒนา / เอกสารอ้างอิง API

เอกสารทางเทคนิคภาษาอังกฤษ

operator API  /  Public

Public Ed25519 keys that sign SPILVON's wallet calls

GET/.well-known/spilvon-wallet-keys.json

A JWKS-style document (RFC 8037 OKP keys) with the raw key and PEM alongside. Cache it (it is served with max-age=300), refetch at least daily and whenever a call names a key id you do not know. Key status: active signs every call, next will sign soon, retired no longer signs. Also available at /api/v1/public/wallet-keys.

Authentication

Public endpoint · no signing headers

Responses

200 The key set.

The key set.

application/json
algorithmstring · required
signing_stringstring · required
headersobject · required
keysarray · required
warningstring
Present only on non-production deployments using a derived development key.
Schema (resolved)
JSON Schema
{
  "type": "object",
  "required": [
    "algorithm",
    "signing_string",
    "headers",
    "keys"
  ],
  "properties": {
    "algorithm": {
      "type": "string",
      "const": "Ed25519"
    },
    "signing_string": {
      "type": "string"
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "keys": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "kty",
          "crv",
          "alg",
          "use",
          "kid",
          "x",
          "status",
          "public_key_base64",
          "public_key_pem"
        ],
        "properties": {
          "kty": {
            "type": "string",
            "const": "OKP"
          },
          "crv": {
            "type": "string",
            "const": "Ed25519"
          },
          "alg": {
            "type": "string",
            "const": "EdDSA"
          },
          "use": {
            "type": "string",
            "const": "sig"
          },
          "kid": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._-]{1,32}$"
          },
          "x": {
            "type": "string",
            "description": "Raw public key, base64url without padding."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "next",
              "retired"
            ]
          },
          "public_key_base64": {
            "type": "string"
          },
          "public_key_pem": {
            "type": "string"
          }
        }
      }
    },
    "warning": {
      "type": "string",
      "description": "Present only on non-production deployments using a derived development key."
    }
  }
}
Example
{
  "algorithm": "Ed25519",
  "signing_string": "timestamp + \".\" + METHOD + \".\" + path_and_query + \".\" + raw_body",
  "headers": {
    "key_id": "X-Spilvon-Key-Id",
    "signature": "X-Spilvon-Signature-Ed25519 (standard base64)",
    "timestamp": "X-Spilvon-Timestamp",
    "operator": "X-Spilvon-Operator"
  },
  "keys": [
    {
      "kty": "OKP",
      "crv": "Ed25519",
      "alg": "EdDSA",
      "use": "sig",
      "kid": "2026-12",
      "x": "11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo",
      "status": "active",
      "public_key_base64": "11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=",
      "public_key_pem": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=\n-----END PUBLIC KEY-----\n"
    }
  ]
}

Request signing samples

Canonical string and HMAC helpers from the downloadable samples. Wallet callbacks may also use Ed25519; see the wallet signing modes.

Node.js node/spilvon.mjs
Node.js
export const signingString = (ts, method, pathAndQuery, body) => `${ts}.${method.toUpperCase()}.${pathAndQuery}.${body}`;
export const hmacHex = (secret, s) => createHmac("sha256", secret).update(s, "utf8").digest("hex");
Download full sample
Python python/spilvon.py
Python
def signing_string(ts: str, method: str, path_and_query: str, body: str) -> str:
    return f"{ts}.{method.upper()}.{path_and_query}.{body}"


def hmac_hex(secret: str, s: str) -> str:
    return hmac.new(secret.encode(), s.encode("utf-8"), hashlib.sha256).hexdigest()
Download full sample
Go go/main.go
Go
func signingString(ts, method, pathAndQuery, body string) string {
	return ts + "." + strings.ToUpper(method) + "." + pathAndQuery + "." + body
}

func hmacHex(secret, s string) string {
	m := hmac.New(sha256.New, []byte(secret))
	m.Write([]byte(s))
	return hex.EncodeToString(m.Sum(nil))
}
Download full sample · go.mod
PHP php/spilvon.php
PHP
function signing_string(string $ts, string $method, string $pathAndQuery, string $body): string {
    return $ts . '.' . strtoupper($method) . '.' . $pathAndQuery . '.' . $body;
}

function hmac_hex(string $secret, string $s): string {
    return hash_hmac('sha256', $s, $secret);
}
Download full sample

Reviewed, not executed by the sample authors.