@onflow/sdk
Advanced tools
Comparing version 1.1.1-templates.4 to 1.1.1-templates.5
# @onflow/sdk | ||
## 1.1.1-templates.5 | ||
### Patch Changes | ||
- Adds InteractionTemplateUtils and resolver | ||
## 1.1.1-templates.4 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@onflow/sdk", | ||
"version": "1.1.1-templates.4", | ||
"version": "1.1.1-templates.5", | ||
"description": "Flow SDK", | ||
@@ -51,4 +51,5 @@ "license": "Apache-2.0", | ||
"deepmerge": "^4.2.2", | ||
"node-fetch": "^2.6.7", | ||
"sha3": "^2.1.4" | ||
} | ||
} |
import {isTransaction, isScript, get, put, pipe} from "../interaction/interaction.js" | ||
import {invariant} from "@onflow/util-invariant" | ||
import {config} from "@onflow/config" | ||
import {retrieve} from "../document/document.js" | ||
const isFn = v => typeof v === "function" | ||
const isString = v => typeof v === "string" | ||
export async function resolveTemplate(ix) { | ||
@@ -13,7 +11,4 @@ if (isTransaction(ix) || isScript(ix)) { | ||
// TODO: Support proper template resolvers | ||
if (typeof template === "string") { | ||
template = await fetch(template) | ||
.then(res => res.json()) | ||
.catch(e => null) | ||
template = await retrieve({ url: template }) | ||
} | ||
@@ -20,0 +15,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
2064905
23188
0
12
+ Addednode-fetch@^2.6.7