Skip to content

isValidSignature replaySafeHash wrapping breaks compatibility with Safe (Gnosis Safe) v1.4.1+ — user funds locked #176

Open

Description

@pierremezfree

Bug Description

Coinbase Smart Wallet's ERC1271.isValidSignature(bytes32,bytes) implementation does not validate signatures against the raw hash parameter as specified by ERC-1271. Instead, it re-wraps the hash via replaySafeHash(hash) before validation. This causes signature verification to fail when the Smart Wallet is used as an owner (signer) on a Safe (formerly Gnosis Safe), effectively locking user funds when the Safe threshold cannot be met without this signature.

Real-World Impact

A significant portion of my personal funds are currently inaccessible. My Safe is configured as 2-of-2, with one owner being a Coinbase Smart Wallet. Every attempt to sign a Safe transaction with the Coinbase Smart Wallet results in an error, making it impossible to reach the required threshold. Because Safe owner changes also require the existing threshold to be met, I cannot remove the Smart Wallet owner or add a replacement. The funds are in a deadlock until this compatibility issue is resolved.

Root Cause Analysis

Looking at the current ERC1271.sol implementation:

function isValidSignature(bytes32 hash, bytes calldata signature) public view virtual returns (bytes4 result) {
    if (_validateSignature({message: replaySafeHash(hash), signature: signature})) {
        return 0x1626ba7e;
    }
    return 0xffffffff;
}

The contract validates signature against replaySafeHash(hash), where replaySafeHash computes an EIP-712 compliant hash:
keccak256("\x19\x01" || domainSeparator || hashStruct(CoinbaseSmartWalletMessage({ hash: hash })))
Standard ERC-1271 callers (including Safe) pass a hash that they expect to be validated directly. Safe computes its transaction hash independently and passes it to the owner contract's isValidSignature. If the signing client produces a signature over the raw Safe hash, but the contract validates against replaySafeHash(hash), the magic value 0x1626ba7e is never returned and Safe treats the signature as invalid.

Not a "legacy interface" issue

