Read what the test helpers accept

GET/sandbox/test-helpers/options
  • It answers 404 environment_not_sandbox against a live environment.

    There is nothing to simulate there.

    Return everything a test helper call may name in this sandbox: the deposit addresses and vaults to aim at, the simulated networks with the assets each carries and the levers each has, the presets, the values every lever takes, the event types a simulation can cause, and how much of the environment's simulation budget is left. A client builds its form from this, and a test builds its request from it rather than from constants that drift.

  • Presets are facts, served here.

    underpaid, overpaid, wrong_network, wrong_asset and dust are listed with what each means and which helpers take it. With uda_id, each preset that applies to a UDA deposit carries facts expanded for that address: a smaller or larger amount than it usually receives, a network it is not payable on, an asset it does not accept, an amount below the dust threshold. A deposit on a network the address is not payable on, or in an asset it does not accept, is detected and never settled. Without it, facts is null, because there is no address to expand them for. A helper request then states those facts, and names the preset so the simulation records it. A uda_id the environment does not hold answers 404 resource_missing, and one that is not a UUID 422 parameter_invalid.

    Reading this spends nothing from the budget. While the sandbox is still being provisioned, before it is ready for its first call, the read answers 409 environment_provisioning, which clears on its own, so a client retries it shortly. While a reset of the sandbox is running, the read answers 409 environment_resetting.

Parameters

Query

  • uda_idstring <uuid>optional

    The deposit address to expand every preset's facts for. Omitted, every facts is null.

Headers

  • X-Stridge-Environmentstring <uuid>optional

    Which environment the request acts inside, on an operation a session and an API key both call. Learn more

    Show full description

    It is required under a person's session, exactly as EnvironmentHeader describes: a session request that omits it answers 400 with environment required, and one naming an environment the caller holds no membership of answers 404.

    An API key names its own environment, so a request made with one omits this header. A key request that sends it answers 400 with environment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.

Responses

Resolved.

  • How many helper calls the environment has left. Every helper POST that creates a simulation spends one, across every credential that acts in the environment; a replayed idempotent request spends nothing, because it does nothing.

    • limitinteger <int32>required

      How many simulations the environment may create per window.

    • window_sinteger <int32>required

      The window's length, in seconds.

    • remaininginteger <int32>required

      How many are left in the current window. At 0, a helper answers 429.

  • The deposit addresses a UDA deposit may name. With uda_id, only that one.

    • idstring <uuid>required

      The address's identifier, the uda_id a UDA deposit names.

    • network_idsarray<string>required

      The simulated networks the address is payable on.

    • cross_chainbooleanrequired

      Whether any payment the address routes settles on another chain: whether cross_chain_routes lists anything.

    • Each payment the address routes that settles on another chain, by the network it is paid on and the asset it is paid in. A bridge lever may be stated for exactly these; stating one for any other payment is refused with 422, because that payment settles on its own chain.

    • Every asset of every network in network_ids that Stridge settles a deposit to the address in, spelled out even where the address accepts every asset, so an empty list never means all.

      Show full description

      A deposit in any other asset is simulated and recorded by Stridge, which settles none of it; a settlement or bridge stated for one answers 422 with asset not accepted by the uda.

    • idstring <uuid>required
    • labelstringrequired

      What the vault is called.

    • network_idstringrequired
    • namestringrequired
    • familystringrequiredenum evm · tvm · utxo · svm

      Which chain family a network belongs to. It decides which family member a transaction carries and what an address looks like: EVM 0x and 40 hex, Tron base58 beginning T, Bitcoin bech32, Solana base58.

    • What the network's simulation can be made to do.

    • idobjectrequired

      What a request's preset names. The list is the contract's TestHelperPresetId, versioned with it: adding a preset is compatible, removing or renaming one is breaking.

    • labelstringrequired
    • descriptionstringrequired
    • applies_toarray<string>required

      The helper kinds whose requests may name it, as Simulation.kind names them: an open set, so a client skips a kind it does not know.

    • The preset expanded for the UDA uda_id names: the network_id, asset and amount to send.

      Show full description

      null when no uda_id was stated, for a preset that does not apply to a UDA deposit, and where the address leaves nothing to express it with, such as wrong_network on an address payable on every simulated network.

  • settlement_outcomesarray<string>required

    The values a UDA deposit's settlement may take, in the order the contract lists them.

Show 4 more fields
  • bridge_outcomesarray<string>required

    The values a UDA deposit's bridge may take, in the order the contract lists them.

  • payout_outcomesarray<string>required

    The values a simulated payout's outcome may take, in the order the contract lists them.

  • event_typesarray<string>required

    The webhook event types a simulation can cause here, a subset of the webhook event types this reference documents.

  • How fast this sandbox plays a simulation out, from Stridge's own settings, so a client can say how long a simulation takes rather than hold the sandbox's pacing as constants. Every duration is in milliseconds.

    Show full description

    A live environment paces none of this: its chains keep their own block times.

    • Each simulated network's pace, one per entry of networks.

    • settlement_retry_interval_msintegerrequired

      How often a failed settlement is retried.

    • settlement_retry_min_age_msintegerrequired

      How long a failed settlement waits before a retry may pick it up.

    • settlement_max_retriesintegerrequired

      How many retries a settlement gets before it fails for good.

    • bridge_poll_interval_msintegerrequired

      How often Stridge looks for a bridged settlement's arrival on its destination chain.

    • non_settling_grace_msintegerrequired

      How long a recorded deposit waits for a settlement before the simulation reads it as one Stridge does not settle, such as a payment on a network the address is not payable on.

    • unrecorded_grace_msintegerrequired

      How long a sent deposit waits for Stridge to record it before the simulation reads it as one Stridge does not record, such as dust.

Errors

The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.

Request
curl "https://api.stridge.com/v2/sandbox/test-helpers/options" \
  -H "Authorization: Bearer $STRIDGE_SECRET_KEY"

Set your secret key as STRIDGE_SECRET_KEY (sent as Authorization: Bearer).

Response200
"limit": 30,
"window_s": 60,
"remaining": 30
},
"id": "2d94e610-8f37-4c5b-a1e0-6b73f2905c48",
"8453",
"1"
],
"cross_chain": true,
"network_id": "8453",
"native": true
}
}
],
"network_id": "8453",
"native": true
}
}
]
}
],
"id": "7c1e0a94-31d6-4a52-9f83-2b4c5d6e7f80",
"label": "Operating"
}
],
"network_id": "8453",
"name": "Base",
"family": "evm",
"symbol": "USDC",
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"decimals": 6
}
],
"deposit": false,
"success",
"fail",
"hold"
],
"bridge": false
}
}
],
"id": "string",
"label": "Underpaid",
"description": "Less than the address usually receives, in an asset it accepts.",
"uda_deposit"
],
"network_id": "8453",
"native": true
},
"amount": "1000000"
}
}
],
"success",
"fail",
"retry_then_success"
],
"complete",
"fail",
"refund",
"pending"
],
"success",
"fail",
"hold"
],
"deposit.confirmed",
"payout.confirmed"
],
"network_id": "8453",
"block_time_ms": 1000,
"observable_blocks": 2,
"confirmation_blocks": 2,
"confirmation_delay_ms": 2000
}
],
"settlement_retry_interval_ms": 5000,
"settlement_retry_min_age_ms": 5000,
"settlement_max_retries": 3,
"bridge_poll_interval_ms": 2000,
"non_settling_grace_ms": 10000,
"unrecorded_grace_ms": 120000
}
}