emblem-vault-sdk 2.9.2 → 2.10.0
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/bundle.js +58 -3
- package/dist/evm-operations.js +7 -2
- package/dist/index.js +51 -1
- package/docs/bundle.js +58 -3
- package/package.json +2 -2
- package/readme.md +32 -0
- package/src/evm-operations.ts +7 -2
- package/src/index.ts +54 -1
- package/types/index.d.ts +21 -1
package/dist/bundle.js
CHANGED
|
@@ -792374,8 +792374,13 @@ function requestRemoteMintSignature(ctx, tokenId, signature, chainId) {
|
|
|
792374
792374
|
signature,
|
|
792375
792375
|
chainId: chainId.toString(),
|
|
792376
792376
|
});
|
|
792377
|
-
|
|
792378
|
-
|
|
792377
|
+
// Handle both 'error' and 'err' fields (API inconsistency)
|
|
792378
|
+
const errorMsg = remoteMintResponse.error || remoteMintResponse.err;
|
|
792379
|
+
if (errorMsg) {
|
|
792380
|
+
const message = typeof errorMsg === 'string'
|
|
792381
|
+
? errorMsg
|
|
792382
|
+
: errorMsg.msg || errorMsg.message || JSON.stringify(errorMsg);
|
|
792383
|
+
throw new Error(message);
|
|
792379
792384
|
}
|
|
792380
792385
|
return remoteMintResponse;
|
|
792381
792386
|
});
|
|
@@ -792715,15 +792720,65 @@ class EmblemVaultSDK {
|
|
|
792715
792720
|
return (balance === null || balance === void 0 ? void 0 : balance.balances) || [];
|
|
792716
792721
|
});
|
|
792717
792722
|
}
|
|
792718
|
-
|
|
792723
|
+
/**
|
|
792724
|
+
* Fetch vaults of a specific type for an address.
|
|
792725
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
792726
|
+
* @param address - The wallet address to fetch vaults for
|
|
792727
|
+
* @param options - Optional pagination options
|
|
792728
|
+
* @param options.page - Page number (1-indexed). If provided, returns paginated response.
|
|
792729
|
+
* @param options.limit - Number of results per page (default: 100)
|
|
792730
|
+
* @returns Array of vaults (unpaginated) or { data, pagination } object (paginated)
|
|
792731
|
+
*/
|
|
792732
|
+
fetchVaultsOfType(vaultType, address, options) {
|
|
792719
792733
|
return __awaiter(this, void 0, void 0, function* () {
|
|
792720
792734
|
(0, utils_1.genericGuard)(vaultType, "string", "vaultType");
|
|
792721
792735
|
(0, utils_1.genericGuard)(address, "string", "address");
|
|
792722
792736
|
let url = `${this.baseUrl}/myvaults/${address}?vaultType=${vaultType}`;
|
|
792737
|
+
// Add pagination params if provided
|
|
792738
|
+
if ((options === null || options === void 0 ? void 0 : options.page) !== undefined || (options === null || options === void 0 ? void 0 : options.limit) !== undefined) {
|
|
792739
|
+
if (options.page !== undefined)
|
|
792740
|
+
url += `&page=${options.page}`;
|
|
792741
|
+
if (options.limit !== undefined)
|
|
792742
|
+
url += `&limit=${options.limit}`;
|
|
792743
|
+
}
|
|
792723
792744
|
let vaults = yield (0, utils_1.fetchData)(url, this.apiKey);
|
|
792724
792745
|
return vaults;
|
|
792725
792746
|
});
|
|
792726
792747
|
}
|
|
792748
|
+
/**
|
|
792749
|
+
* Fetch all vaults of a specific type, automatically handling pagination.
|
|
792750
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
792751
|
+
* @param address - The wallet address to fetch vaults for
|
|
792752
|
+
* @param onProgress - Optional callback for progress updates (page, totalPages, total)
|
|
792753
|
+
* @returns Array of all vaults
|
|
792754
|
+
*/
|
|
792755
|
+
fetchAllVaultsOfType(vaultType, address, onProgress) {
|
|
792756
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
792757
|
+
(0, utils_1.genericGuard)(vaultType, "string", "vaultType");
|
|
792758
|
+
(0, utils_1.genericGuard)(address, "string", "address");
|
|
792759
|
+
const allVaults = [];
|
|
792760
|
+
let page = 1;
|
|
792761
|
+
let totalPages = 1;
|
|
792762
|
+
const limit = 100;
|
|
792763
|
+
while (page <= totalPages) {
|
|
792764
|
+
const result = yield this.fetchVaultsOfType(vaultType, address, { page, limit });
|
|
792765
|
+
if (result.pagination) {
|
|
792766
|
+
// Paginated response
|
|
792767
|
+
allVaults.push(...result.data);
|
|
792768
|
+
totalPages = result.pagination.totalPages;
|
|
792769
|
+
if (onProgress) {
|
|
792770
|
+
onProgress(page, totalPages, result.pagination.total);
|
|
792771
|
+
}
|
|
792772
|
+
}
|
|
792773
|
+
else {
|
|
792774
|
+
// Legacy non-paginated response (shouldn't happen with updated API)
|
|
792775
|
+
return Array.isArray(result) ? result : [];
|
|
792776
|
+
}
|
|
792777
|
+
page++;
|
|
792778
|
+
}
|
|
792779
|
+
return allVaults;
|
|
792780
|
+
});
|
|
792781
|
+
}
|
|
792727
792782
|
generateJumpReport(address_1) {
|
|
792728
792783
|
return __awaiter(this, arguments, void 0, function* (address, hideUnMintable = false) {
|
|
792729
792784
|
let vaultType = "unclaimed";
|
package/dist/evm-operations.js
CHANGED
|
@@ -154,8 +154,13 @@ function requestRemoteMintSignature(ctx, tokenId, signature, chainId) {
|
|
|
154
154
|
signature,
|
|
155
155
|
chainId: chainId.toString(),
|
|
156
156
|
});
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
// Handle both 'error' and 'err' fields (API inconsistency)
|
|
158
|
+
const errorMsg = remoteMintResponse.error || remoteMintResponse.err;
|
|
159
|
+
if (errorMsg) {
|
|
160
|
+
const message = typeof errorMsg === 'string'
|
|
161
|
+
? errorMsg
|
|
162
|
+
: errorMsg.msg || errorMsg.message || JSON.stringify(errorMsg);
|
|
163
|
+
throw new Error(message);
|
|
159
164
|
}
|
|
160
165
|
return remoteMintResponse;
|
|
161
166
|
});
|
package/dist/index.js
CHANGED
|
@@ -194,15 +194,65 @@ class EmblemVaultSDK {
|
|
|
194
194
|
return (balance === null || balance === void 0 ? void 0 : balance.balances) || [];
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
|
|
197
|
+
/**
|
|
198
|
+
* Fetch vaults of a specific type for an address.
|
|
199
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
200
|
+
* @param address - The wallet address to fetch vaults for
|
|
201
|
+
* @param options - Optional pagination options
|
|
202
|
+
* @param options.page - Page number (1-indexed). If provided, returns paginated response.
|
|
203
|
+
* @param options.limit - Number of results per page (default: 100)
|
|
204
|
+
* @returns Array of vaults (unpaginated) or { data, pagination } object (paginated)
|
|
205
|
+
*/
|
|
206
|
+
fetchVaultsOfType(vaultType, address, options) {
|
|
198
207
|
return __awaiter(this, void 0, void 0, function* () {
|
|
199
208
|
(0, utils_1.genericGuard)(vaultType, "string", "vaultType");
|
|
200
209
|
(0, utils_1.genericGuard)(address, "string", "address");
|
|
201
210
|
let url = `${this.baseUrl}/myvaults/${address}?vaultType=${vaultType}`;
|
|
211
|
+
// Add pagination params if provided
|
|
212
|
+
if ((options === null || options === void 0 ? void 0 : options.page) !== undefined || (options === null || options === void 0 ? void 0 : options.limit) !== undefined) {
|
|
213
|
+
if (options.page !== undefined)
|
|
214
|
+
url += `&page=${options.page}`;
|
|
215
|
+
if (options.limit !== undefined)
|
|
216
|
+
url += `&limit=${options.limit}`;
|
|
217
|
+
}
|
|
202
218
|
let vaults = yield (0, utils_1.fetchData)(url, this.apiKey);
|
|
203
219
|
return vaults;
|
|
204
220
|
});
|
|
205
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Fetch all vaults of a specific type, automatically handling pagination.
|
|
224
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
225
|
+
* @param address - The wallet address to fetch vaults for
|
|
226
|
+
* @param onProgress - Optional callback for progress updates (page, totalPages, total)
|
|
227
|
+
* @returns Array of all vaults
|
|
228
|
+
*/
|
|
229
|
+
fetchAllVaultsOfType(vaultType, address, onProgress) {
|
|
230
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
+
(0, utils_1.genericGuard)(vaultType, "string", "vaultType");
|
|
232
|
+
(0, utils_1.genericGuard)(address, "string", "address");
|
|
233
|
+
const allVaults = [];
|
|
234
|
+
let page = 1;
|
|
235
|
+
let totalPages = 1;
|
|
236
|
+
const limit = 100;
|
|
237
|
+
while (page <= totalPages) {
|
|
238
|
+
const result = yield this.fetchVaultsOfType(vaultType, address, { page, limit });
|
|
239
|
+
if (result.pagination) {
|
|
240
|
+
// Paginated response
|
|
241
|
+
allVaults.push(...result.data);
|
|
242
|
+
totalPages = result.pagination.totalPages;
|
|
243
|
+
if (onProgress) {
|
|
244
|
+
onProgress(page, totalPages, result.pagination.total);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
// Legacy non-paginated response (shouldn't happen with updated API)
|
|
249
|
+
return Array.isArray(result) ? result : [];
|
|
250
|
+
}
|
|
251
|
+
page++;
|
|
252
|
+
}
|
|
253
|
+
return allVaults;
|
|
254
|
+
});
|
|
255
|
+
}
|
|
206
256
|
generateJumpReport(address_1) {
|
|
207
257
|
return __awaiter(this, arguments, void 0, function* (address, hideUnMintable = false) {
|
|
208
258
|
let vaultType = "unclaimed";
|
package/docs/bundle.js
CHANGED
|
@@ -792374,8 +792374,13 @@ function requestRemoteMintSignature(ctx, tokenId, signature, chainId) {
|
|
|
792374
792374
|
signature,
|
|
792375
792375
|
chainId: chainId.toString(),
|
|
792376
792376
|
});
|
|
792377
|
-
|
|
792378
|
-
|
|
792377
|
+
// Handle both 'error' and 'err' fields (API inconsistency)
|
|
792378
|
+
const errorMsg = remoteMintResponse.error || remoteMintResponse.err;
|
|
792379
|
+
if (errorMsg) {
|
|
792380
|
+
const message = typeof errorMsg === 'string'
|
|
792381
|
+
? errorMsg
|
|
792382
|
+
: errorMsg.msg || errorMsg.message || JSON.stringify(errorMsg);
|
|
792383
|
+
throw new Error(message);
|
|
792379
792384
|
}
|
|
792380
792385
|
return remoteMintResponse;
|
|
792381
792386
|
});
|
|
@@ -792715,15 +792720,65 @@ class EmblemVaultSDK {
|
|
|
792715
792720
|
return (balance === null || balance === void 0 ? void 0 : balance.balances) || [];
|
|
792716
792721
|
});
|
|
792717
792722
|
}
|
|
792718
|
-
|
|
792723
|
+
/**
|
|
792724
|
+
* Fetch vaults of a specific type for an address.
|
|
792725
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
792726
|
+
* @param address - The wallet address to fetch vaults for
|
|
792727
|
+
* @param options - Optional pagination options
|
|
792728
|
+
* @param options.page - Page number (1-indexed). If provided, returns paginated response.
|
|
792729
|
+
* @param options.limit - Number of results per page (default: 100)
|
|
792730
|
+
* @returns Array of vaults (unpaginated) or { data, pagination } object (paginated)
|
|
792731
|
+
*/
|
|
792732
|
+
fetchVaultsOfType(vaultType, address, options) {
|
|
792719
792733
|
return __awaiter(this, void 0, void 0, function* () {
|
|
792720
792734
|
(0, utils_1.genericGuard)(vaultType, "string", "vaultType");
|
|
792721
792735
|
(0, utils_1.genericGuard)(address, "string", "address");
|
|
792722
792736
|
let url = `${this.baseUrl}/myvaults/${address}?vaultType=${vaultType}`;
|
|
792737
|
+
// Add pagination params if provided
|
|
792738
|
+
if ((options === null || options === void 0 ? void 0 : options.page) !== undefined || (options === null || options === void 0 ? void 0 : options.limit) !== undefined) {
|
|
792739
|
+
if (options.page !== undefined)
|
|
792740
|
+
url += `&page=${options.page}`;
|
|
792741
|
+
if (options.limit !== undefined)
|
|
792742
|
+
url += `&limit=${options.limit}`;
|
|
792743
|
+
}
|
|
792723
792744
|
let vaults = yield (0, utils_1.fetchData)(url, this.apiKey);
|
|
792724
792745
|
return vaults;
|
|
792725
792746
|
});
|
|
792726
792747
|
}
|
|
792748
|
+
/**
|
|
792749
|
+
* Fetch all vaults of a specific type, automatically handling pagination.
|
|
792750
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
792751
|
+
* @param address - The wallet address to fetch vaults for
|
|
792752
|
+
* @param onProgress - Optional callback for progress updates (page, totalPages, total)
|
|
792753
|
+
* @returns Array of all vaults
|
|
792754
|
+
*/
|
|
792755
|
+
fetchAllVaultsOfType(vaultType, address, onProgress) {
|
|
792756
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
792757
|
+
(0, utils_1.genericGuard)(vaultType, "string", "vaultType");
|
|
792758
|
+
(0, utils_1.genericGuard)(address, "string", "address");
|
|
792759
|
+
const allVaults = [];
|
|
792760
|
+
let page = 1;
|
|
792761
|
+
let totalPages = 1;
|
|
792762
|
+
const limit = 100;
|
|
792763
|
+
while (page <= totalPages) {
|
|
792764
|
+
const result = yield this.fetchVaultsOfType(vaultType, address, { page, limit });
|
|
792765
|
+
if (result.pagination) {
|
|
792766
|
+
// Paginated response
|
|
792767
|
+
allVaults.push(...result.data);
|
|
792768
|
+
totalPages = result.pagination.totalPages;
|
|
792769
|
+
if (onProgress) {
|
|
792770
|
+
onProgress(page, totalPages, result.pagination.total);
|
|
792771
|
+
}
|
|
792772
|
+
}
|
|
792773
|
+
else {
|
|
792774
|
+
// Legacy non-paginated response (shouldn't happen with updated API)
|
|
792775
|
+
return Array.isArray(result) ? result : [];
|
|
792776
|
+
}
|
|
792777
|
+
page++;
|
|
792778
|
+
}
|
|
792779
|
+
return allVaults;
|
|
792780
|
+
});
|
|
792781
|
+
}
|
|
792727
792782
|
generateJumpReport(address_1) {
|
|
792728
792783
|
return __awaiter(this, arguments, void 0, function* (address, hideUnMintable = false) {
|
|
792729
792784
|
let vaultType = "unclaimed";
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -8,6 +8,7 @@ The Emblem Vault SDK is a JavaScript library that provides functionality for int
|
|
|
8
8
|
- [Fetching Curated Contracts](#fetching-curated-contracts)
|
|
9
9
|
- [Creating a Vault](#creating-a-vault)
|
|
10
10
|
- [Refreshing Vault Balance](#refreshing-vault-balance)
|
|
11
|
+
- [Fetching Vaults by Type](#fetching-vaults-by-type)
|
|
11
12
|
- [Validating Mintability](#validating-mintability)
|
|
12
13
|
- [Performing a Mint](#performing-a-mint)
|
|
13
14
|
- [Utility Functions](#utility-functions)
|
|
@@ -88,6 +89,37 @@ To refresh the balance of a vault, use the refreshBalance method:
|
|
|
88
89
|
```javascript
|
|
89
90
|
vaultBalance = await sdk.refreshBalance(vaultData.tokenId, updateLogCallback);
|
|
90
91
|
```
|
|
92
|
+
|
|
93
|
+
## Fetching Vaults by Type
|
|
94
|
+
To fetch vaults owned by an address, use the `fetchVaultsOfType` method:
|
|
95
|
+
|
|
96
|
+
```javascript
|
|
97
|
+
// Fetch all vaults (returns full array)
|
|
98
|
+
const vaults = await sdk.fetchVaultsOfType('created', '0xYourAddress');
|
|
99
|
+
|
|
100
|
+
// Vault types: "vaulted", "unvaulted", "created"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Pagination Support
|
|
104
|
+
For large collections, use pagination to fetch vaults in pages:
|
|
105
|
+
|
|
106
|
+
```javascript
|
|
107
|
+
// Fetch a specific page (returns { data, pagination } object)
|
|
108
|
+
const result = await sdk.fetchVaultsOfType('created', '0xYourAddress', { page: 1, limit: 100 });
|
|
109
|
+
|
|
110
|
+
console.log(result.data); // Array of vaults for this page
|
|
111
|
+
console.log(result.pagination); // { page: 1, limit: 100, total: 500, totalPages: 5 }
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Fetching All Vaults with Progress
|
|
115
|
+
To automatically fetch all pages with progress tracking:
|
|
116
|
+
|
|
117
|
+
```javascript
|
|
118
|
+
const allVaults = await sdk.fetchAllVaultsOfType('created', '0xYourAddress', (page, totalPages, total) => {
|
|
119
|
+
console.log(`Fetched page ${page}/${totalPages} (${total} total vaults)`);
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
91
123
|
## Validating Mintability
|
|
92
124
|
To validate if a vault is mintable, use the allowed method of the curated contract object:
|
|
93
125
|
|
package/src/evm-operations.ts
CHANGED
|
@@ -183,8 +183,13 @@ async function requestRemoteMintSignature(
|
|
|
183
183
|
}
|
|
184
184
|
);
|
|
185
185
|
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
// Handle both 'error' and 'err' fields (API inconsistency)
|
|
187
|
+
const errorMsg = remoteMintResponse.error || remoteMintResponse.err;
|
|
188
|
+
if (errorMsg) {
|
|
189
|
+
const message = typeof errorMsg === 'string'
|
|
190
|
+
? errorMsg
|
|
191
|
+
: errorMsg.msg || errorMsg.message || JSON.stringify(errorMsg);
|
|
192
|
+
throw new Error(message);
|
|
188
193
|
}
|
|
189
194
|
|
|
190
195
|
return remoteMintResponse as RemoteMintSignature;
|
package/src/index.ts
CHANGED
|
@@ -160,14 +160,67 @@ class EmblemVaultSDK {
|
|
|
160
160
|
return balance?.balances || [];
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
/**
|
|
164
|
+
* Fetch vaults of a specific type for an address.
|
|
165
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
166
|
+
* @param address - The wallet address to fetch vaults for
|
|
167
|
+
* @param options - Optional pagination options
|
|
168
|
+
* @param options.page - Page number (1-indexed). If provided, returns paginated response.
|
|
169
|
+
* @param options.limit - Number of results per page (default: 100)
|
|
170
|
+
* @returns Array of vaults (unpaginated) or { data, pagination } object (paginated)
|
|
171
|
+
*/
|
|
172
|
+
async fetchVaultsOfType(vaultType: string, address: string, options?: { page?: number; limit?: number }): Promise<any> {
|
|
164
173
|
genericGuard(vaultType, "string", "vaultType");
|
|
165
174
|
genericGuard(address, "string", "address");
|
|
166
175
|
let url = `${this.baseUrl}/myvaults/${address}?vaultType=${vaultType}`;
|
|
176
|
+
|
|
177
|
+
// Add pagination params if provided
|
|
178
|
+
if (options?.page !== undefined || options?.limit !== undefined) {
|
|
179
|
+
if (options.page !== undefined) url += `&page=${options.page}`;
|
|
180
|
+
if (options.limit !== undefined) url += `&limit=${options.limit}`;
|
|
181
|
+
}
|
|
182
|
+
|
|
167
183
|
let vaults = await fetchData(url, this.apiKey);
|
|
168
184
|
return vaults;
|
|
169
185
|
}
|
|
170
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Fetch all vaults of a specific type, automatically handling pagination.
|
|
189
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
190
|
+
* @param address - The wallet address to fetch vaults for
|
|
191
|
+
* @param onProgress - Optional callback for progress updates (page, totalPages, total)
|
|
192
|
+
* @returns Array of all vaults
|
|
193
|
+
*/
|
|
194
|
+
async fetchAllVaultsOfType(vaultType: string, address: string, onProgress?: (page: number, totalPages: number, total: number) => void): Promise<any[]> {
|
|
195
|
+
genericGuard(vaultType, "string", "vaultType");
|
|
196
|
+
genericGuard(address, "string", "address");
|
|
197
|
+
|
|
198
|
+
const allVaults: any[] = [];
|
|
199
|
+
let page = 1;
|
|
200
|
+
let totalPages = 1;
|
|
201
|
+
const limit = 100;
|
|
202
|
+
|
|
203
|
+
while (page <= totalPages) {
|
|
204
|
+
const result = await this.fetchVaultsOfType(vaultType, address, { page, limit });
|
|
205
|
+
|
|
206
|
+
if (result.pagination) {
|
|
207
|
+
// Paginated response
|
|
208
|
+
allVaults.push(...result.data);
|
|
209
|
+
totalPages = result.pagination.totalPages;
|
|
210
|
+
if (onProgress) {
|
|
211
|
+
onProgress(page, totalPages, result.pagination.total);
|
|
212
|
+
}
|
|
213
|
+
} else {
|
|
214
|
+
// Legacy non-paginated response (shouldn't happen with updated API)
|
|
215
|
+
return Array.isArray(result) ? result : [];
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
page++;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return allVaults;
|
|
222
|
+
}
|
|
223
|
+
|
|
171
224
|
async generateJumpReport(address: string, hideUnMintable: boolean = false) {
|
|
172
225
|
let vaultType = "unclaimed"
|
|
173
226
|
let curated = await this.fetchCuratedContracts();
|
package/types/index.d.ts
CHANGED
|
@@ -20,7 +20,27 @@ declare class EmblemVaultSDK {
|
|
|
20
20
|
refreshOwnershipForAccount(account: string, callback?: any): Promise<Ownership[]>;
|
|
21
21
|
fetchMetadata(tokenId: string, callback?: any): Promise<MetaData>;
|
|
22
22
|
refreshBalance(tokenId: string, callback?: any): Promise<MetaData>;
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Fetch vaults of a specific type for an address.
|
|
25
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
26
|
+
* @param address - The wallet address to fetch vaults for
|
|
27
|
+
* @param options - Optional pagination options
|
|
28
|
+
* @param options.page - Page number (1-indexed). If provided, returns paginated response.
|
|
29
|
+
* @param options.limit - Number of results per page (default: 100)
|
|
30
|
+
* @returns Array of vaults (unpaginated) or { data, pagination } object (paginated)
|
|
31
|
+
*/
|
|
32
|
+
fetchVaultsOfType(vaultType: string, address: string, options?: {
|
|
33
|
+
page?: number;
|
|
34
|
+
limit?: number;
|
|
35
|
+
}): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* Fetch all vaults of a specific type, automatically handling pagination.
|
|
38
|
+
* @param vaultType - The vault type: "vaulted", "unvaulted", or "created"
|
|
39
|
+
* @param address - The wallet address to fetch vaults for
|
|
40
|
+
* @param onProgress - Optional callback for progress updates (page, totalPages, total)
|
|
41
|
+
* @returns Array of all vaults
|
|
42
|
+
*/
|
|
43
|
+
fetchAllVaultsOfType(vaultType: string, address: string, onProgress?: (page: number, totalPages: number, total: number) => void): Promise<any[]>;
|
|
24
44
|
generateJumpReport(address: string, hideUnMintable?: boolean): Promise<unknown>;
|
|
25
45
|
generateMintReport(address: string, hideUnMintable?: boolean): Promise<unknown>;
|
|
26
46
|
generateMigrateReport(address: string, hideUnMintable?: boolean): Promise<unknown>;
|