There is an existing discussion (#76) suggesting Safe requires the legacy isValidSignature(bytes,bytes) interface. This is not the blocker for my case. My Safe version is 1.4.1, which verifies contract-owner signatures using the modern isValidSignature(bytes32,bytes) interface (magic value 0x1626ba7e). The Coinbase Smart Wallet already exposes this function. The failure occurs because the hash being validated inside that function is not the hash Safe passed in.

Steps to Reproduce

Create a Safe (v1.4.1) with a 2-of-2 threshold
Add a Coinbase Smart Wallet as one of the two owners
Initiate any transaction on the Safe (e.g., a simple ETH transfer)
Attempt to sign the transaction using the Coinbase Smart Wallet (via the "Coinbase Wallet" connection on app.safe.global)
Observe the signing failure (internal transaction error)

Expected result: The Coinbase Smart Wallet produces a signature that Safe v1.4.1 accepts, allowing the transaction to be confirmed.
Actual result: The signature validation fails, preventing the Safe transaction from reaching the required threshold.

Environment

Safe version: 1.4.1
Safe threshold: 2-of-2
Signer wallet: Coinbase Smart Wallet (Base App, passkey-based)
Connection method: Coinbase Wallet direct integration (not WalletConnect)
Error: Internal transaction error when attempting to sign

Proposed Fix

  • Option A (preferred): Modify isValidSignature(bytes32,bytes) to validate against the raw hash parameter for standard ERC-1271 contexts, removing the replaySafeHash wrapping. If cross-account replay protection is required for specific flows, it should be handled at the signing-client layer, not inside the contract's ERC-1271 validation function.

  • Option B: Provide an additional, unwrapped validation path (e.g., a separate function or a flag) that Safe and other standard ERC-1271 callers can use.

  • Option C: Document the replaySafeHash requirement explicitly and update the signing client (keys.coinbase.com / Base App) to pre-compute replaySafeHash(hash) before signing for ERC-1271 contexts.

Additional Context

The Coinbase Smart Wallet is UUPSUpgradeable. Because all user wallets are ERC-1967 proxies pointing to a shared implementation, a single contract upgrade would resolve this for every affected user globally without requiring individual user action.

Activity

  1. pierremezfree commented on Aug 29, 2026

    @pierremezfree
    Author

    Two Coinbase policies create a complete deadlock for my funds

    Problem 1 — My Smart Wallet cannot sign Safe transactions
    Safe calls isValidSignature(hash, signature) on my Smart Wallet. The contract expects the signature to be over replaySafeHash(hash), but Coinbase's signing app signs the raw hash instead. This makes every Safe signature invalid.

    Problem 2 — Coinbase blocks me from adding a backup owner
    The only way to bypass Problem 1 is to add a standard Ethereum key (EOA) as an owner to my Smart Wallet. With an EOA, I could compute replaySafeHash myself and sign it using MetaMask — no broken Coinbase UI needed.

    But keys.coinbase.com rejects all self-calls with error "Self calls are not allowed." The function addOwnerAddress requires the wallet to call itself, so it is blocked.

    Result: I cannot sign Safe transactions, and I cannot add a backup signer. My funds are locked until Coinbase fixes one of the two issues.

  2. cindylhiam01-jpg commented on Sep 6, 2026

    @cindylhiam01-jpg

    Check stellar

  3. cindylhiam01-jpg commented on Sep 6, 2026

    @cindylhiam01-jpg

    {
    "openapi": "3.1.0",
    "info": {
    "title": "StellarExpert API",
    "version": "1.4.0",
    "description": "## Intro\n\nStellarExpert Open APIs are publicly available for developers, free of charge.\n\nOpen API enpoints do not require authentication and can be used directly from the browser.\n\n### Cross-Origin Resource Sharing\n\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with W3C spec.\nAnd that allows cross-domain communication from the browser. All responses have a wildcard same-origin\nwhich makes them completely public and accessible to everyone, including any code on any site.\n\n### Rate Limiting and Caching Considerations\n\nThe effective API request rate may be a subject to rate limiting. In such cases the server returns 429 HTTP\nstatus code error. To avoid potential problems caused by those limitations it is advised to consider response\ncaching or group queries on the caller side in case of heavy API utilization.\n",
    "termsOfService": "https://stellar.expert/",
    "contact": {
    "url": "https://stellar.expert/",
    "email": "info@stellar.expert"
    },
    "license": {
    "name": "MIT",
    "url": "https://tldrlegal.com/license/mit-license"
    },
    "x-logo": {
    "url": "https://stellar.expert/img/stellar-expert-blue.svg"
    }
    },
    "servers": [
    {
    "url": "https://api.stellar.expert"
    }
    ],
    "paths": {
    "/explorer/directory": {
    "get": {
    "operationId": "listDirectoryEntries",
    "summary": "Directory entries",
    "description": "Returns the list of directory entries with paging navigation links. Optionally filtered by address, tag, or arbitrary search string. This API endpoint follows Stellar Horizon API response format convention. A response result contains records and navigation links.\n#### Query examples:\nFetch information about multiple accounts in one call\n\ncurl -g \"https://api.stellar.expert/explorer/directory?address[]=GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH&address[]=GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S\"\n\nSearch for Kraken's deposit account\n\ncurl \"https://api.stellar.expert/explorer/directory?search=kraken\"\n\nFind accounts tagged as malicious or unsafe\n\ncurl -g \"https://api.stellar.expert/explorer/directory?tag[]=malicious&tag[]=unsafe\"\n\nLookup addresses reported for "staking"-related scams\n\ncurl -g \"https://api.stellar.expert/explorer/directory?tag[]=malicious&search=stacking\"",
    "tags": [
    "Directory API"
    ],
    "parameters": [
    {
    "name": "address",
    "description": "Applies a filter by the addresses list (up to 50 per request)",
    "in": "query",
    "schema": {
    "type": "array",
    "minItems": 1,
    "maxItems": 50,
    "uniqueItems": true,
    "items": {
    "$ref": "#/components/schemas/AccountAddress"
    }
    },
    "example": [
    "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA"
    ]
    },
    {
    "name": "tag",
    "description": "Applies a filter by tags",
    "in": "query",
    "schema": {
    "type": "array",
    "minItems": 1,
    "maxItems": 10,
    "uniqueItems": true,
    "items": {
    "type": "string"
    }
    },
    "example": [
    "custodian",
    "anchor"
    ]
    },
    {
    "name": "search",
    "description": "Applies a full-test search filter by an entry address, name, or domain",
    "in": "query",
    "schema": {
    "type": "string",
    "minLength": 5
    }
    },
    {
    "name": "cursor",
    "description": "An address from which to continue search (refers to the paging_token value from a results set)",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/AccountAddress"
    }
    },
    {
    "name": "order",
    "description": "Results sorting order",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsSortOrder"
    }
    },
    {
    "name": "limit",
    "description": "Results data page size",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsLimit"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Directory entries fetched",
    "content": {
    "application/json": {
    "schema": {
    "allOf": [
    {
    "$ref": "#/components/schemas/ListApiResponse"
    },
    {
    "type": "object",
    "properties": {
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array",
    "items": {
    "$ref": "#/components/schemas/DirectoryEntry"
    }
    }
    }
    }
    }
    }
    ]
    },
    "example": {
    "_links": {
    "self": {
    "href": "/explorer/directory?sort=address&order=asc&limit=2"
    },
    "prev": {
    "href": "/explorer/directory?sort=address&order=desc&cursor=GA272U6UMNKYOBDCLH5CDAPZVDG4WAGJWFY2S2RV2DN6YSSOGYECEVOF&limit=2"
    },
    "next": {
    "href": "/explorer/directory?sort=address&order=asc&cursor=GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA&limit=2"
    }
    },
    "_embedded": {
    "records": [
    {
    "address": "GA272U6UMNKYOBDCLH5CDAPZVDG4WAGJWFY2S2RV2DN6YSSOGYECEVOF",
    "paging_token": "GA272U6UMNKYOBDCLH5CDAPZVDG4WAGJWFY2S2RV2DN6YSSOGYECEVOF",
    "name": "Phishing account",
    "tags": [
    "malicious"
    ]
    },
    {
    "address": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA",
    "paging_token": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA",
    "domain": "stellar.org",
    "name": "SDF Escrow Jan 1 2023",
    "tags": [
    "sdf",
    "custodian"
    ]
    }
    ]
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    }
    }
    }
    },
    "/explorer/directory/{address}": {
    "get": {
    "tags": [
    "Directory API"
    ],
    "operationId": "getDirectoryEntry",
    "summary": "Address Directory info",
    "description": "Returns Directory information for a given account address.",
    "parameters": [
    {
    "name": "address",
    "description": "The address of the account to check",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/AccountAddress"
    },
    "required": true,
    "example": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA"
    }
    ],
    "responses": {
    "200": {
    "description": "Directory entry fetched",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/DirectoryEntry"
    },
    "example": {
    "address": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA",
    "paging_token": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA",
    "domain": "stellar.org",
    "name": "SDF Escrow Jan 1 2023",
    "tags": [
    "sdf",
    "custodian"
    ]
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    },
    "404": {
    "description": "Entry not found"
    }
    }
    }
    },
    "/explorer/directory/tags": {
    "get": {
    "tags": [
    "Directory API"
    ],
    "operationId": "getDirectoryTags",
    "summary": "All Directory tags",
    "description": "Returns a list of all categories that can be used to tag accounts.",
    "responses": {
    "200": {
    "content": {
    "application/json": {
    "schema": {
    "type": "array",
    "items": {
    "$ref": "#/components/schemas/DirectoryTagDescription"
    },
    "example": [
    {
    "name": "exchange",
    "description": "Centralized exchange account"
    },
    {
    "name": "anchor",
    "description": "Operational account of an anchor"
    },
    {
    "name": "issuer",
    "description": "Well known asset issuer account"
    },
    {
    "name": "wallet",
    "description": "Shared account that belongs to a wallet"
    },
    {
    "name": "custodian",
    "description": "Reserved, custodian account, or cold wallet"
    },
    {
    "name": "malicious",
    "description": "Account involved in theft/scam/spam/phishing"
    },
    {
    "name": "unsafe",
    "description": "Obsolete or potentially dangerous account"
    },
    {
    "name": "personal",
    "description": "Personal signing key or account address"
    },
    {
    "name": "sdf",
    "description": "Account under the custody of SDF"
    },
    {
    "name": "memo-required",
    "description": "Destination requires transaction memo"
    },
    {
    "name": "airdrop",
    "description": "Airdrop distribution account"
    }
    ]
    }
    }
    },
    "description": "Available Directory tags fetched"
    }
    }
    }
    },
    "/explorer/directory/blocked-domains": {
    "get": {
    "operationId": "listBlockedDomains",
    "summary": "Blocked domains list",
    "description": "Returns the list of domains reported by the community for fraudulent acitivity. This API endpoint follows Stellar Horizon API response format convention. A response result contains records and navigation links.",
    "tags": [
    "Directory API"
    ],
    "parameters": [
    {
    "name": "search",
    "description": "Case-insesitive search by domain or part of the domain",
    "in": "query",
    "schema": {
    "type": "string",
    "example": "org.ro",
    "minLength": 2
    }
    },
    {
    "name": "cursor",
    "description": "An address from which to continue search (refers to the paging_token value from a results set)",
    "in": "query",
    "schema": {
    "type": "string"
    }
    },
    {
    "name": "order",
    "description": "Results sorting order",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsSortOrder"
    }
    },
    {
    "name": "limit",
    "description": "Results data page size",
    "in": "query",
    "schema": {
    "default": 1000,
    "$ref": "#/components/schemas/HugeResultsLimit"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Blocked domains fetched",
    "content": {
    "application/json": {
    "schema": {
    "allOf": [
    {
    "$ref": "#/components/schemas/ListApiResponse"
    },
    {
    "type": "object",
    "properties": {
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "domain": {
    "type": "string",
    "description": "Fully-qualified domain name"
    },
    "paging_token": {
    "type": "string",
    "description": "Cursor value for results paging"
    }
    }
    }
    }
    }
    }
    }
    }
    ]
    },
    "example": {
    "_links": {
    "self": {
    "href": "/explorer/directory/blocked-domains/?order=asc&limit=2"
    },
    "prev": {
    "href": "/explorer/directory/blocked-domains/?order=desc&limit=2&cursor=agrogenesis.in"
    },
    "next": {
    "href": "/explorer/directory/blocked-domains/?order=asc&limit=2&cursor=airdrop-info.vwv.pw"
    }
    },
    "_embedded": {
    "records": [
    {
    "domain": "agrogenesis.in",
    "paging_token": "agrogenesis.in"
    },
    {
    "domain": "airdrop-info.vwv.pw",
    "paging_token": "airdrop-info.vwv.pw"
    }
    ]
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    }
    }
    }
    },
    "/explorer/directory/blocked-domains/{domain}": {
    "get": {
    "tags": [
    "Directory API"
    ],
    "summary": "Check domain",
    "operationId": "isDomainBlocked",
    "description": "Searches through the blocked malicious domains list to determine if the requested domain or its top-level domain is in the blocklist.",
    "parameters": [
    {
    "name": "domain",
    "description": "Domain to verify (case-insensitive)",
    "in": "path",
    "required": true,
    "schema": {
    "type": "string",
    "example": "stellar.org.am"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Domain verified",
    "content": {
    "application/json": {
    "schema": {
    "type": "object",
    "properties": {
    "domain": {
    "type": "string",
    "decription": "Domain from request",
    "example": "stellar.org.am"
    },
    "blocked": {
    "type": "boolean",
    "description": "Whether the domain should be blocked",
    "example": true
    }
    }
    },
    "example": {
    "domain": "sub.stellar.org.am",
    "blocked": true
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    }
    }
    }
    },
    "/explorer/{network}/asset": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "List of assets",
    "operationId": "getAllAssets",
    "description": "Returns a list of assets that exist on Stellar network. It support searching by asset code, issuer, home domain, and metadata from associated stellar.toml file.\n\nPossible sorting options:\n- rating - composite asset rating derived from on-chain stats\n- created - asset age\n- payments - total number of payments\n- trades - total number of trades\n- trustlines - number of established trustlines\n- volume - overall trading volume\n- volume7d - weekly trading volume",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "search",
    "description": "Arbitrary search term (asset code, issuer, associated home domain, or information from asset TOML metadata)",
    "in": "query",
    "schema": {
    "type": "string"
    },
    "required": false,
    "example": "dollar"
    },
    {
    "name": "sort",
    "description": "Results sorting parameter",
    "in": "query",
    "schema": {
    "type": "string",
    "enum": [
    "rating",
    "created",
    "payments",
    "trades",
    "trustlines",
    "volume",
    "volume7d"
    ],
    "default": "rating"
    },
    "required": false
    },
    {
    "name": "order",
    "description": "Results sorting order",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsSortOrder"
    }
    },
    {
    "name": "limit",
    "description": "Results data page size",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsLimit"
    }
    },
    {
    "name": "cursor",
    "description": "A position from which to continue search (refers to the paging_token value from a results set)",
    "in": "query",
    "schema": {
    "type": "integer"
    },
    "required": false
    }
    ],
    "responses": {
    "200": {
    "description": "Asset list fetched",
    "content": {
    "application/json": {
    "schema": {
    "allOf": [
    {
    "$ref": "#/components/schemas/ListApiResponse"
    },
    {
    "type": "object",
    "properties": {
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array",
    "items": {
    "$ref": "#/components/schemas/AssetInfo"
    }
    }
    }
    }
    }
    }
    ]
    },
    "example": {
    "_links": {
    "self": {
    "href": "/explorer/public/asset?order=desc&limit=2"
    },
    "prev": {
    "href": "/explorer/public/asset?order=asc&limit=2&cursor=1"
    },
    "next": {
    "href": "/explorer/public/asset?order=desc&limit=2&cursor=2"
    }
    },
    "_embedded": {
    "records": [
    {
    "asset": "yXLM-GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55-1",
    "traded_amount": 102588436626011460,
    "payments_amount": 12492248403205108,
    "created": 1615892870,
    "supply": 1669015135707318,
    "trustlines": {
    "total": 32266,
    "authorized": 32266,
    "funded": 19335
    },
    "trades": 13363178,
    "payments": 13405766,
    "domain": "ultrastellar.com",
    "tomlInfo": {
    "orgName": "Ultra Stellar LLC dba Ultra Stellar",
    "orgLogo": "https://ultrastellar.com/static/images/org_logo.png",
    "image": "https://ultrastellar.com/static/images/icons/yXLM.png",
    "status": "live",
    "anchorAssetType": "crypto",
    "anchorAsset": "XLM"
    },
    "rating": {
    "age": 7,
    "trades": 10,
    "payments": 9,
    "trustlines": 7,
    "volume7d": 10,
    "interop": 10,
    "liquidity": 10,
    "average": 9
    },
    "paging_token": 1
    },
    {
    "asset": "USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN-1",
    "traded_amount": 18134208266562304,
    "payments_amount": 24664489154530540,
    "created": 1611089770,
    "supply": 1800404216565311,
    "trustlines": {
    "total": 138801,
    "authorized": 138801,
    "funded": 27503
    },
    "trades": 20324688,
    "payments": 2862354,
    "domain": "centre.io",
    "tomlInfo": {
    "orgName": "Centre Consortium LLC dba Centre Consortium",
    "orgLogo": "https://www.centre.io/images/logo-icon.png",
    "name": "USD Coin",
    "image": "https://www.centre.io/images/usdc/usdc-icon-86074d9d49.png",
    "anchorAssetType": "fiat",
    "anchorAsset": "USD"
    },
    "rating": {
    "age": 7,
    "trades": 10,
    "payments": 8,
    "trustlines": 8,
    "volume7d": 10,
    "interop": 4,
    "liquidity": 10,
    "average": 8.1
    },
    "paging_token": 2
    }
    ]
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    }
    }
    }
    },
    "/explorer/{network}/asset/{asset}/rating": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "Asset rating",
    "operationId": "getAssetRating",
    "description": "To solve the problem of assets ranking on StellarExpert, we designed a system of technical indicators based purely on the ledger activity, including\n\n - asset age (time elapsed sisnce the first payment)\n - established trustlines\n - total number of payments\n - total number of trades\n - weekly trading volume\n - market liquidity (based on the relative slippage of {ASSET}/XLM market)\n - asset interoperability (based on additional asset metadata and supported SEP standards)\n\nAll indicators are calculated on the logarithmic scale to normalize distribution for assets with high trading/transfer activity. The compound rating calculated as the average of all seven indicators can be used to roughly estimate the popularity of any Stellar asset purely from the technical point of view.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "asset",
    "description": "Target asset",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/Asset"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Asset rating fetched",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/AssetRating"
    },
    "example": {
    "asset": "ABC-GAKP6AHQM4JDI55SK2FGEPLOZU7BTEODS3Y5QNT3VMQQIU3WM99T0L4C-1",
    "rating": {
    "age": 9,
    "trades": 6,
    "payments": 10,
    "trustlines": 10,
    "volume7d": 10,
    "interop": 3,
    "liquidty": 8,
    "average": 8
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    },
    "404": {
    "description": "Asset not found"
    }
    }
    }
    },
    "/explorer/{network}/asset/{asset}/holders": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "Asset holders list",
    "operationId": "getAssetHolders",
    "description": "Returns a list of all accounts holding non-zero amount of the given asset sorted by the balance size. Accounts with an established trustline but with zero balance excluded from the results set.\nThis API endpoint follows Stellar Horizon API response format convention. A response result contains records and navigation links.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "asset",
    "description": "Target asset",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/Asset"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Asset holders fetched",
    "content": {
    "application/json": {
    "schema": {
    "allOf": [
    {
    "$ref": "#/components/schemas/ListApiResponse"
    },
    {
    "type": "object",
    "properties": {
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array",
    "items": {
    "$ref": "#/components/schemas/AssetHolder"
    }
    }
    }
    }
    }
    }
    ]
    },
    "example": {
    "_links": {
    "self": {
    "href": "/explorer/public/asset/EURT-GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S/holders?order=desc&limit=2"
    },
    "prev": {
    "href": "/explorer/public/asset/EURT-GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S/holders?order=asc&limit=2&cursor=AAAFOSpHRlQAeBsb"
    },
    "next": {
    "href": "/explorer/public/asset/EURT-GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S/holders?order=desc&limit=2&cursor=AAACXn0v0QUAsZIb"
    }
    },
    "_embedded": {
    "records": [
    {
    "account": "GCWGHBQLVZ6QXV7OLHBCFHNPWOCSWGRZ7DTW44BN4IQ7QYVRX3JYPJ7E",
    "balance": "5965453988886",
    "paging_token": "AAAFOSpHRlQAeBsb"
    },
    {
    "account": "GAFBGZANI7JRXABPEERQGBTFS3AG67M4ZQTMT2VIMWZ6BY4K64QK3D3U",
    "balance": "2604850467077",
    "paging_token": "AAACXn0v0QUAsZIb"
    }
    ]
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    },
    "404": {
    "description": "Asset not found"
    }
    }
    }
    },
    "/explorer/{network}/asset/{asset}/position": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "Asset holder rank",
    "operationId": "getAssetHolderPosition",
    "description": "Retrieves a relative account balance position among all accounts holding a particular asset.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "asset",
    "description": "Asset used for rating calculation",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/Asset"
    }
    },
    {
    "name": "account",
    "description": "Account address to check",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/AccountAddress"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Asset holder rank info fetched",
    "content": {
    "application/json": {
    "schema": {
    "type": "object",
    "properties": {
    "account": {
    "$ref": "#/components/schemas/AccountAddress",
    "description": "Account address to check"
    },
    "asset": {
    "$ref": "#/components/schemas/Asset",
    "description": "Asset used for rating calculation"
    },
    "balance": {
    "type": "string",
    "description": "Asset balance owned by the account"
    },
    "position": {
    "type": "integer",
    "description": "Position among all accounts holding a particular asset"
    },
    "total": {
    "type": "integer",
    "description": "Total number of accounts with non-zero balance"
    }
    }
    },
    "example": {
    "account": "GDKIJJIKXLOM2NRMPNQZUUYK24ZPVFC6426GZAEP3KUK6KEJLACCWNMX",
    "asset": "XLM",
    "balance": "39065991792893022",
    "position": 3,
    "total": 7159959
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    },
    "404": {
    "description": "Asset not found"
    }
    }
    }
    },
    "/explorer/{network}/asset/{asset}/supply": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "Asset supply",
    "operationId": "getAssetSupply",
    "description": "Asset supply endpoint returns the total issued supply for an asset. It is handy for displaying the total number of tokens on the website or providing relevant information to third-party platforms. For example, aggregators often require an API endpoint to track the asset supply.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "asset",
    "description": "Target asset",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/Asset"
    },
    "example": "EURT-GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S"
    }
    ],
    "responses": {
    "200": {
    "description": "Asset supply fetched",
    "content": {
    "text/plain; charset=utf-8": {
    "schema": {
    "type": "string"
    },
    "example": "1203229.6298700"
    }
    }
    },
    "404": {
    "description": "Asset not found"
    }
    }
    }
    },
    "/explorer/{network}/ledger/sequence-from-timestamp": {
    "get": {
    "tags": [
    "Ledger Info API"
    ],
    "summary": "Find sequence by timestamp",
    "operationId": "getSequenceFromTimestamp",
    "description": "Resolves ledger sequence with a finalization time equal or less than a given timestamp. If the timestamp indicates some time in the future or, vise versa, less than the closing time of the first ledger, server returns 404 Not Found error.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "public"
    },
    {
    "name": "timestamp",
    "description": "Timestamp to search (UNIX time or RFC 3339 timestamp)",
    "in": "query",
    "required": true,
    "schema": {
    "anyOf": [
    {
    "type": "string",
    "format": "date-time"
    },
    {
    "type": "integer",
    "minimum": 0
    }
    ]
    },
    "example": 1642597270
    }
    ],
    "responses": {
    "200": {
    "description": "Ledger sequence resolved",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/LedgerTimestampSequenceInfo"
    }
    }
    }
    },
    "400": {
    "description": "Invalid timestamp"
    },
    "404": {
    "description": "Ledger sequence cannot be resolved"
    }
    }
    }
    },
    "/explorer/{network}/ledger/timestamp-from-sequence": {
    "get": {
    "tags": [
    "Ledger Info API"
    ],
    "summary": "Find timestamp by sequence",
    "operationId": "getTimestampFromSequence",
    "description": "Resolves ledger closing timestamp for a give ledger sequence.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "public"
    },
    {
    "name": "sequence",
    "description": "Ledger sequence",
    "in": "query",
    "required": true,
    "schema": {
    "type": "integer",
    "minimum": 1
    },
    "example": 32590807
    }
    ],
    "responses": {
    "200": {
    "description": "Timestamp resolved",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/LedgerTimestampSequenceInfo"
    }
    }
    }
    },
    "400": {
    "description": "Invalid sequence"
    },
    "404": {
    "description": "Ledger with a given sequence cannot be found"
    }
    }
    }
    }
    },
    "components": {
    "schemas": {
    "UnixTime": {
    "description": "Unix timestamp (UTC)",
    "type": "integer",
    "minimum": 0,
    "example": 1615892870
    },
    "Network": {
    "description": "Stellar network",
    "type": "string",
    "enum": [
    "public",
    "testnet"
    ],
    "example": "public"
    },
    "AccountAddress": {
    "description": "Account address (ED25519 public key)",
    "type": "string",
    "example": "GAB6FD5BCBVVQINU5USYV5K4JDAEO6RDL2GZU4K5BILPI6B4FIOF6QWW",
    "pattern": "/^G[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{55}$/"
    },
    "Amount": {
    "description": "Operation amount",
    "type": "string",
    "example": "145.67"
    },
    "Asset": {
    "description": "An asset in the format {CODE}-{ISSUER} (or "XLM" for Stellar lumens)",
    "type": "string",
    "example": "BTC-GDKIIIL2YPRSCSFAYT7FQCH4VXF34YNBIORTYCOKJK5CZ762LX2ND4L4"
    },
    "ResultsSortOrder": {
    "description": "Results sorting order",
    "type": "string",
    "enum": [
    "asc",
    "desc"
    ],
    "example": "desc"
    },
    "ResultsLimit": {
    "description": "Results data page size",
    "type": "number",
    "minimum": 1,
    "maximum": 200,
    "default": 10,
    "example": 10
    },
    "HugeResultsLimit": {
    "description": "Results data page size",
    "type": "number",
    "minimum": 1,
    "maximum": 1000,
    "default": 1000,
    "example": 100
    },
    "ListApiResponse": {
    "description": "List API response",
    "type": "object",
    "properties": {
    "_links": {
    "type": "object",
    "properties": {
    "self": {
    "$ref": "#/components/schemas/ListApiResponseNavLink"
    },
    "prev": {
    "$ref": "#/components/schemas/ListApiResponseNavLink"
    },
    "next": {
    "$ref": "#/components/schemas/ListApiResponseNavLink"
    }
    }
    },
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array"
    }
    }
    }
    }
    },
    "ListApiResponseNavLink": {
    "type": "object",
    "properties": {
    "href": {
    "type": "string"
    }
    }
    },
    "DirectoryEntry": {
    "description": "Directory entry info",
    "type": "object",
    "properties": {
    "address": {
    "description": "Account address",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "paging_token": {
    "description": "Cursor value for results paging",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "name": {
    "description": "Entry friendly name",
    "type": "string"
    },
    "tags": {
    "description": "Entry friendly name",
    "type": "array",
    "uniqueItems": true,
    "items": {
    "type": "string"
    }
    },
    "domain": {
    "description": "Domain associated with entry if any",
    "type": "string"
    }
    },
    "required": [
    "address",
    "paging_token",
    "name",
    "tags"
    ]
    },
    "DirectoryTagDescription": {
    "description": "Directory tag descriptor",
    "required": [
    "name",
    "description"
    ],
    "type": "object",
    "properties": {
    "name": {
    "description": "Tag name",
    "type": "string",
    "example": "exchange"
    },
    "description": {
    "description": "User-friendly tag description",
    "type": "string",
    "example": "Centralized exchange account"
    }
    }
    },
    "PaymentEntry": {
    "description": "Payment info",
    "type": "object",
    "properties": {
    "id": {
    "description": "Operation unique id",
    "type": "string",
    "example": 86172183717662720
    },
    "paging_token": {
    "description": "Paging token",
    "type": "string",
    "example": 86172183717662720
    },
    "optype": {
    "description": "Operation type",
    "type": "integer"
    },
    "ledger": {
    "description": "Ledger containing the payment operation",
    "type": "integer",
    "example": 1640731
    },
    "tx_id": {
    "description": "Transaction unique id",
    "type": "string",
    "example": 86172183717662720
    },
    "ts": {
    "description": "Operation timestamp",
    "type": "string",
    "format": "date-time",
    "example": "2018-09-19T12:23:16.000Z"
    },
    "from": {
    "description": "Source account",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "source_asset": {
    "description": "Source asset",
    "$ref": "#/components/schemas/Asset"
    },
    "source_amount": {
    "description": "Source amount",
    "$ref": "#/components/schemas/Amount"
    },
    "to": {
    "description": "Destination account",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "asset": {
    "description": "Destination asset",
    "$ref": "#/components/schemas/Asset"
    },
    "amount": {
    "description": "Destination amount",
    "$ref": "#/components/schemas/Amount"
    }
    }
    },
    "AssetInfo": {
    "description": "General asset info",
    "type": "object",
    "properties": {
    "asset": {
    "description": "Asset identifier",
    "$ref": "#/components/schemas/Asset"
    },
    "traded_amount": {
    "description": "Total traded amount (in stroops)",
    "type": "number"
    },
    "payments_amount": {
    "description": "Total payments amount (in stroops)",
    "type": "number"
    },
    "created": {
    "description": "Timestamp of the first recorder operation with asset",
    "$ref": "#/components/schemas/UnixTime"
    },
    "supply": {
    "description": "Total issued asset supply",
    "type": "number"
    },
    "trustlines": {
    "description": "Trustlines established to an asset",
    "type": "object",
    "properties": {
    "total": {
    "description": "Total number of trustlines",
    "type": "integer"
    },
    "authorized": {
    "description": "Trustlines authorized by the issuer",
    "type": "integer"
    },
    "funded": {
    "description": "Trustlines with non-zero balance",
    "type": "integer"
    }
    }
    },
    "trades": {
    "description": "Total number of trades",
    "type": "number"
    },
    "payments": {
    "description": "Total number of payments",
    "type": "number"
    },
    "domain": {
    "description": "Associated home_domain",
    "type": "string"
    },
    "tomlInfo": {
    "description": "Asset information from stellar.toml file",
    "type": "object"
    },
    "rating": {
    "description": "Composite asset rating",
    "$ref": "#/components/schemas/AssetRating",
    "type": "object"
    },
    "paging_token": {
    "description": "Paging token",
    "type": "number"
    }
    }
    },
    "AssetRating": {
    "description": "Asset rating info",
    "type": "object",
    "properties": {
    "asset": {
    "$ref": "#/components/schemas/Asset"
    },
    "rating": {
    "type": "object",
    "properties": {
    "age": {
    "type": "integer"
    },
    "trages": {
    "type": "integer"
    },
    "payments": {
    "type": "integer"
    },
    "trustlines": {
    "type": "integer"
    },
    "volume7d": {
    "type": "integer"
    },
    "interop": {
    "type": "integer"
    },
    "liqidity": {
    "type": "integer"
    },
    "average": {
    "type": "integer"
    }
    }
    }
    }
    },
    "AssetHolder": {
    "description": "Asset holder description",
    "type": "object",
    "properties": {
    "account": {
    "description": "Account address",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "balance": {
    "description": "Asset balance in stroops",
    "type": "string"
    },
    "paging_token": {
    "description": "Paging token",
    "type": "string"
    }
    }
    },
    "LedgerTimestampSequenceInfo": {
    "description": "Ledger sequence-timestamp pair",
    "type": "object",
    "properties": {
    "sequence": {
    "description": "Ledger sequence",
    "type": "integer"
    },
    "timestamp": {
    "description": "Ledger UNIX timestamp",
    "$ref": "#/components/schemas/UnixTime"
    },
    "date": {
    "description": "Ledger date",
    "type": "string",
    "format": "date-time"
    }
    },
    "example": {
    "sequence": 42431435,
    "timestamp": 1661781078,
    "date": "2022-08-29T13:51:18.000Z"
    }
    }
    }
    },
    "tags": [
    {
    "name": "Directory API"
    },
    {
    "name": "Asset Info API"
    }
    ]
    }

  4. cindylhiam01-jpg commented on Sep 6, 2026

    @cindylhiam01-jpg
  5. cindylhiam01-jpg commented on Sep 6, 2026

    @cindylhiam01-jpg

    Lock?

  6. cindylhiam01-jpg commented on Sep 6, 2026

    @cindylhiam01-jpg

    curl -X GET "https://compass-api.dbm.gov.ph/api/v1/records/saaodb?reportYear=2026&period=FY&limit=10"
    -H "X-API-Key: dbm_live_your_actual_key"fetch('https://compass-api.dbm.gov.ph/api/v1/records/saaodb?reportYear=2026&period=FY&limit=10', {
    headers: {
    'X-API-Key': 'dbm_live_your_actual_key'
    }
    })
    .then(res => res.json())
    .then(data => console.log(data));const hst = require("hardhat");

    async function main() {
    // 1. Address of the already deployed DBC Orchestrator
    const DBC_ADDRESS = "0xYourDBCContractAddressHere";

    // 2. The wallet that will manage the Main Agency's documents
    const MAIN_AGENCY_MANAGER = "0xYourManagerWalletAddress";

    console.log("Deploying Department contract...");

    const Department = await ethers.getContractFactory("Department");
    const dept = await Department.deploy(
    "DBM", // _code
    "Department of Budget and Management", // _name
    "Office of the Secretary", // _mainAgencyName
    DBC_ADDRESS, // _dbc
    MAIN_AGENCY_MANAGER // mainAgencyOwner
    );

    await dept.waitForDeployment();

    console.log(Department deployed to: ${await dept.getAddress()});
    console.log(Main Agency automatically created during construction.);
    }

    main().catch((error) => {
    console.error(error);
    process.exitCode = 1;
    });

    {
    "openapi": "3.1.0",
    "info": {
    "title": "StellarExpert API",
    "version": "1.4.0",
    "description": "## Intro\n\nStellarExpert Open APIs are publicly available for developers, free of charge.\n\nOpen API enpoints do not require authentication and can be used directly from the browser.\n\n### Cross-Origin Resource Sharing\n\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with W3C spec.\nAnd that allows cross-domain communication from the browser. All responses have a wildcard same-origin\nwhich makes them completely public and accessible to everyone, including any code on any site.\n\n### Rate Limiting and Caching Considerations\n\nThe effective API request rate may be a subject to rate limiting. In such cases the server returns 429 HTTP\nstatus code error. To avoid potential problems caused by those limitations it is advised to consider response\ncaching or group queries on the caller side in case of heavy API utilization.\n",
    "termsOfService": "https://stellar.expert/",
    "contact": {
    "url": "https://stellar.expert/",
    "email": "info@stellar.expert"
    },
    "license": {
    "name": "MIT",
    "url": "https://tldrlegal.com/license/mit-license"
    },
    "x-logo": {
    "url": "https://stellar.expert/img/stellar-expert-blue.svg"
    }
    },
    "servers": [
    {
    "url": "https://api.stellar.expert"
    }
    ],
    "paths": {
    "/explorer/directory": {
    "get": {
    "operationId": "listDirectoryEntries",
    "summary": "Directory entries",
    "description": "Returns the list of directory entries with paging navigation links. Optionally filtered by address, tag, or arbitrary search string. This API endpoint follows Stellar Horizon API response format convention. A response result contains records and navigation links.\n#### Query examples:\nFetch information about multiple accounts in one call\n\ncurl -g \"https://api.stellar.expert/explorer/directory?address[]=GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH&address[]=GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S\"\n\nSearch for Kraken's deposit account\n\ncurl \"https://api.stellar.expert/explorer/directory?search=kraken\"\n\nFind accounts tagged as malicious or unsafe\n\ncurl -g \"https://api.stellar.expert/explorer/directory?tag[]=malicious&tag[]=unsafe\"\n\nLookup addresses reported for "staking"-related scams\n\ncurl -g \"https://api.stellar.expert/explorer/directory?tag[]=malicious&search=stacking\"",
    "tags": [
    "Directory API"
    ],
    "parameters": [
    {
    "name": "address",
    "description": "Applies a filter by the addresses list (up to 50 per request)",
    "in": "query",
    "schema": {
    "type": "array",
    "minItems": 1,
    "maxItems": 50,
    "uniqueItems": true,
    "items": {
    "$ref": "#/components/schemas/AccountAddress"
    }
    },
    "example": [
    "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA"
    ]
    },
    {
    "name": "tag",
    "description": "Applies a filter by tags",
    "in": "query",
    "schema": {
    "type": "array",
    "minItems": 1,
    "maxItems": 10,
    "uniqueItems": true,
    "items": {
    "type": "string"
    }
    },
    "example": [
    "custodian",
    "anchor"
    ]
    },
    {
    "name": "search",
    "description": "Applies a full-test search filter by an entry address, name, or domain",
    "in": "query",
    "schema": {
    "type": "string",
    "minLength": 5
    }
    },
    {
    "name": "cursor",
    "description": "An address from which to continue search (refers to the paging_token value from a results set)",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/AccountAddress"
    }
    },
    {
    "name": "order",
    "description": "Results sorting order",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsSortOrder"
    }
    },
    {
    "name": "limit",
    "description": "Results data page size",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsLimit"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Directory entries fetched",
    "content": {
    "application/json": {
    "schema": {
    "allOf": [
    {
    "$ref": "#/components/schemas/ListApiResponse"
    },
    {
    "type": "object",
    "properties": {
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array",
    "items": {
    "$ref": "#/components/schemas/DirectoryEntry"
    }
    }
    }
    }
    }
    }
    ]
    },
    "example": {
    "_links": {
    "self": {
    "href": "/explorer/directory?sort=address&order=asc&limit=2"
    },
    "prev": {
    "href": "/explorer/directory?sort=address&order=desc&cursor=GA272U6UMNKYOBDCLH5CDAPZVDG4WAGJWFY2S2RV2DN6YSSOGYECEVOF&limit=2"
    },
    "next": {
    "href": "/explorer/directory?sort=address&order=asc&cursor=GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA&limit=2"
    }
    },
    "_embedded": {
    "records": [
    {
    "address": "GA272U6UMNKYOBDCLH5CDAPZVDG4WAGJWFY2S2RV2DN6YSSOGYECEVOF",
    "paging_token": "GA272U6UMNKYOBDCLH5CDAPZVDG4WAGJWFY2S2RV2DN6YSSOGYECEVOF",
    "name": "Phishing account",
    "tags": [
    "malicious"
    ]
    },
    {
    "address": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA",
    "paging_token": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA",
    "domain": "stellar.org",
    "name": "SDF Escrow Jan 1 2023",
    "tags": [
    "sdf",
    "custodian"
    ]
    }
    ]
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    }
    }
    }
    },
    "/explorer/directory/{address}": {
    "get": {
    "tags": [
    "Directory API"
    ],
    "operationId": "getDirectoryEntry",
    "summary": "Address Directory info",
    "description": "Returns Directory information for a given account address.",
    "parameters": [
    {
    "name": "address",
    "description": "The address of the account to check",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/AccountAddress"
    },
    "required": true,
    "example": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA"
    }
    ],
    "responses": {
    "200": {
    "description": "Directory entry fetched",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/DirectoryEntry"
    },
    "example": {
    "address": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA",
    "paging_token": "GA2VRL65L3ZFEDDJ357RGI3MAOKPJZ2Z3IJTPSC24I4KDTNFSVEQURRA",
    "domain": "stellar.org",
    "name": "SDF Escrow Jan 1 2023",
    "tags": [
    "sdf",
    "custodian"
    ]
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    },
    "404": {
    "description": "Entry not found"
    }
    }
    }
    },
    "/explorer/directory/tags": {
    "get": {
    "tags": [
    "Directory API"
    ],
    "operationId": "getDirectoryTags",
    "summary": "All Directory tags",
    "description": "Returns a list of all categories that can be used to tag accounts.",
    "responses": {
    "200": {
    "content": {
    "application/json": {
    "schema": {
    "type": "array",
    "items": {
    "$ref": "#/components/schemas/DirectoryTagDescription"
    },
    "example": [
    {
    "name": "exchange",
    "description": "Centralized exchange account"
    },
    {
    "name": "anchor",
    "description": "Operational account of an anchor"
    },
    {
    "name": "issuer",
    "description": "Well known asset issuer account"
    },
    {
    "name": "wallet",
    "description": "Shared account that belongs to a wallet"
    },
    {
    "name": "custodian",
    "description": "Reserved, custodian account, or cold wallet"
    },
    {
    "name": "malicious",
    "description": "Account involved in theft/scam/spam/phishing"
    },
    {
    "name": "unsafe",
    "description": "Obsolete or potentially dangerous account"
    },
    {
    "name": "personal",
    "description": "Personal signing key or account address"
    },
    {
    "name": "sdf",
    "description": "Account under the custody of SDF"
    },
    {
    "name": "memo-required",
    "description": "Destination requires transaction memo"
    },
    {
    "name": "airdrop",
    "description": "Airdrop distribution account"
    }
    ]
    }
    }
    },
    "description": "Available Directory tags fetched"
    }
    }
    }
    },
    "/explorer/directory/blocked-domains": {
    "get": {
    "operationId": "listBlockedDomains",
    "summary": "Blocked domains list",
    "description": "Returns the list of domains reported by the community for fraudulent acitivity. This API endpoint follows Stellar Horizon API response format convention. A response result contains records and navigation links.",
    "tags": [
    "Directory API"
    ],
    "parameters": [
    {
    "name": "search",
    "description": "Case-insesitive search by domain or part of the domain",
    "in": "query",
    "schema": {
    "type": "string",
    "example": "org.ro",
    "minLength": 2
    }
    },
    {
    "name": "cursor",
    "description": "An address from which to continue search (refers to the paging_token value from a results set)",
    "in": "query",
    "schema": {
    "type": "string"
    }
    },
    {
    "name": "order",
    "description": "Results sorting order",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsSortOrder"
    }
    },
    {
    "name": "limit",
    "description": "Results data page size",
    "in": "query",
    "schema": {
    "default": 1000,
    "$ref": "#/components/schemas/HugeResultsLimit"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Blocked domains fetched",
    "content": {
    "application/json": {
    "schema": {
    "allOf": [
    {
    "$ref": "#/components/schemas/ListApiResponse"
    },
    {
    "type": "object",
    "properties": {
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "domain": {
    "type": "string",
    "description": "Fully-qualified domain name"
    },
    "paging_token": {
    "type": "string",
    "description": "Cursor value for results paging"
    }
    }
    }
    }
    }
    }
    }
    }
    ]
    },
    "example": {
    "_links": {
    "self": {
    "href": "/explorer/directory/blocked-domains/?order=asc&limit=2"
    },
    "prev": {
    "href": "/explorer/directory/blocked-domains/?order=desc&limit=2&cursor=agrogenesis.in"
    },
    "next": {
    "href": "/explorer/directory/blocked-domains/?order=asc&limit=2&cursor=airdrop-info.vwv.pw"
    }
    },
    "_embedded": {
    "records": [
    {
    "domain": "agrogenesis.in",
    "paging_token": "agrogenesis.in"
    },
    {
    "domain": "airdrop-info.vwv.pw",
    "paging_token": "airdrop-info.vwv.pw"
    }
    ]
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    }
    }
    }
    },
    "/explorer/directory/blocked-domains/{domain}": {
    "get": {
    "tags": [
    "Directory API"
    ],
    "summary": "Check domain",
    "operationId": "isDomainBlocked",
    "description": "Searches through the blocked malicious domains list to determine if the requested domain or its top-level domain is in the blocklist.",
    "parameters": [
    {
    "name": "domain",
    "description": "Domain to verify (case-insensitive)",
    "in": "path",
    "required": true,
    "schema": {
    "type": "string",
    "example": "stellar.org.am"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Domain verified",
    "content": {
    "application/json": {
    "schema": {
    "type": "object",
    "properties": {
    "domain": {
    "type": "string",
    "decription": "Domain from request",
    "example": "stellar.org.am"
    },
    "blocked": {
    "type": "boolean",
    "description": "Whether the domain should be blocked",
    "example": true
    }
    }
    },
    "example": {
    "domain": "sub.stellar.org.am",
    "blocked": true
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    }
    }
    }
    },
    "/explorer/{network}/asset": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "List of assets",
    "operationId": "getAllAssets",
    "description": "Returns a list of assets that exist on Stellar network. It support searching by asset code, issuer, home domain, and metadata from associated stellar.toml file.\n\nPossible sorting options:\n- rating - composite asset rating derived from on-chain stats\n- created - asset age\n- payments - total number of payments\n- trades - total number of trades\n- trustlines - number of established trustlines\n- volume - overall trading volume\n- volume7d - weekly trading volume",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "search",
    "description": "Arbitrary search term (asset code, issuer, associated home domain, or information from asset TOML metadata)",
    "in": "query",
    "schema": {
    "type": "string"
    },
    "required": false,
    "example": "dollar"
    },
    {
    "name": "sort",
    "description": "Results sorting parameter",
    "in": "query",
    "schema": {
    "type": "string",
    "enum": [
    "rating",
    "created",
    "payments",
    "trades",
    "trustlines",
    "volume",
    "volume7d"
    ],
    "default": "rating"
    },
    "required": false
    },
    {
    "name": "order",
    "description": "Results sorting order",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsSortOrder"
    }
    },
    {
    "name": "limit",
    "description": "Results data page size",
    "in": "query",
    "schema": {
    "$ref": "#/components/schemas/ResultsLimit"
    }
    },
    {
    "name": "cursor",
    "description": "A position from which to continue search (refers to the paging_token value from a results set)",
    "in": "query",
    "schema": {
    "type": "integer"
    },
    "required": false
    }
    ],
    "responses": {
    "200": {
    "description": "Asset list fetched",
    "content": {
    "application/json": {
    "schema": {
    "allOf": [
    {
    "$ref": "#/components/schemas/ListApiResponse"
    },
    {
    "type": "object",
    "properties": {
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array",
    "items": {
    "$ref": "#/components/schemas/AssetInfo"
    }
    }
    }
    }
    }
    }
    ]
    },
    "example": {
    "_links": {
    "self": {
    "href": "/explorer/public/asset?order=desc&limit=2"
    },
    "prev": {
    "href": "/explorer/public/asset?order=asc&limit=2&cursor=1"
    },
    "next": {
    "href": "/explorer/public/asset?order=desc&limit=2&cursor=2"
    }
    },
    "_embedded": {
    "records": [
    {
    "asset": "yXLM-GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55-1",
    "traded_amount": 102588436626011460,
    "payments_amount": 12492248403205108,
    "created": 1615892870,
    "supply": 1669015135707318,
    "trustlines": {
    "total": 32266,
    "authorized": 32266,
    "funded": 19335
    },
    "trades": 13363178,
    "payments": 13405766,
    "domain": "ultrastellar.com",
    "tomlInfo": {
    "orgName": "Ultra Stellar LLC dba Ultra Stellar",
    "orgLogo": "https://ultrastellar.com/static/images/org_logo.png",
    "image": "https://ultrastellar.com/static/images/icons/yXLM.png",
    "status": "live",
    "anchorAssetType": "crypto",
    "anchorAsset": "XLM"
    },
    "rating": {
    "age": 7,
    "trades": 10,
    "payments": 9,
    "trustlines": 7,
    "volume7d": 10,
    "interop": 10,
    "liquidity": 10,
    "average": 9
    },
    "paging_token": 1
    },
    {
    "asset": "USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN-1",
    "traded_amount": 18134208266562304,
    "payments_amount": 24664489154530540,
    "created": 1611089770,
    "supply": 1800404216565311,
    "trustlines": {
    "total": 138801,
    "authorized": 138801,
    "funded": 27503
    },
    "trades": 20324688,
    "payments": 2862354,
    "domain": "centre.io",
    "tomlInfo": {
    "orgName": "Centre Consortium LLC dba Centre Consortium",
    "orgLogo": "https://www.centre.io/images/logo-icon.png",
    "name": "USD Coin",
    "image": "https://www.centre.io/images/usdc/usdc-icon-86074d9d49.png",
    "anchorAssetType": "fiat",
    "anchorAsset": "USD"
    },
    "rating": {
    "age": 7,
    "trades": 10,
    "payments": 8,
    "trustlines": 8,
    "volume7d": 10,
    "interop": 4,
    "liquidity": 10,
    "average": 8.1
    },
    "paging_token": 2
    }
    ]
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    }
    }
    }
    },
    "/explorer/{network}/asset/{asset}/rating": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "Asset rating",
    "operationId": "getAssetRating",
    "description": "To solve the problem of assets ranking on StellarExpert, we designed a system of technical indicators based purely on the ledger activity, including\n\n - asset age (time elapsed sisnce the first payment)\n - established trustlines\n - total number of payments\n - total number of trades\n - weekly trading volume\n - market liquidity (based on the relative slippage of {ASSET}/XLM market)\n - asset interoperability (based on additional asset metadata and supported SEP standards)\n\nAll indicators are calculated on the logarithmic scale to normalize distribution for assets with high trading/transfer activity. The compound rating calculated as the average of all seven indicators can be used to roughly estimate the popularity of any Stellar asset purely from the technical point of view.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "asset",
    "description": "Target asset",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/Asset"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Asset rating fetched",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/AssetRating"
    },
    "example": {
    "asset": "ABC-GAKP6AHQM4JDI55SK2FGEPLOZU7BTEODS3Y5QNT3VMQQIU3WM99T0L4C-1",
    "rating": {
    "age": 9,
    "trades": 6,
    "payments": 10,
    "trustlines": 10,
    "volume7d": 10,
    "interop": 3,
    "liquidty": 8,
    "average": 8
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    },
    "404": {
    "description": "Asset not found"
    }
    }
    }
    },
    "/explorer/{network}/asset/{asset}/holders": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "Asset holders list",
    "operationId": "getAssetHolders",
    "description": "Returns a list of all accounts holding non-zero amount of the given asset sorted by the balance size. Accounts with an established trustline but with zero balance excluded from the results set.\nThis API endpoint follows Stellar Horizon API response format convention. A response result contains records and navigation links.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "asset",
    "description": "Target asset",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/Asset"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Asset holders fetched",
    "content": {
    "application/json": {
    "schema": {
    "allOf": [
    {
    "$ref": "#/components/schemas/ListApiResponse"
    },
    {
    "type": "object",
    "properties": {
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array",
    "items": {
    "$ref": "#/components/schemas/AssetHolder"
    }
    }
    }
    }
    }
    }
    ]
    },
    "example": {
    "_links": {
    "self": {
    "href": "/explorer/public/asset/EURT-GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S/holders?order=desc&limit=2"
    },
    "prev": {
    "href": "/explorer/public/asset/EURT-GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S/holders?order=asc&limit=2&cursor=AAAFOSpHRlQAeBsb"
    },
    "next": {
    "href": "/explorer/public/asset/EURT-GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S/holders?order=desc&limit=2&cursor=AAACXn0v0QUAsZIb"
    }
    },
    "_embedded": {
    "records": [
    {
    "account": "GCWGHBQLVZ6QXV7OLHBCFHNPWOCSWGRZ7DTW44BN4IQ7QYVRX3JYPJ7E",
    "balance": "5965453988886",
    "paging_token": "AAAFOSpHRlQAeBsb"
    },
    {
    "account": "GAFBGZANI7JRXABPEERQGBTFS3AG67M4ZQTMT2VIMWZ6BY4K64QK3D3U",
    "balance": "2604850467077",
    "paging_token": "AAACXn0v0QUAsZIb"
    }
    ]
    }
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    },
    "404": {
    "description": "Asset not found"
    }
    }
    }
    },
    "/explorer/{network}/asset/{asset}/position": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "Asset holder rank",
    "operationId": "getAssetHolderPosition",
    "description": "Retrieves a relative account balance position among all accounts holding a particular asset.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "asset",
    "description": "Asset used for rating calculation",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/Asset"
    }
    },
    {
    "name": "account",
    "description": "Account address to check",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/AccountAddress"
    }
    }
    ],
    "responses": {
    "200": {
    "description": "Asset holder rank info fetched",
    "content": {
    "application/json": {
    "schema": {
    "type": "object",
    "properties": {
    "account": {
    "$ref": "#/components/schemas/AccountAddress",
    "description": "Account address to check"
    },
    "asset": {
    "$ref": "#/components/schemas/Asset",
    "description": "Asset used for rating calculation"
    },
    "balance": {
    "type": "string",
    "description": "Asset balance owned by the account"
    },
    "position": {
    "type": "integer",
    "description": "Position among all accounts holding a particular asset"
    },
    "total": {
    "type": "integer",
    "description": "Total number of accounts with non-zero balance"
    }
    }
    },
    "example": {
    "account": "GDKIJJIKXLOM2NRMPNQZUUYK24ZPVFC6426GZAEP3KUK6KEJLACCWNMX",
    "asset": "XLM",
    "balance": "39065991792893022",
    "position": 3,
    "total": 7159959
    }
    }
    }
    },
    "400": {
    "description": "Invalid request parameters"
    },
    "404": {
    "description": "Asset not found"
    }
    }
    }
    },
    "/explorer/{network}/asset/{asset}/supply": {
    "get": {
    "tags": [
    "Asset Info API"
    ],
    "summary": "Asset supply",
    "operationId": "getAssetSupply",
    "description": "Asset supply endpoint returns the total issued supply for an asset. It is handy for displaying the total number of tokens on the website or providing relevant information to third-party platforms. For example, aggregators often require an API endpoint to track the asset supply.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "testnet"
    },
    {
    "name": "asset",
    "description": "Target asset",
    "in": "path",
    "required": true,
    "schema": {
    "$ref": "#/components/schemas/Asset"
    },
    "example": "EURT-GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S"
    }
    ],
    "responses": {
    "200": {
    "description": "Asset supply fetched",
    "content": {
    "text/plain; charset=utf-8": {
    "schema": {
    "type": "string"
    },
    "example": "1203229.6298700"
    }
    }
    },
    "404": {
    "description": "Asset not found"
    }
    }
    }
    },
    "/explorer/{network}/ledger/sequence-from-timestamp": {
    "get": {
    "tags": [
    "Ledger Info API"
    ],
    "summary": "Find sequence by timestamp",
    "operationId": "getSequenceFromTimestamp",
    "description": "Resolves ledger sequence with a finalization time equal or less than a given timestamp. If the timestamp indicates some time in the future or, vise versa, less than the closing time of the first ledger, server returns 404 Not Found error.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "public"
    },
    {
    "name": "timestamp",
    "description": "Timestamp to search (UNIX time or RFC 3339 timestamp)",
    "in": "query",
    "required": true,
    "schema": {
    "anyOf": [
    {
    "type": "string",
    "format": "date-time"
    },
    {
    "type": "integer",
    "minimum": 0
    }
    ]
    },
    "example": 1642597270
    }
    ],
    "responses": {
    "200": {
    "description": "Ledger sequence resolved",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/LedgerTimestampSequenceInfo"
    }
    }
    }
    },
    "400": {
    "description": "Invalid timestamp"
    },
    "404": {
    "description": "Ledger sequence cannot be resolved"
    }
    }
    }
    },
    "/explorer/{network}/ledger/timestamp-from-sequence": {
    "get": {
    "tags": [
    "Ledger Info API"
    ],
    "summary": "Find timestamp by sequence",
    "operationId": "getTimestampFromSequence",
    "description": "Resolves ledger closing timestamp for a give ledger sequence.",
    "parameters": [
    {
    "name": "network",
    "description": "Stellar network",
    "in": "path",
    "schema": {
    "$ref": "#/components/schemas/Network"
    },
    "required": true,
    "example": "public"
    },
    {
    "name": "sequence",
    "description": "Ledger sequence",
    "in": "query",
    "required": true,
    "schema": {
    "type": "integer",
    "minimum": 1
    },
    "example": 32590807
    }
    ],
    "responses": {
    "200": {
    "description": "Timestamp resolved",
    "content": {
    "application/json": {
    "schema": {
    "$ref": "#/components/schemas/LedgerTimestampSequenceInfo"
    }
    }
    }
    },
    "400": {
    "description": "Invalid sequence"
    },
    "404": {
    "description": "Ledger with a given sequence cannot be found"
    }
    }
    }
    }
    },
    "components": {
    "schemas": {
    "UnixTime": {
    "description": "Unix timestamp (UTC)",
    "type": "integer",
    "minimum": 0,
    "example": 1615892870
    },
    "Network": {
    "description": "Stellar network",
    "type": "string",
    "enum": [
    "public",
    "testnet"
    ],
    "example": "public"
    },
    "AccountAddress": {
    "description": "Account address (ED25519 public key)",
    "type": "string",
    "example": "GAB6FD5BCBVVQINU5USYV5K4JDAEO6RDL2GZU4K5BILPI6B4FIOF6QWW",
    "pattern": "/^G[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{55}$/"
    },
    "Amount": {
    "description": "Operation amount",
    "type": "string",
    "example": "145.67"
    },
    "Asset": {
    "description": "An asset in the format {CODE}-{ISSUER} (or "XLM" for Stellar lumens)",
    "type": "string",
    "example": "BTC-GDKIIIL2YPRSCSFAYT7FQCH4VXF34YNBIORTYCOKJK5CZ762LX2ND4L4"
    },
    "ResultsSortOrder": {
    "description": "Results sorting order",
    "type": "string",
    "enum": [
    "asc",
    "desc"
    ],
    "example": "desc"
    },
    "ResultsLimit": {
    "description": "Results data page size",
    "type": "number",
    "minimum": 1,
    "maximum": 200,
    "default": 10,
    "example": 10
    },
    "HugeResultsLimit": {
    "description": "Results data page size",
    "type": "number",
    "minimum": 1,
    "maximum": 1000,
    "default": 1000,
    "example": 100
    },
    "ListApiResponse": {
    "description": "List API response",
    "type": "object",
    "properties": {
    "_links": {
    "type": "object",
    "properties": {
    "self": {
    "$ref": "#/components/schemas/ListApiResponseNavLink"
    },
    "prev": {
    "$ref": "#/components/schemas/ListApiResponseNavLink"
    },
    "next": {
    "$ref": "#/components/schemas/ListApiResponseNavLink"
    }
    }
    },
    "_embedded": {
    "type": "object",
    "properties": {
    "records": {
    "type": "array"
    }
    }
    }
    }
    },
    "ListApiResponseNavLink": {
    "type": "object",
    "properties": {
    "href": {
    "type": "string"
    }
    }
    },
    "DirectoryEntry": {
    "description": "Directory entry info",
    "type": "object",
    "properties": {
    "address": {
    "description": "Account address",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "paging_token": {
    "description": "Cursor value for results paging",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "name": {
    "description": "Entry friendly name",
    "type": "string"
    },
    "tags": {
    "description": "Entry friendly name",
    "type": "array",
    "uniqueItems": true,
    "items": {
    "type": "string"
    }
    },
    "domain": {
    "description": "Domain associated with entry if any",
    "type": "string"
    }
    },
    "required": [
    "address",
    "paging_token",
    "name",
    "tags"
    ]
    },
    "DirectoryTagDescription": {
    "description": "Directory tag descriptor",
    "required": [
    "name",
    "description"
    ],
    "type": "object",
    "properties": {
    "name": {
    "description": "Tag name",
    "type": "string",
    "example": "exchange"
    },
    "description": {
    "description": "User-friendly tag description",
    "type": "string",
    "example": "Centralized exchange account"
    }
    }
    },
    "PaymentEntry": {
    "description": "Payment info",
    "type": "object",
    "properties": {
    "id": {
    "description": "Operation unique id",
    "type": "string",
    "example": 86172183717662720
    },
    "paging_token": {
    "description": "Paging token",
    "type": "string",
    "example": 86172183717662720
    },
    "optype": {
    "description": "Operation type",
    "type": "integer"
    },
    "ledger": {
    "description": "Ledger containing the payment operation",
    "type": "integer",
    "example": 1640731
    },
    "tx_id": {
    "description": "Transaction unique id",
    "type": "string",
    "example": 86172183717662720
    },
    "ts": {
    "description": "Operation timestamp",
    "type": "string",
    "format": "date-time",
    "example": "2018-09-19T12:23:16.000Z"
    },
    "from": {
    "description": "Source account",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "source_asset": {
    "description": "Source asset",
    "$ref": "#/components/schemas/Asset"
    },
    "source_amount": {
    "description": "Source amount",
    "$ref": "#/components/schemas/Amount"
    },
    "to": {
    "description": "Destination account",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "asset": {
    "description": "Destination asset",
    "$ref": "#/components/schemas/Asset"
    },
    "amount": {
    "description": "Destination amount",
    "$ref": "#/components/schemas/Amount"
    }
    }
    },
    "AssetInfo": {
    "description": "General asset info",
    "type": "object",
    "properties": {
    "asset": {
    "description": "Asset identifier",
    "$ref": "#/components/schemas/Asset"
    },
    "traded_amount": {
    "description": "Total traded amount (in stroops)",
    "type": "number"
    },
    "payments_amount": {
    "description": "Total payments amount (in stroops)",
    "type": "number"
    },
    "created": {
    "description": "Timestamp of the first recorder operation with asset",
    "$ref": "#/components/schemas/UnixTime"
    },
    "supply": {
    "description": "Total issued asset supply",
    "type": "number"
    },
    "trustlines": {
    "description": "Trustlines established to an asset",
    "type": "object",
    "properties": {
    "total": {
    "description": "Total number of trustlines",
    "type": "integer"
    },
    "authorized": {
    "description": "Trustlines authorized by the issuer",
    "type": "integer"
    },
    "funded": {
    "description": "Trustlines with non-zero balance",
    "type": "integer"
    }
    }
    },
    "trades": {
    "description": "Total number of trades",
    "type": "number"
    },
    "payments": {
    "description": "Total number of payments",
    "type": "number"
    },
    "domain": {
    "description": "Associated home_domain",
    "type": "string"
    },
    "tomlInfo": {
    "description": "Asset information from stellar.toml file",
    "type": "object"
    },
    "rating": {
    "description": "Composite asset rating",
    "$ref": "#/components/schemas/AssetRating",
    "type": "object"
    },
    "paging_token": {
    "description": "Paging token",
    "type": "number"
    }
    }
    },
    "AssetRating": {
    "description": "Asset rating info",
    "type": "object",
    "properties": {
    "asset": {
    "$ref": "#/components/schemas/Asset"
    },
    "rating": {
    "type": "object",
    "properties": {
    "age": {
    "type": "integer"
    },
    "trages": {
    "type": "integer"
    },
    "payments": {
    "type": "integer"
    },
    "trustlines": {
    "type": "integer"
    },
    "volume7d": {
    "type": "integer"
    },
    "interop": {
    "type": "integer"
    },
    "liqidity": {
    "type": "integer"
    },
    "average": {
    "type": "integer"
    }
    }
    }
    }
    },
    "AssetHolder": {
    "description": "Asset holder description",
    "type": "object",
    "properties": {
    "account": {
    "description": "Account address",
    "$ref": "#/components/schemas/AccountAddress"
    },
    "balance": {
    "description": "Asset balance in stroops",
    "type": "string"
    },
    "paging_token": {
    "description": "Paging token",
    "type": "string"
    }
    }
    },
    "LedgerTimestampSequenceInfo": {
    "description": "Ledger sequence-timestamp pair",
    "type": "object",
    "properties": {
    "sequence": {
    "description": "Ledger sequence",
    "type": "integer"
    },
    "timestamp": {
    "description": "Ledger UNIX timestamp",
    "$ref": "#/components/schemas/UnixTime"
    },
    "date": {
    "description": "Ledger date",
    "type": "string",
    "format": "date-time"
    }
    },
    "example": {
    "sequence": 42431435,
    "timestamp": 1661781078,
    "date": "2022-08-29T13:51:18.000Z"
    }
    }
    }
    },
    "tags": [
    {
    "name": "Directory API"
    },
    {
    "name": "Asset Info API"
    }
    ]
    }{
    "info": {
    "name": "DBM Transparency Portal API",
    "description": "REST endpoints to securely consume SAAODB, NCA, SARO, and LGSF records.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
    {
    "key": "baseUrl",
    "value": "http://localhost:4000",
    "type": "string"
    },
    {
    "key": "apiKey",
    "value": "dbm_live_your_actual_api_key_here",
    "type": "string"
    }
    ],
    "item": [
    {
    "name": "Get SAAODB Records",
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-API-Key",
    "value": "{{apiKey}}",
    "type": "text"
    }
    ],
    "url": {
    "raw": "{{baseUrl}}/api/v1/records/saaodb?reportYear=2026&period=FY&class=PS&sheetScope=summary&page=1&limit=100",
    "host": [
    "{{baseUrl}}"
    ],
    "path": [
    "api",
    "v1",
    "records",
    "saaodb"
    ],
    "query": [
    {
    "key": "reportYear",
    "value": "2026",
    "description": "Filter by report year"
    },
    {
    "key": "period",
    "value": "FY",
    "description": "Filter by period (Q1-Q4, FY)"
    },
    {
    "key": "class",
    "value": "PS",
    "description": "Filter by expense class (PS, MOOE, FINEX, CO)"
    },
    {
    "key": "sheetScope",
    "value": "summary",
    "description": "Filter by sheet scope (summary, agency, sucs)"
    },
    {
    "key": "entityName",
    "value": "Agriculture",
    "description": "Filter by entity name (partial match)"
    },
    {
    "key": "page",
    "value": "1",
    "description": "Page number"
    },
    {
    "key": "limit",
    "value": "100",
    "description": "Page size limit (max 1000)"
    }
    ]
    }
    }
    },
    {
    "name": "Get SAAODB Dashboard Summary",
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-API-Key",
    "value": "{{apiKey}}",
    "type": "text"
    }
    ],
    "url": {
    "raw": "{{baseUrl}}/api/v1/records/saaodb/dashboard?reportYear=2026&sheetScope=summary",
    "host": [
    "{{baseUrl}}"
    ],
    "path": [
    "api",
    "v1",
    "records",
    "saaodb",
    "dashboard"
    ],
    "query": [
    {
    "key": "reportYear",
    "value": "2026",
    "description": "Filter by fiscal report year"
    },
    {
    "key": "sheetScope",
    "value": "summary",
    "description": "Dashboard scope (summary, agency, sucs)"
    }
    ]
    }
    }
    },
    {
    "name": "Get SAAODB Hierarchical Entities",
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-API-Key",
    "value": "{{apiKey}}",
    "type": "text"
    }
    ],
    "url": {
    "raw": "{{baseUrl}}/api/v1/records/saaodb/entities?reportYear=2026&sheetScope=agency&expandParent=Department of Finance",
    "host": [
    "{{baseUrl}}"
    ],
    "path": [
    "api",
    "v1",
    "records",
    "saaodb",
    "entities"
    ],
    "query": [
    {
    "key": "reportYear",
    "value": "2026",
    "description": "Filter by fiscal report year"
    },
    {
    "key": "sheetScope",
    "value": "agency",
    "description": "Dashboard scope (agency, sucs)"
    },
    {
    "key": "expandParent",
    "value": "Department of Finance",
    "description": "Department name to get child agencies"
    },
    {
    "key": "expandEntity",
    "value": "",
    "disabled": true,
    "description": "Agency name to get fund sources"
    },
    {
    "key": "expandEntityParent",
    "value": "",
    "disabled": true,
    "description": "Disambiguating parent department name"
    }
    ]
    }
    }
    },
    {
    "name": "Get NCA Records",
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-API-Key",
    "value": "{{apiKey}}",
    "type": "text"
    }
    ],
    "url": {
    "raw": "{{baseUrl}}/api/v1/records/nca?budgetYear=2026&deptCode=010000000000&page=1&limit=100",
    "host": [
    "{{baseUrl}}"
    ],
    "path": [
    "api",
    "v1",
    "records",
    "nca"
    ],
    "query": [
    {
    "key": "budgetYear",
    "value": "2026",
    "description": "Filter by budget year"
    },
    {
    "key": "deptCode",
    "value": "010000000000",
    "description": "Filter by UACS department code"
    },
    {
    "key": "agencyCode",
    "value": "010010000000",
    "description": "Filter by UACS agency code"
    },
    {
    "key": "operatingUnitCode",
    "value": "010010000001",
    "description": "Filter by operating unit code"
    },
    {
    "key": "expenseClass",
    "value": "5020000000",
    "description": "Filter by expense class"
    },
    {
    "key": "page",
    "value": "1",
    "description": "Page number"
    },
    {
    "key": "limit",
    "value": "100",
    "description": "Page size limit"
    }
    ]
    }
    }
    },
    {
    "name": "Get SARO Records",
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-API-Key",
    "value": "{{apiKey}}",
    "type": "text"
    }
    ],
    "url": {
    "raw": "{{baseUrl}}/api/v1/records/saro?saroNo=SARO-BMB-A-26-0000001&page=1&limit=100",
    "host": [
    "{{baseUrl}}"
    ],
    "path": [
    "api",
    "v1",
    "records",
    "saro"
    ],
    "query": [
    {
    "key": "saroNo",
    "value": "SARO-BMB-A-26-0000001",
    "description": "Filter by exact SARO number"
    },
    {
    "key": "deptCode",
    "value": "010000000000",
    "description": "Filter by UACS department code"
    },
    {
    "key": "agencyCode",
    "value": "010010000000",
    "description": "Filter by UACS agency code"
    },
    {
    "key": "expenseClass",
    "value": "5020000000",
    "description": "Filter by UACS expense class"
    },
    {
    "key": "page",
    "value": "1",
    "description": "Page number"
    },
    {
    "key": "limit",
    "value": "100",
    "description": "Page size limit"
    }
    ]
    }
    }
    },
    {
    "name": "Get LGSF Records",
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-API-Key",
    "value": "{{apiKey}}",
    "type": "text"
    }
    ],
    "url": {
    "raw": "{{baseUrl}}/api/v1/records/lgsf?fiscalYear=2026&programCode=FALGU&page=1&limit=100",
    "host": [
    "{{baseUrl}}"
    ],
    "path": [
    "api",
    "v1",
    "records",
    "lgsf"
    ],
    "query": [
    {
    "key": "fiscalYear",
    "value": "2026",
    "description": "Filter by program budget year"
    },
    {
    "key": "programCode",
    "value": "FALGU",
    "description": "Filter by LGSF program (FALGU, GEF, GGG, SBDP, SAFPB)"
    },
    {
    "key": "regionCode",
    "value": "PH030000000",
    "description": "Filter by region UACS/geo code"
    },
    {
    "key": "province",
    "value": "Bulacan",
    "description": "Filter by province name"
    },
    {
    "key": "cityMunicipality",
    "value": "Malolos",
    "description": "Filter by city/municipality name"
    },
    {
    "key": "page",
    "value": "1",
    "description": "Page number"
    },
    {
    "key": "limit",
    "value": "100",
    "description": "Page size limit"
    }
    ]
    }
    }
    },
    {
    "name": "Get LGSF Dashboard Summary",
    "request": {
    "method": "GET",
    "header": [
    {
    "key": "X-API-Key",
    "value": "{{apiKey}}",
    "type": "text"
    }
    ],
    "url": {
    "raw": "{{baseUrl}}/api/v1/records/lgsf/dashboard?programCode=FALGU&reportYear=2026&region=Region III&province=Bulacan&municipality=Malolos&page=1&limit=25",
    "host": [
    "{{baseUrl}}"
    ],
    "path": [
    "api",
    "v1",
    "records",
    "lgsf",
    "dashboard"
    ],
    "query": [
    {
    "key": "programCode",
    "value": "FALGU",
    "description": "LGSF program: FALGU, GEF, GGG, SBDP, SAFPB"
    },
    {
    "key": "reportYear",
    "value": "2026",
    "description": "Filter KPIs by fiscal year (optional)"
    },
    {
    "key": "region",
    "value": "Region III",
    "description": "Filter by region GADM canonical name"
    },
    {
    "key": "province",
    "value": "Bulacan",
    "description": "Filter by province name"
    },
    {
    "key": "municipality",
    "value": "Malolos",
    "description": "Filter by city/municipality name"
    },
    {
    "key": "page",
    "value": "1",
    "description": "Projects list page number"
    },
    {
    "key": "limit",
    "value": "25",
    "description": "Projects list page size limit (max 200)"
    }
    ]
    }
    }
    }
    ]
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions