anymal-protocol 1.0.123 → 1.0.125

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.d.mts CHANGED
@@ -1,3 +1,6 @@
1
+ import * as _coinbase_cdp_hooks from '@coinbase/cdp-hooks';
2
+ import * as _coinbase_cdp_api_client from '@coinbase/cdp-api-client';
3
+ import * as abitype from 'abitype';
1
4
  import { BundlerClient } from 'viem/account-abstraction';
2
5
  import { ec } from 'elliptic';
3
6
 
@@ -50,6 +53,367 @@ declare function useUpdateUserName(): (dbAuthToken: string, docID: string, name:
50
53
  */
51
54
  declare function useFetchNotifications(): (pid: string, dbAuthToken: string, endpoint: string, additionalFilters?: Record<string, any>) => Promise<any>;
52
55
 
56
+ declare function useSendCoinbaseUserOperation(): {
57
+ sendOperationFn: (evmAddress: `0x${string}`, callData: any, contractAddress: `0x${string}`) => Promise<{
58
+ success: boolean;
59
+ message: string;
60
+ }>;
61
+ data: _coinbase_cdp_api_client.EvmUserOperation | undefined;
62
+ status: _coinbase_cdp_hooks.Status;
63
+ error: Error | undefined;
64
+ };
65
+
66
+ declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string, nftId: string, anymalTxId: string, validationContractAddress: `0x${string}`) => Promise<{
67
+ success: boolean;
68
+ message: string;
69
+ status: string;
70
+ }>;
71
+
72
+ declare const PET_NFT_ABI: ({
73
+ inputs: never[];
74
+ stateMutability: string;
75
+ type: string;
76
+ name?: undefined;
77
+ anonymous?: undefined;
78
+ outputs?: undefined;
79
+ } | {
80
+ inputs: {
81
+ internalType: string;
82
+ name: string;
83
+ type: string;
84
+ }[];
85
+ name: string;
86
+ type: string;
87
+ stateMutability?: undefined;
88
+ anonymous?: undefined;
89
+ outputs?: undefined;
90
+ } | {
91
+ anonymous: boolean;
92
+ inputs: {
93
+ indexed: boolean;
94
+ internalType: string;
95
+ name: string;
96
+ type: string;
97
+ }[];
98
+ name: string;
99
+ type: string;
100
+ stateMutability?: undefined;
101
+ outputs?: undefined;
102
+ } | {
103
+ inputs: {
104
+ internalType: string;
105
+ name: string;
106
+ type: string;
107
+ }[];
108
+ name: string;
109
+ outputs: {
110
+ internalType: string;
111
+ name: string;
112
+ type: string;
113
+ }[];
114
+ stateMutability: string;
115
+ type: string;
116
+ anonymous?: undefined;
117
+ })[];
118
+ declare const MARKETPLACE_ABI: ({
119
+ inputs: {
120
+ internalType: string;
121
+ name: string;
122
+ type: string;
123
+ }[];
124
+ name: string;
125
+ type: string;
126
+ anonymous?: undefined;
127
+ outputs?: undefined;
128
+ stateMutability?: undefined;
129
+ } | {
130
+ anonymous: boolean;
131
+ inputs: {
132
+ indexed: boolean;
133
+ internalType: string;
134
+ name: string;
135
+ type: string;
136
+ }[];
137
+ name: string;
138
+ type: string;
139
+ outputs?: undefined;
140
+ stateMutability?: undefined;
141
+ } | {
142
+ inputs: {
143
+ internalType: string;
144
+ name: string;
145
+ type: string;
146
+ }[];
147
+ name: string;
148
+ outputs: {
149
+ internalType: string;
150
+ name: string;
151
+ type: string;
152
+ }[];
153
+ stateMutability: string;
154
+ type: string;
155
+ anonymous?: undefined;
156
+ })[];
157
+ declare const ORGANIZATION_BEACON_ABI: ({
158
+ inputs: {
159
+ internalType: string;
160
+ name: string;
161
+ type: string;
162
+ }[];
163
+ stateMutability: string;
164
+ type: string;
165
+ name?: undefined;
166
+ anonymous?: undefined;
167
+ outputs?: undefined;
168
+ } | {
169
+ inputs: {
170
+ internalType: string;
171
+ name: string;
172
+ type: string;
173
+ }[];
174
+ name: string;
175
+ type: string;
176
+ stateMutability?: undefined;
177
+ anonymous?: undefined;
178
+ outputs?: undefined;
179
+ } | {
180
+ anonymous: boolean;
181
+ inputs: {
182
+ indexed: boolean;
183
+ internalType: string;
184
+ name: string;
185
+ type: string;
186
+ }[];
187
+ name: string;
188
+ type: string;
189
+ stateMutability?: undefined;
190
+ outputs?: undefined;
191
+ } | {
192
+ inputs: {
193
+ internalType: string;
194
+ name: string;
195
+ type: string;
196
+ }[];
197
+ name: string;
198
+ outputs: {
199
+ internalType: string;
200
+ name: string;
201
+ type: string;
202
+ }[];
203
+ stateMutability: string;
204
+ type: string;
205
+ anonymous?: undefined;
206
+ })[];
207
+ declare const REWARDABLE_ACTIONS_ABI: ({
208
+ inputs: never[];
209
+ stateMutability: string;
210
+ type: string;
211
+ name?: undefined;
212
+ anonymous?: undefined;
213
+ outputs?: undefined;
214
+ } | {
215
+ inputs: {
216
+ internalType: string;
217
+ name: string;
218
+ type: string;
219
+ }[];
220
+ name: string;
221
+ type: string;
222
+ stateMutability?: undefined;
223
+ anonymous?: undefined;
224
+ outputs?: undefined;
225
+ } | {
226
+ anonymous: boolean;
227
+ inputs: {
228
+ indexed: boolean;
229
+ internalType: string;
230
+ name: string;
231
+ type: string;
232
+ }[];
233
+ name: string;
234
+ type: string;
235
+ stateMutability?: undefined;
236
+ outputs?: undefined;
237
+ } | {
238
+ inputs: {
239
+ internalType: string;
240
+ name: string;
241
+ type: string;
242
+ }[];
243
+ name: string;
244
+ outputs: {
245
+ internalType: string;
246
+ name: string;
247
+ type: string;
248
+ }[];
249
+ stateMutability: string;
250
+ type: string;
251
+ anonymous?: undefined;
252
+ })[];
253
+ declare const ORGANIZATION_IMPL_ABI: ({
254
+ inputs: never[];
255
+ stateMutability: string;
256
+ type: string;
257
+ name?: undefined;
258
+ anonymous?: undefined;
259
+ outputs?: undefined;
260
+ } | {
261
+ inputs: {
262
+ internalType: string;
263
+ name: string;
264
+ type: string;
265
+ }[];
266
+ name: string;
267
+ type: string;
268
+ stateMutability?: undefined;
269
+ anonymous?: undefined;
270
+ outputs?: undefined;
271
+ } | {
272
+ anonymous: boolean;
273
+ inputs: {
274
+ indexed: boolean;
275
+ internalType: string;
276
+ name: string;
277
+ type: string;
278
+ }[];
279
+ name: string;
280
+ type: string;
281
+ stateMutability?: undefined;
282
+ outputs?: undefined;
283
+ } | {
284
+ inputs: {
285
+ internalType: string;
286
+ name: string;
287
+ type: string;
288
+ }[];
289
+ name: string;
290
+ outputs: {
291
+ internalType: string;
292
+ name: string;
293
+ type: string;
294
+ }[];
295
+ stateMutability: string;
296
+ type: string;
297
+ anonymous?: undefined;
298
+ })[];
299
+ declare const KIBBLE_TOKEN_ABI: ({
300
+ inputs: never[];
301
+ stateMutability: string;
302
+ type: string;
303
+ name?: undefined;
304
+ anonymous?: undefined;
305
+ outputs?: undefined;
306
+ } | {
307
+ inputs: {
308
+ internalType: string;
309
+ name: string;
310
+ type: string;
311
+ }[];
312
+ name: string;
313
+ type: string;
314
+ stateMutability?: undefined;
315
+ anonymous?: undefined;
316
+ outputs?: undefined;
317
+ } | {
318
+ anonymous: boolean;
319
+ inputs: {
320
+ indexed: boolean;
321
+ internalType: string;
322
+ name: string;
323
+ type: string;
324
+ }[];
325
+ name: string;
326
+ type: string;
327
+ stateMutability?: undefined;
328
+ outputs?: undefined;
329
+ } | {
330
+ inputs: {
331
+ internalType: string;
332
+ name: string;
333
+ type: string;
334
+ }[];
335
+ name: string;
336
+ outputs: {
337
+ internalType: string;
338
+ name: string;
339
+ type: string;
340
+ }[];
341
+ stateMutability: string;
342
+ type: string;
343
+ anonymous?: undefined;
344
+ } | {
345
+ inputs: {
346
+ internalType: string;
347
+ name: string;
348
+ type: string;
349
+ }[];
350
+ name: string;
351
+ outputs: {
352
+ components: {
353
+ internalType: string;
354
+ name: string;
355
+ type: string;
356
+ }[];
357
+ internalType: string;
358
+ name: string;
359
+ type: string;
360
+ }[];
361
+ stateMutability: string;
362
+ type: string;
363
+ anonymous?: undefined;
364
+ })[];
365
+ declare const ERROR_ABI: ({
366
+ inputs: {
367
+ internalType: string;
368
+ name: string;
369
+ type: string;
370
+ }[];
371
+ name: string;
372
+ type: string;
373
+ stateMutability?: undefined;
374
+ anonymous?: undefined;
375
+ outputs?: undefined;
376
+ } | {
377
+ anonymous: boolean;
378
+ inputs: {
379
+ indexed: boolean;
380
+ internalType: string;
381
+ name: string;
382
+ type: string;
383
+ }[];
384
+ name: string;
385
+ type: string;
386
+ stateMutability?: undefined;
387
+ outputs?: undefined;
388
+ } | {
389
+ inputs: {
390
+ internalType: string;
391
+ name: string;
392
+ type: string;
393
+ }[];
394
+ name: string;
395
+ outputs: {
396
+ internalType: string;
397
+ name: string;
398
+ type: string;
399
+ }[];
400
+ stateMutability: string;
401
+ type: string;
402
+ anonymous?: undefined;
403
+ } | {
404
+ inputs: {
405
+ internalType: string;
406
+ name: string;
407
+ type: string;
408
+ }[];
409
+ stateMutability: string;
410
+ type: string;
411
+ name?: undefined;
412
+ anonymous?: undefined;
413
+ outputs?: undefined;
414
+ } | abitype.Abi)[];
415
+ declare const ORG_FUNCTION = "executeCall";
416
+
53
417
  declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
