Read what the test helpers accept
/ sandbox/ test-helpers/ optionsIt answers
404environment_not_sandboxagainst 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_assetanddustare listed with what each means and which helpers take it. Withuda_id, each preset that applies to a UDA deposit carriesfactsexpanded 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,factsisnull, 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. Auda_idthe environment does not hold answers404resource_missing, and one that is not a UUID422parameter_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
409environment_provisioning, which clears on its own, so a client retries it shortly. While a reset of the sandbox is running, the read answers409environment_resetting.
Parameters
Query
- uda_idstring <uuid>optional
The deposit address to expand every preset's
factsfor. Omitted, everyfactsisnull.
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 descriptionShow less
It is required under a person's session, exactly as
EnvironmentHeaderdescribes: a session request that omits it answers400withenvironment required, and one naming an environment the caller holds no membership of answers404.An API key names its own environment, so a request made with one omits this header. A key request that sends it answers
400withenvironment 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
POSTthat 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 answers429.
- limitinteger <int32>required
The deposit addresses a UDA deposit may name. With
uda_id, only that one.- idstring <uuid>required
The address's identifier, the
uda_ida 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_routeslists 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
bridgelever may be stated for exactly these; stating one for any other payment is refused with422, because that payment settles on its own chain.Every asset of every network in
network_idsthat 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 descriptionShow less
A deposit in any other asset is simulated and recorded by Stridge, which settles none of it; a
settlementorbridgestated for one answers422withasset not accepted by the uda.
- idstring <uuid>required
- 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
0xand 40 hex, Tron base58 beginningT, Bitcoin bech32, Solana base58. What the network's simulation can be made to do.
- idobjectrequired
What a request's
presetnames. The list is the contract'sTestHelperPresetId, 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.kindnames them: an open set, so a client skips a kind it does not know. The preset expanded for the UDA
uda_idnames: thenetwork_id,assetandamountto send.Show full descriptionShow less
nullwhen nouda_idwas stated, for a preset that does not apply to a UDA deposit, and where the address leaves nothing to express it with, such aswrong_networkon an address payable on every simulated network.
- idobjectrequired
- settlement_outcomesarray<string>required
The values a UDA deposit's
settlementmay take, in the order the contract lists them.
Show 4 more fieldsShow fewer fields
- bridge_outcomesarray<string>required
The values a UDA deposit's
bridgemay take, in the order the contract lists them. - payout_outcomesarray<string>required
The values a simulated payout's
outcomemay 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 descriptionShow less
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.
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 403membership_suspendedMembership suspended
- 404environment_not_foundEnvironment not found
- 404environment_not_sandboxNot a sandbox environment
- 404resource_missingNo such object
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 429rate_limitedToo many requests