anchor

suspend fun anchor(operationKind: String, chainId: String, payload: JsonElement, feeStrategy: FeeStrategy = FeeStrategy.DomainPays, maxFee: TokenAmount? = null, mediaType: String = "application/json"): AnchorResult

Anchor payload on chainId paid for by this domain's treasury (by default). Returns the AnchorResult from the underlying plugin; the fee actually charged is reflected on the result and in the treasury ledger.

Throws

if policy / balance / caller-cap rejects the operation before submission

if the plugin fails after submission; in that case the reservation is cancelled (no charge) before the exception is rethrown