Skip to content

Commit

Permalink
DOC -- Query Interaction Template by POST search request (#1392)
Browse files Browse the repository at this point in the history
* DOC -- Query Interaction Template by cadence hash

* DOC -- Interaction Templates queryable by POST search

* DOC -- Use base64 cadence

* DOC -- Use base64 cadence

* DOC -- Use base64 cadence
  • Loading branch information
JeffreyDoyle authored Sep 1, 2022
1 parent 2987287 commit b4b3a0e
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/reference/interaction-templates.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,20 @@ Flow operates an "Interaction Template Discovery Service" which wallets can use
const cadence = cadenceFromTransactionToSign
const network = "mainnet" // "mainnet" | "testnet"

const cadenceBase64 = btoa(cadence)
const cadence_base64 = btoa(cadence)

const interactionTemplate = await fetch(
`https://flix.flow.com/v1/templates?network=${network}&cadence=${cadenceBase64}`
"https://flix.flow.com/v1/templates/search",
{
method: "POST",
headers: {
"Content-Type": "application/json"
}
body: JSON.stringify({
cadence_base64,
network
})
}
)
```

Expand Down

0 comments on commit b4b3a0e

Please sign in to comment.