54
418
  success: boolean;
55
419
  message: string;
@@ -64,25 +428,12 @@ interface AnymalNftMetadataInputData {
64
428
  nft_id: string;
65
429
  }
66
430
 
67
- declare function useAddAnymalToDatabase(): (dbAuthToken: string, endpoint: string, anymalData: CreateAnymalInputData) => Promise<{
68
- _docID: string | null;
69
- dbCid: string | null;
70
- success: boolean;
71
- message: string;
72
- }>;
73
-
74
- declare function useDeleteAnymalFromDatabase(): (dbAuthToken: string, endpoint: string, anymalDocID: string) => Promise<void>;
75
-
76
- declare function useSaveAnymalMetadata(): (userPid: string, anymalTxId: string, idToken: string, publicKey: string, nftMetadataInput: AnymalNftMetadataInputData, authServiceBaseUrl: string) => Promise<{
431
+ declare function useSaveAnymalMetadata(): (userPid: string, anymalTxId: string, idToken: string, nftMetadataInput: AnymalNftMetadataInputData, authServiceBaseUrl: string) => Promise<{
77
432
  success: boolean;
78
433
  message: any;
79
434
  }>;
80
435
 
81
- declare function useUpdateAnymalWithNFT(): (anymalPassportId: string, anymalDocId: string, dbAuthToken: string, endpoint: string) => Promise<{
82
- success: boolean;
83
- }>;
84
-
85
- declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken: string, publicKey: string, authServiceBaseUrl: string, petType: string, breed: string[], lifestage: string, anymalPid: string) => Promise<{
436
+ declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken: string, authServiceBaseUrl: string, petType: string, breed: string[], lifestage: string, anymalPid: string) => Promise<{
86
437
  success: boolean;
87
438
  message: string;
88
439
  url: null;
@@ -96,14 +447,6 @@ declare function useUploadAnymalImage(): (imageFile: File, type: string, idToken
96
447
  type: string;
97
448
  }>;
98
449
 
99
- declare function fetchAnymals({ dbAuthToken, endpoint, userPid, }: {
100
- dbAuthToken: string;
101
- endpoint: string;
102
- userPid: string;
103
- }): Promise<any>;
104
-
105
- declare function useFetchAnymals(): typeof fetchAnymals;
106
-
107
450
  declare function useProcessPartialKibblePayment(): (pid: string, nftId: string, orderId: string, dbAuthToken: string, marketplaceContract: string, smartAccount: any, bundlerClient: any, amountInTokens: bigint, maxTokenPayment: bigint, nonce: string, deadline: number, backendSignature: string) => Promise<{
108
451
  success: boolean;
109
452
  message: string;
@@ -507,4 +850,4 @@ declare function useSubmitContractAction(): (idToken: string, pid: string, sourc
507
850
  */
508
851
  declare function humanRevert(raw: `0x${string}` | undefined, shortMessage?: string): string;
509
852
 
510
- export { AUTH_API_ENDPOINTS, type ActionDefinition, type ActionPayload, type ActionRecord, type ActionReferral, ActionSourceType, ActionStatus, ActionType, type AnymalNftMetadataInputData, type AuthEnvelope, type ContractActionPayload, type CreateAnymalInputData, type ExternalActionPayload, FIREBASE_WEB_API_KEYS, FIREBASE_WEB_AUTH_API_ENDPOINTS, type GraphQLActionPayload, type JWTOptions, type MarketplaceActionPayload, MarketplacePaymentType, NETWORK_HOSTS, Network, type NotificationData, type NotificationEventData, type SubmitResponse, type WishlistPurchaseActionPayload, convertToActionDefinition, convertToActionRecord, convertToMultipleActionDefinitions, convertToMultipleActionRecords, createApp, createAuthEnvelope, fetchAnymals, flattenFirestoreData, generateAppSignature, generateBytes32Nonce, generateJWT, getFirebaseTokenForApp, humanRevert, loadExistingSecp256k1PrivateKey, processDirectKibbleApproval, processDirectPartialPayment, processOrgKibbleApproval, processOrgPartialPayment, sendUserOpWithRetries, serializePublicKeyCompressed, submitAction, useAddAnymalToDatabase, useApproveKibbleToken, useApproveOrgPartialPayment, useClaimActionReward, useClaimOrgActionReward, useCreateOrganizationAppData, useCreateOrganizationBase, useCreateUserAppData, useCreateWeb3Account, useDeleteAnymalFromDatabase, useFetchActionDefinitions, useFetchActions, useFetchAnymals, useFetchBalance, useFetchNotifications, useFetchUserData, useMintAnymalNFT, useMintOrgAnymalNFT, useProcessOrgPartialKibblePayment, useProcessPartialKibblePayment, useSaveAnymalMetadata, useSubmitContractAction, useUpdateAnymalWithNFT, useUpdateOrgWalletAddress, useUpdateUserAsVerified, useUpdateUserEmail, useUpdateUserName, useUpdateUserPid, useUploadAnymalImage, useVerifyAccount, useVerifyWeb3AuthSession, waitForAllowance, waitForReceiptWithRetries };
853
+ export { AUTH_API_ENDPOINTS, type ActionDefinition, type ActionPayload, type ActionRecord, type ActionReferral, ActionSourceType, ActionStatus, ActionType, type AnymalNftMetadataInputData, type AuthEnvelope, type ContractActionPayload, type CreateAnymalInputData, ERROR_ABI, type ExternalActionPayload, FIREBASE_WEB_API_KEYS, FIREBASE_WEB_AUTH_API_ENDPOINTS, type GraphQLActionPayload, type JWTOptions, KIBBLE_TOKEN_ABI, MARKETPLACE_ABI, type MarketplaceActionPayload, MarketplacePaymentType, NETWORK_HOSTS, Network, type NotificationData, type NotificationEventData, ORGANIZATION_BEACON_ABI, ORGANIZATION_IMPL_ABI, ORG_FUNCTION, PET_NFT_ABI, REWARDABLE_ACTIONS_ABI, type SubmitResponse, type WishlistPurchaseActionPayload, convertToActionDefinition, convertToActionRecord, convertToMultipleActionDefinitions, convertToMultipleActionRecords, createApp, createAuthEnvelope, flattenFirestoreData, generateAppSignature, generateBytes32Nonce, generateJWT, getFirebaseTokenForApp, humanRevert, loadExistingSecp256k1PrivateKey, processDirectKibbleApproval, processDirectPartialPayment, processOrgKibbleApproval, processOrgPartialPayment, sendUserOpWithRetries, serializePublicKeyCompressed, submitAction, useApproveKibbleToken, useApproveOrgPartialPayment, useClaimActionReward, useClaimOrgActionReward, useCoinbaseMintAnymalNFT, useCreateOrganizationAppData, useCreateOrganizationBase, useCreateUserAppData, useCreateWeb3Account, useFetchActionDefinitions, useFetchActions, useFetchBalance, useFetchNotifications, useFetchUserData, useMintAnymalNFT, useMintOrgAnymalNFT, useProcessOrgPartialKibblePayment, useProcessPartialKibblePayment, useSaveAnymalMetadata, useSendCoinbaseUserOperation, useSubmitContractAction, useUpdateOrgWalletAddress, useUpdateUserAsVerified, useUpdateUserEmail, useUpdateUserName, useUpdateUserPid, useUploadAnymalImage, useVerifyAccount, useVerifyWeb3AuthSession, waitForAllowance, waitForReceiptWithRetries };