@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 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 = {