@provable-games/metagame-sdk 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/merkle.cjs +10 -0
- package/dist/merkle.cjs.map +1 -1
- package/dist/merkle.d.cts +2 -0
- package/dist/merkle.d.ts +2 -0
- package/dist/merkle.js +10 -0
- package/dist/merkle.js.map +1 -1
- package/dist/react.cjs +25 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +11 -1
- package/dist/react.d.ts +11 -1
- package/dist/react.js +25 -1
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1186,6 +1186,16 @@ var MerkleClient = class {
|
|
|
1186
1186
|
return empty;
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
|
+
/** Fetch a single merkle tree by ID. */
|
|
1190
|
+
async getTree(treeId) {
|
|
1191
|
+
try {
|
|
1192
|
+
const res = await fetch(`${this.apiUrl}/trees/${treeId}`);
|
|
1193
|
+
if (!res.ok) return null;
|
|
1194
|
+
return await res.json();
|
|
1195
|
+
} catch {
|
|
1196
|
+
return null;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1189
1199
|
/** Fetch entries for a specific merkle tree. */
|
|
1190
1200
|
async getTreeEntries(treeId, options) {
|
|
1191
1201
|
const empty = {
|