{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Intent Inspector","siteUrl":"https://opensource.ripple.com/","meta":[{"name":"google-site-verification","content":"bLwyBi1imklcIuQxZ7JeI_kRF5Mg7yfr6arpEQV2nsE"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]},"description":"Resume polling or waiting on a custodian governance intent by id, after its original submission has already returned."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"intent-inspector","__idx":0},"children":["Intent Inspector"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/ripple/simpleXRPL/blob/95b977b15f8950c5bc076b25165217869c0b06d3/src/client/intent-inspector.ts#L36"},"children":["[Source]"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client.intent"]}," is a read-only view of custodian governance intents the SDK previously created. Use it to pick an intent back up by ID after its original submission has already returned. For example when a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submitAndWait"]}," times out with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentPendingError"]},", or an async submission's handle wasn't retained."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK is a proposer and observer only. It never approves, rejects, or configures policy; those actions happen in the custodian."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Note"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Only connectors that expose governance intents by ID are observable here (currently only ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/connectors/ripple-custody"},"children":["Ripple Custody"]},"). Palisade transactions are wallet-scoped and can't be addressed by an intent ID alone; observe those through the handle returned at submission (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["poll()"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["wait()"]},") instead."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every operation on this page throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SimpleXRPLError"]}," if no configured connector can observe intents."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"two-layers-of-asynchrony","__idx":1},"children":["Two layers of asynchrony"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A governed write settles in two stages, and they complete at different times:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Stage"},"children":["Stage"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Reached when"},"children":["Reached when"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Observe with"},"children":["Observe with"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Governance intent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The custodian's policy approves it (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Executed"]},")."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#await"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["await()"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["XRPL transaction"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The transaction is confirmed on-ledger."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#awaitonchain"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["awaitOnChain()"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both are needed to know that funds or state changes have fully landed. An approved intent has not necessarily reached the ledger yet."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"status","__idx":2},"children":["status()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A non-blocking snapshot of an intent's current state. Read ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response.state"]}," for the custodian's own status value."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"signature","__idx":3},"children":["Signature"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"client.intent.status(intentId: string): Promise<SubmissionResult>\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":4},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The intent ID returned at submission."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"await","__idx":5},"children":["await()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Resume blocking on an intent until it reaches a terminal state."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"signature-1","__idx":6},"children":["Signature"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"client.intent.await(intentId: string, timeoutMs?: number): Promise<SubmissionResult>\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-1","__idx":7},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The intent ID returned at submission."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timeoutMs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How long to wait before giving up. Defaults to the connector's own timeout."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentValidationError"]}," if the intent is rejected, expired, or failed, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentPendingError"]}," if the timeout elapses while it is still pending."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"awaitonchain","__idx":8},"children":["awaitOnChain()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Poll until the XRPL transaction linked to the intent is confirmed on-ledger, then return its outcome. This covers the second stage that ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#await"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["await()"]}]}," does not."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Resolves to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["undefined"]}," if the timeout elapses. Requires a Ripple Custody signer; throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SimpleXRPLError"]}," otherwise."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"signature-2","__idx":9},"children":["Signature"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"client.intent.awaitOnChain(intentId: string, timeoutMs?: number): Promise<OnChainResult | undefined>\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-2","__idx":10},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The intent ID returned at submission."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timeoutMs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How long to poll before giving up. Defaults to the connector's own timeout."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns","__idx":11},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/types#onchainresult"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OnChainResult"]}]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["undefined"]}," on timeout."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OnChainResult"]}," reports a transaction that reached the ledger."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["txHash"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The XRPL transaction hash."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mptIssuanceId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(optional)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Present only when the transaction created an MPT issuance."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"handlefor","__idx":12},"children":["handleFor()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Build a submission handle over an intent by ID, equivalent to the one its original submission returned. Use this when you want the handle's own ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["poll()"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["wait()"]}," rather than the shorthands above."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"signature-3","__idx":13},"children":["Signature"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"client.intent.handleFor(intentId: string): SubmissionHandle\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-3","__idx":14},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The intent ID to observe."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-1","__idx":15},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/types#submissionhandle"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubmissionHandle"]}]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubmissionHandle"]}," lets you poll or wait for a terminal state without holding the original request open."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kind"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CustodianKind"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The connector kind that owns the underlying intent or transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The custodian-native id (an intent id), or the XRPL transaction hash for local signing."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["custodian"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Custodian"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The connector that produced this handle."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["poll"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() => Promise<SubmissionResult>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A non-blocking snapshot of the current state."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["wait"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(timeoutMs?: number) => Promise<SubmissionResult>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Block until terminal state or the timeout (defaults to the connector's)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() => Promise<void>"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(optional)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancel the pending intent, where the backend supports it."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example","__idx":16},"children":["Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Recover from a submission that timed out awaiting approval, then confirm the transaction actually landed."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"import { IntentPendingError, RippleCustody, SimpleXRPL } from 'simplexrpl'\n\nconst custody = await RippleCustody.fromEnv({\n  primary: process.env.RIPPLE_CUSTODY_PRIMARY ?? '',\n})\nconst client = await SimpleXRPL.init({\n  xrpldUrl: 'wss://s.altnet.rippletest.net:51233', // XRPL Testnet\n  signers: [custody],\n})\n\nlet intentId: string | undefined\ntry {\n  const result = await client.iou.issue({ ticker: 'USD' })\n  intentId = result.intentId\n} catch (error) {\n  // Policy approval outlived the submission call — keep the id and come back to it.\n  if (!(error instanceof IntentPendingError)) throw error\n  intentId = error.intentId\n}\n\nif (intentId !== undefined) {\n  // Where does it stand right now, without blocking?\n  const snapshot = await client.intent.status(intentId)\n  console.log('intent source:', snapshot.source)\n\n  // Stage 1: block until policy approves (or the intent is rejected).\n  await client.intent.await(intentId, 120_000)\n\n  // Stage 2: approval is not confirmation — wait for the ledger.\n  const onChain = await client.intent.awaitOnChain(intentId, 60_000)\n  console.log(onChain ? `confirmed: ${onChain.txHash}` : 'not yet on-ledger')\n}\n\nawait client.disconnect()\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"see-also","__idx":17},"children":["See Also"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/client"},"children":["Client"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client.intent"]}," and the other client members"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/connectors/ripple-custody"},"children":["Ripple Custody"]}," — the connector whose intents are observable"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/errors"},"children":["Errors"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentPendingError"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentValidationError"]}]}]}]},"headings":[{"value":"Intent Inspector","id":"intent-inspector","depth":1},{"value":"Two layers of asynchrony","id":"two-layers-of-asynchrony","depth":2},{"value":"status()","id":"status","depth":2},{"value":"Signature","id":"signature","depth":3},{"value":"Parameters","id":"parameters","depth":3},{"value":"await()","id":"await","depth":2},{"value":"Signature","id":"signature-1","depth":3},{"value":"Parameters","id":"parameters-1","depth":3},{"value":"awaitOnChain()","id":"awaitonchain","depth":2},{"value":"Signature","id":"signature-2","depth":3},{"value":"Parameters","id":"parameters-2","depth":3},{"value":"Returns","id":"returns","depth":3},{"value":"handleFor()","id":"handlefor","depth":2},{"value":"Signature","id":"signature-3","depth":3},{"value":"Parameters","id":"parameters-3","depth":3},{"value":"Returns","id":"returns-1","depth":3},{"value":"Example","id":"example","depth":2},{"value":"See Also","id":"see-also","depth":2}],"frontmatter":{"seo":{"description":"Resume polling or waiting on a custodian governance intent by id, after its original submission has already returned.","title":"Intent Inspector"},"labels":["simpleXRPL","SDK"]},"editPage":{"to":"https://github.com/ripple/opensource.ripple.com/tree/main/docs/simpleXRPL/references/intent-inspector.md"},"lastModified":"2026-08-26T19:04:06.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/simplexrpl/references/intent-inspector","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}