anymal-protocol 1.0.147 → 1.0.148
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 +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +70 -36
- package/dist/index.mjs +69 -36
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -437,6 +437,12 @@ declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName
|
|
|
437
437
|
data: GetUserOperationResult | undefined;
|
|
438
438
|
}>;
|
|
439
439
|
|
|
440
|
+
declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, pid: string, nftId: string, anymalTxId: string, validationContractAddress: `0x${string}`) => Promise<{
|
|
441
|
+
success: boolean;
|
|
442
|
+
message: string;
|
|
443
|
+
status: string;
|
|
444
|
+
}>;
|
|
445
|
+
|
|
440
446
|
declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
|
|
441
447
|
success: boolean;
|
|
442
448
|
message: string;
|
|
@@ -873,4 +879,4 @@ declare function useSubmitContractAction(): (idToken: string, pid: string, sourc
|
|
|
873
879
|
*/
|
|
874
880
|
declare function humanRevert(raw: `0x${string}` | undefined, shortMessage?: string): string;
|
|
875
881
|
|
|
876
|
-
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, useCoinbaseClaimActionReward, useCoinbaseCreateOrganizationWallet, 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 };
|
|
882
|
+
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, useCoinbaseClaimActionReward, useCoinbaseCreateOrganizationWallet, useCoinbaseMintAnymalNFT, useCoinbaseMintOrgAnymalNFT, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -437,6 +437,12 @@ declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName
|
|
|
437
437
|
data: GetUserOperationResult | undefined;
|
|
438
438
|
}>;
|
|
439
439
|
|
|
440
|
+
declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, pid: string, nftId: string, anymalTxId: string, validationContractAddress: `0x${string}`) => Promise<{
|
|
441
|
+
success: boolean;
|
|
442
|
+
message: string;
|
|
443
|
+
status: string;
|
|
444
|
+
}>;
|
|
445
|
+
|
|
440
446
|
declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
|
|
441
447
|
success: boolean;
|
|
442
448
|
message: string;
|
|
@@ -873,4 +879,4 @@ declare function useSubmitContractAction(): (idToken: string, pid: string, sourc
|
|
|
873
879
|
*/
|
|
874
880
|
declare function humanRevert(raw: `0x${string}` | undefined, shortMessage?: string): string;
|
|
875
881
|
|
|
876
|
-
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, useCoinbaseClaimActionReward, useCoinbaseCreateOrganizationWallet, 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 };
|
|
882
|
+
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, useCoinbaseClaimActionReward, useCoinbaseCreateOrganizationWallet, useCoinbaseMintAnymalNFT, useCoinbaseMintOrgAnymalNFT, 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 };
|
package/dist/index.js
CHANGED
|
@@ -64,6 +64,7 @@ __export(index_exports, {
|
|
|
64
64
|
useCoinbaseClaimActionReward: () => useCoinbaseClaimActionReward,
|
|
65
65
|
useCoinbaseCreateOrganizationWallet: () => useCoinbaseCreateOrganizationWallet,
|
|
66
66
|
useCoinbaseMintAnymalNFT: () => useCoinbaseMintAnymalNFT,
|
|
67
|
+
useCoinbaseMintOrgAnymalNFT: () => useCoinbaseMintOrgAnymalNFT,
|
|
67
68
|
useCreateOrganizationAppData: () => useCreateOrganizationAppData,
|
|
68
69
|
useCreateOrganizationBase: () => useCreateOrganizationBase,
|
|
69
70
|
useCreateUserAppData: () => useCreateUserAppData,
|
|
@@ -3063,9 +3064,41 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
3063
3064
|
);
|
|
3064
3065
|
}
|
|
3065
3066
|
|
|
3067
|
+
// src/utils/coinbase/useCoinbaseMintOrgAnymalNFT.ts
|
|
3068
|
+
var import_react14 = require("react");
|
|
3069
|
+
function useCoinbaseMintOrgAnymalNFT() {
|
|
3070
|
+
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
3071
|
+
return (0, import_react14.useCallback)(
|
|
3072
|
+
async (evmAddress, pid, nftId, anymalTxId, validationContractAddress) => {
|
|
3073
|
+
if (!nftId || !pid || !validationContractAddress) {
|
|
3074
|
+
return {
|
|
3075
|
+
success: false,
|
|
3076
|
+
message: "Coinbase Mint NFT: Missing authentication token OR NFT ID.",
|
|
3077
|
+
status: "error"
|
|
3078
|
+
};
|
|
3079
|
+
}
|
|
3080
|
+
const result = await sendOperationFn(
|
|
3081
|
+
evmAddress,
|
|
3082
|
+
validationContractAddress,
|
|
3083
|
+
PET_NFT_ABI,
|
|
3084
|
+
"submitMetadataByCampaignName",
|
|
3085
|
+
[
|
|
3086
|
+
pid,
|
|
3087
|
+
nftId,
|
|
3088
|
+
`https://dev-nft.petastic.com/metadata/${nftId}`,
|
|
3089
|
+
"petastic-signup-campaign-1",
|
|
3090
|
+
anymalTxId
|
|
3091
|
+
]
|
|
3092
|
+
);
|
|
3093
|
+
return { ...result, status };
|
|
3094
|
+
},
|
|
3095
|
+
[sendOperationFn, status]
|
|
3096
|
+
);
|
|
3097
|
+
}
|
|
3098
|
+
|
|
3066
3099
|
// src/utils/anymals/useMintAnymalNFT.ts
|
|
3067
3100
|
var import_viem5 = require("viem");
|
|
3068
|
-
var
|
|
3101
|
+
var import_react15 = require("react");
|
|
3069
3102
|
|
|
3070
3103
|
// src/helpers/GasEstimateHelper.tsx
|
|
3071
3104
|
async function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
@@ -3146,7 +3179,7 @@ async function simulateCall(publicClient, target, abi, functionName, args, calle
|
|
|
3146
3179
|
|
|
3147
3180
|
// src/utils/anymals/useMintAnymalNFT.ts
|
|
3148
3181
|
function useMintAnymalNFT() {
|
|
3149
|
-
return (0,
|
|
3182
|
+
return (0, import_react15.useCallback)(
|
|
3150
3183
|
async (pid, nftId, anymalTxId, dbAuthToken, validationContractAddress, smartAccount, bundlerClient) => {
|
|
3151
3184
|
if (!dbAuthToken || !nftId || !bundlerClient || !smartAccount || !pid || !validationContractAddress) {
|
|
3152
3185
|
return {
|
|
@@ -3198,9 +3231,9 @@ function useMintAnymalNFT() {
|
|
|
3198
3231
|
}
|
|
3199
3232
|
|
|
3200
3233
|
// src/utils/anymals/useSaveAnymalMetadata.ts
|
|
3201
|
-
var
|
|
3234
|
+
var import_react16 = require("react");
|
|
3202
3235
|
function useSaveAnymalMetadata() {
|
|
3203
|
-
return (0,
|
|
3236
|
+
return (0, import_react16.useCallback)(
|
|
3204
3237
|
async (userPid, anymalTxId, idToken, nftMetadataInput, authServiceBaseUrl) => {
|
|
3205
3238
|
const response = await fetch(`${authServiceBaseUrl}/process-nft`, {
|
|
3206
3239
|
method: "POST",
|
|
@@ -3228,7 +3261,7 @@ function useSaveAnymalMetadata() {
|
|
|
3228
3261
|
}
|
|
3229
3262
|
|
|
3230
3263
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
3231
|
-
var
|
|
3264
|
+
var import_react17 = require("react");
|
|
3232
3265
|
|
|
3233
3266
|
// src/helpers/UploadImageHelper.tsx
|
|
3234
3267
|
function resizeImage(file, maxWidth = 800, maxHeight = 800, quality = 0.7) {
|
|
@@ -3285,7 +3318,7 @@ function toBase64(file) {
|
|
|
3285
3318
|
|
|
3286
3319
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
3287
3320
|
function useUploadAnymalImage() {
|
|
3288
|
-
return (0,
|
|
3321
|
+
return (0, import_react17.useCallback)(
|
|
3289
3322
|
async (imageFile, type, idToken, authServiceBaseUrl, petType, breed, lifestage, anymalPid) => {
|
|
3290
3323
|
if (!imageFile || !idToken) {
|
|
3291
3324
|
return {
|
|
@@ -3346,7 +3379,7 @@ function useUploadAnymalImage() {
|
|
|
3346
3379
|
}
|
|
3347
3380
|
|
|
3348
3381
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
3349
|
-
var
|
|
3382
|
+
var import_react18 = require("react");
|
|
3350
3383
|
|
|
3351
3384
|
// src/helpers/ProcessDirectPartialPayment.tsx
|
|
3352
3385
|
var import_viem6 = require("viem");
|
|
@@ -3446,7 +3479,7 @@ async function processDirectPartialPayment(marketplaceContract, smartAccount, bu
|
|
|
3446
3479
|
|
|
3447
3480
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
3448
3481
|
function useProcessPartialKibblePayment() {
|
|
3449
|
-
return (0,
|
|
3482
|
+
return (0, import_react18.useCallback)(
|
|
3450
3483
|
async (pid, nftId, orderId, dbAuthToken, marketplaceContract, smartAccount, bundlerClient, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
3451
3484
|
if (!orderId || !dbAuthToken || !nftId || !bundlerClient || !smartAccount || !pid || !marketplaceContract || !amountInTokens || !maxTokenPayment || !nonce || !deadline) {
|
|
3452
3485
|
return {
|
|
@@ -3502,7 +3535,7 @@ function useProcessPartialKibblePayment() {
|
|
|
3502
3535
|
}
|
|
3503
3536
|
|
|
3504
3537
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
3505
|
-
var
|
|
3538
|
+
var import_react19 = require("react");
|
|
3506
3539
|
|
|
3507
3540
|
// src/helpers/ProcessDirectKibbleApproval.tsx
|
|
3508
3541
|
var import_viem7 = require("viem");
|
|
@@ -3547,7 +3580,7 @@ async function processDirectKibbleApproval(kibbleTokenAddress, spenderAddress, s
|
|
|
3547
3580
|
|
|
3548
3581
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
3549
3582
|
function useApproveKibbleToken() {
|
|
3550
|
-
return (0,
|
|
3583
|
+
return (0, import_react19.useCallback)(
|
|
3551
3584
|
async (kibbleTokenAddress, marketplaceContract, amount, smartAccount, bundlerClient) => {
|
|
3552
3585
|
try {
|
|
3553
3586
|
const result = await processDirectKibbleApproval(
|
|
@@ -3574,10 +3607,10 @@ function useApproveKibbleToken() {
|
|
|
3574
3607
|
}
|
|
3575
3608
|
|
|
3576
3609
|
// src/utils/organization/useCreateOrganizationBase.ts
|
|
3577
|
-
var
|
|
3610
|
+
var import_react20 = require("react");
|
|
3578
3611
|
var import_viem8 = require("viem");
|
|
3579
3612
|
function useCreateOrganizationBase() {
|
|
3580
|
-
return (0,
|
|
3613
|
+
return (0, import_react20.useCallback)(
|
|
3581
3614
|
/**
|
|
3582
3615
|
* Creates a new organization on-chain.
|
|
3583
3616
|
*
|
|
@@ -3673,7 +3706,7 @@ function useCreateOrganizationBase() {
|
|
|
3673
3706
|
}
|
|
3674
3707
|
|
|
3675
3708
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
3676
|
-
var
|
|
3709
|
+
var import_react21 = require("react");
|
|
3677
3710
|
|
|
3678
3711
|
// src/helpers/ProcessOrgKibbleApproval.tsx
|
|
3679
3712
|
var import_viem10 = require("viem");
|
|
@@ -3771,7 +3804,7 @@ async function processOrgKibbleApproval(orgContractAddress, kibbleTokenAddress,
|
|
|
3771
3804
|
|
|
3772
3805
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
3773
3806
|
function useApproveOrgPartialPayment() {
|
|
3774
|
-
return (0,
|
|
3807
|
+
return (0, import_react21.useCallback)(
|
|
3775
3808
|
async (orgContractAddress, kibbleTokenAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, approveAmount) => {
|
|
3776
3809
|
if (!orgContractAddress || !kibbleTokenAddress || !partialPaymentModuleAddress || !managerSmartAccount || !bundlerClient || !approveAmount) {
|
|
3777
3810
|
return {
|
|
@@ -3803,7 +3836,7 @@ function useApproveOrgPartialPayment() {
|
|
|
3803
3836
|
}
|
|
3804
3837
|
|
|
3805
3838
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
3806
|
-
var
|
|
3839
|
+
var import_react22 = require("react");
|
|
3807
3840
|
|
|
3808
3841
|
// src/helpers/ProcessOrgPartialPayment.tsx
|
|
3809
3842
|
var import_viem11 = require("viem");
|
|
@@ -3861,7 +3894,7 @@ async function processOrgPartialPayment(orgContractAddress, partialPaymentModule
|
|
|
3861
3894
|
|
|
3862
3895
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
3863
3896
|
function useProcessOrgPartialKibblePayment() {
|
|
3864
|
-
return (0,
|
|
3897
|
+
return (0, import_react22.useCallback)(
|
|
3865
3898
|
async (orgContractAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, orderId, anymalNftId, pid, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
3866
3899
|
if (!orgContractAddress || !partialPaymentModuleAddress || !managerSmartAccount || !bundlerClient || !orderId || !pid || !nonce || !backendSignature) {
|
|
3867
3900
|
return {
|
|
@@ -3899,9 +3932,9 @@ function useProcessOrgPartialKibblePayment() {
|
|
|
3899
3932
|
}
|
|
3900
3933
|
|
|
3901
3934
|
// src/utils/organization/useUpdateOrgWalletAddress.ts
|
|
3902
|
-
var
|
|
3935
|
+
var import_react23 = require("react");
|
|
3903
3936
|
function useUpdateOrgWalletAddress() {
|
|
3904
|
-
return (0,
|
|
3937
|
+
return (0, import_react23.useCallback)(
|
|
3905
3938
|
async (dbAuthToken, docID, baseWalletAddress, endpoint) => {
|
|
3906
3939
|
try {
|
|
3907
3940
|
const mutation = `
|
|
@@ -3941,9 +3974,9 @@ function useUpdateOrgWalletAddress() {
|
|
|
3941
3974
|
|
|
3942
3975
|
// src/utils/organization/useMintOrgAnymalNFT.ts
|
|
3943
3976
|
var import_viem12 = require("viem");
|
|
3944
|
-
var
|
|
3977
|
+
var import_react24 = require("react");
|
|
3945
3978
|
function useMintOrgAnymalNFT() {
|
|
3946
|
-
return (0,
|
|
3979
|
+
return (0, import_react24.useCallback)(
|
|
3947
3980
|
async (orgContractAddress, pid, nftId, anymalTxId, dbAuthToken, validationContractAddress, managerSmartAccount, bundlerClient) => {
|
|
3948
3981
|
if (!dbAuthToken || !nftId || !bundlerClient || !managerSmartAccount || !pid || !validationContractAddress || !orgContractAddress) {
|
|
3949
3982
|
return {
|
|
@@ -4211,9 +4244,9 @@ async function submitAction(idToken, pid, sourceType, payload, endpointBaseUrl)
|
|
|
4211
4244
|
}
|
|
4212
4245
|
|
|
4213
4246
|
// src/utils/actions/useFetchActions.ts
|
|
4214
|
-
var
|
|
4247
|
+
var import_react25 = require("react");
|
|
4215
4248
|
function useFetchActions() {
|
|
4216
|
-
return (0,
|
|
4249
|
+
return (0, import_react25.useCallback)(
|
|
4217
4250
|
async (idToken, actionsServiceBaseUrl, pid, status, limit, offset) => {
|
|
4218
4251
|
const params = new URLSearchParams({ pid });
|
|
4219
4252
|
if (status) params.set("status", status);
|
|
@@ -4242,9 +4275,9 @@ function useFetchActions() {
|
|
|
4242
4275
|
}
|
|
4243
4276
|
|
|
4244
4277
|
// src/utils/actions/useFetchActionDefinitions.ts
|
|
4245
|
-
var
|
|
4278
|
+
var import_react26 = require("react");
|
|
4246
4279
|
function useFetchActionDefinitions() {
|
|
4247
|
-
return (0,
|
|
4280
|
+
return (0, import_react26.useCallback)(
|
|
4248
4281
|
async (idToken, actionsServiceBaseUrl) => {
|
|
4249
4282
|
try {
|
|
4250
4283
|
const response = await fetch(
|
|
@@ -4341,10 +4374,10 @@ var convertToMultipleActionRecords = (frs) => frs.map(convertToActionRecord);
|
|
|
4341
4374
|
var convertToMultipleActionDefinitions = (frs) => frs.map(convertToActionDefinition);
|
|
4342
4375
|
|
|
4343
4376
|
// src/utils/application/useCreateUserAppData.ts
|
|
4344
|
-
var
|
|
4377
|
+
var import_react27 = require("react");
|
|
4345
4378
|
var import_uuid2 = require("uuid");
|
|
4346
4379
|
function useCreateUserAppData() {
|
|
4347
|
-
return (0,
|
|
4380
|
+
return (0, import_react27.useCallback)(
|
|
4348
4381
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
4349
4382
|
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint) return;
|
|
4350
4383
|
const appValues = {
|
|
@@ -4399,10 +4432,10 @@ function useCreateUserAppData() {
|
|
|
4399
4432
|
}
|
|
4400
4433
|
|
|
4401
4434
|
// src/utils/application/useCreateOrganizationAppData.ts
|
|
4402
|
-
var
|
|
4435
|
+
var import_react28 = require("react");
|
|
4403
4436
|
var import_uuid3 = require("uuid");
|
|
4404
4437
|
function useCreateOrganizationAppData() {
|
|
4405
|
-
return (0,
|
|
4438
|
+
return (0, import_react28.useCallback)(
|
|
4406
4439
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
4407
4440
|
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint) return;
|
|
4408
4441
|
const appValues = {
|
|
@@ -4456,10 +4489,10 @@ function useCreateOrganizationAppData() {
|
|
|
4456
4489
|
}
|
|
4457
4490
|
|
|
4458
4491
|
// src/utils/balance/useFetchBalance.ts
|
|
4459
|
-
var
|
|
4492
|
+
var import_react29 = require("react");
|
|
4460
4493
|
var import_viem14 = require("viem");
|
|
4461
4494
|
function useFetchBalance() {
|
|
4462
|
-
return (0,
|
|
4495
|
+
return (0, import_react29.useCallback)(
|
|
4463
4496
|
async (publicClient, walletAddress, kibbleTokenAddress) => {
|
|
4464
4497
|
try {
|
|
4465
4498
|
const balance = await publicClient.readContract({
|
|
@@ -4479,9 +4512,9 @@ function useFetchBalance() {
|
|
|
4479
4512
|
|
|
4480
4513
|
// src/utils/actions/useClaimActionReward.ts
|
|
4481
4514
|
var import_viem15 = require("viem");
|
|
4482
|
-
var
|
|
4515
|
+
var import_react30 = require("react");
|
|
4483
4516
|
function useClaimActionReward() {
|
|
4484
|
-
return (0,
|
|
4517
|
+
return (0, import_react30.useCallback)(
|
|
4485
4518
|
async (actionId, claimIndex, rewardableActionContractAddress, smartAccount, bundlerClient) => {
|
|
4486
4519
|
if (!actionId || claimIndex === void 0 || !bundlerClient || !smartAccount || !rewardableActionContractAddress) {
|
|
4487
4520
|
return {
|
|
@@ -4528,9 +4561,9 @@ function useClaimActionReward() {
|
|
|
4528
4561
|
|
|
4529
4562
|
// src/utils/actions/useClaimOrgActionReward.ts
|
|
4530
4563
|
var import_viem16 = require("viem");
|
|
4531
|
-
var
|
|
4564
|
+
var import_react31 = require("react");
|
|
4532
4565
|
function useClaimOrgActionReward() {
|
|
4533
|
-
return (0,
|
|
4566
|
+
return (0, import_react31.useCallback)(
|
|
4534
4567
|
async (orgContractAddress, rewardableActionContractAddress, actionId, claimIndex, smartAccount, bundlerClient) => {
|
|
4535
4568
|
if (!orgContractAddress || !actionId || claimIndex === void 0 || !bundlerClient || !smartAccount) {
|
|
4536
4569
|
return {
|
|
@@ -4580,9 +4613,9 @@ function useClaimOrgActionReward() {
|
|
|
4580
4613
|
}
|
|
4581
4614
|
|
|
4582
4615
|
// src/utils/actions/useSubmitContractAction.ts
|
|
4583
|
-
var
|
|
4616
|
+
var import_react32 = require("react");
|
|
4584
4617
|
function useSubmitContractAction() {
|
|
4585
|
-
return (0,
|
|
4618
|
+
return (0, import_react32.useCallback)(
|
|
4586
4619
|
(idToken, pid, source, endpoint, payload) => {
|
|
4587
4620
|
if (!idToken || !pid || !source || !endpoint || !payload) return;
|
|
4588
4621
|
let sourceTypePayload = {};
|
|
@@ -4743,6 +4776,7 @@ function isMarketplacePurchaseAction(payload) {
|
|
|
4743
4776
|
useCoinbaseClaimActionReward,
|
|
4744
4777
|
useCoinbaseCreateOrganizationWallet,
|
|
4745
4778
|
useCoinbaseMintAnymalNFT,
|
|
4779
|
+
useCoinbaseMintOrgAnymalNFT,
|
|
4746
4780
|
useCreateOrganizationAppData,
|
|
4747
4781
|
useCreateOrganizationBase,
|
|
4748
4782
|
useCreateUserAppData,
|
package/dist/index.mjs
CHANGED
|
@@ -2984,9 +2984,41 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
2984
2984
|
);
|
|
2985
2985
|
}
|
|
2986
2986
|
|
|
2987
|
+
// src/utils/coinbase/useCoinbaseMintOrgAnymalNFT.ts
|
|
2988
|
+
import { useCallback as useCallback14 } from "react";
|
|
2989
|
+
function useCoinbaseMintOrgAnymalNFT() {
|
|
2990
|
+
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
2991
|
+
return useCallback14(
|
|
2992
|
+
async (evmAddress, pid, nftId, anymalTxId, validationContractAddress) => {
|
|
2993
|
+
if (!nftId || !pid || !validationContractAddress) {
|
|
2994
|
+
return {
|
|
2995
|
+
success: false,
|
|
2996
|
+
message: "Coinbase Mint NFT: Missing authentication token OR NFT ID.",
|
|
2997
|
+
status: "error"
|
|
2998
|
+
};
|
|
2999
|
+
}
|
|
3000
|
+
const result = await sendOperationFn(
|
|
3001
|
+
evmAddress,
|
|
3002
|
+
validationContractAddress,
|
|
3003
|
+
PET_NFT_ABI,
|
|
3004
|
+
"submitMetadataByCampaignName",
|
|
3005
|
+
[
|
|
3006
|
+
pid,
|
|
3007
|
+
nftId,
|
|
3008
|
+
`https://dev-nft.petastic.com/metadata/${nftId}`,
|
|
3009
|
+
"petastic-signup-campaign-1",
|
|
3010
|
+
anymalTxId
|
|
3011
|
+
]
|
|
3012
|
+
);
|
|
3013
|
+
return { ...result, status };
|
|
3014
|
+
},
|
|
3015
|
+
[sendOperationFn, status]
|
|
3016
|
+
);
|
|
3017
|
+
}
|
|
3018
|
+
|
|
2987
3019
|
// src/utils/anymals/useMintAnymalNFT.ts
|
|
2988
3020
|
import { encodeFunctionData as encodeFunctionData2 } from "viem";
|
|
2989
|
-
import { useCallback as
|
|
3021
|
+
import { useCallback as useCallback15 } from "react";
|
|
2990
3022
|
|
|
2991
3023
|
// src/helpers/GasEstimateHelper.tsx
|
|
2992
3024
|
async function applyBundlerGasEstimator(account, bundlerClient, options) {
|
|
@@ -3067,7 +3099,7 @@ async function simulateCall(publicClient, target, abi, functionName, args, calle
|
|
|
3067
3099
|
|
|
3068
3100
|
// src/utils/anymals/useMintAnymalNFT.ts
|
|
3069
3101
|
function useMintAnymalNFT() {
|
|
3070
|
-
return
|
|
3102
|
+
return useCallback15(
|
|
3071
3103
|
async (pid, nftId, anymalTxId, dbAuthToken, validationContractAddress, smartAccount, bundlerClient) => {
|
|
3072
3104
|
if (!dbAuthToken || !nftId || !bundlerClient || !smartAccount || !pid || !validationContractAddress) {
|
|
3073
3105
|
return {
|
|
@@ -3119,9 +3151,9 @@ function useMintAnymalNFT() {
|
|
|
3119
3151
|
}
|
|
3120
3152
|
|
|
3121
3153
|
// src/utils/anymals/useSaveAnymalMetadata.ts
|
|
3122
|
-
import { useCallback as
|
|
3154
|
+
import { useCallback as useCallback16 } from "react";
|
|
3123
3155
|
function useSaveAnymalMetadata() {
|
|
3124
|
-
return
|
|
3156
|
+
return useCallback16(
|
|
3125
3157
|
async (userPid, anymalTxId, idToken, nftMetadataInput, authServiceBaseUrl) => {
|
|
3126
3158
|
const response = await fetch(`${authServiceBaseUrl}/process-nft`, {
|
|
3127
3159
|
method: "POST",
|
|
@@ -3149,7 +3181,7 @@ function useSaveAnymalMetadata() {
|
|
|
3149
3181
|
}
|
|
3150
3182
|
|
|
3151
3183
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
3152
|
-
import { useCallback as
|
|
3184
|
+
import { useCallback as useCallback17 } from "react";
|
|
3153
3185
|
|
|
3154
3186
|
// src/helpers/UploadImageHelper.tsx
|
|
3155
3187
|
function resizeImage(file, maxWidth = 800, maxHeight = 800, quality = 0.7) {
|
|
@@ -3206,7 +3238,7 @@ function toBase64(file) {
|
|
|
3206
3238
|
|
|
3207
3239
|
// src/utils/anymals/useUploadAnymalImage.ts
|
|
3208
3240
|
function useUploadAnymalImage() {
|
|
3209
|
-
return
|
|
3241
|
+
return useCallback17(
|
|
3210
3242
|
async (imageFile, type, idToken, authServiceBaseUrl, petType, breed, lifestage, anymalPid) => {
|
|
3211
3243
|
if (!imageFile || !idToken) {
|
|
3212
3244
|
return {
|
|
@@ -3267,7 +3299,7 @@ function useUploadAnymalImage() {
|
|
|
3267
3299
|
}
|
|
3268
3300
|
|
|
3269
3301
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
3270
|
-
import { useCallback as
|
|
3302
|
+
import { useCallback as useCallback18 } from "react";
|
|
3271
3303
|
|
|
3272
3304
|
// src/helpers/ProcessDirectPartialPayment.tsx
|
|
3273
3305
|
import { encodeFunctionData as encodeFunctionData3 } from "viem";
|
|
@@ -3367,7 +3399,7 @@ async function processDirectPartialPayment(marketplaceContract, smartAccount, bu
|
|
|
3367
3399
|
|
|
3368
3400
|
// src/utils/marketplace/useProcessPartialKibblePayment.ts
|
|
3369
3401
|
function useProcessPartialKibblePayment() {
|
|
3370
|
-
return
|
|
3402
|
+
return useCallback18(
|
|
3371
3403
|
async (pid, nftId, orderId, dbAuthToken, marketplaceContract, smartAccount, bundlerClient, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
3372
3404
|
if (!orderId || !dbAuthToken || !nftId || !bundlerClient || !smartAccount || !pid || !marketplaceContract || !amountInTokens || !maxTokenPayment || !nonce || !deadline) {
|
|
3373
3405
|
return {
|
|
@@ -3423,7 +3455,7 @@ function useProcessPartialKibblePayment() {
|
|
|
3423
3455
|
}
|
|
3424
3456
|
|
|
3425
3457
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
3426
|
-
import { useCallback as
|
|
3458
|
+
import { useCallback as useCallback19 } from "react";
|
|
3427
3459
|
|
|
3428
3460
|
// src/helpers/ProcessDirectKibbleApproval.tsx
|
|
3429
3461
|
import { encodeFunctionData as encodeFunctionData4, erc20Abi } from "viem";
|
|
@@ -3468,7 +3500,7 @@ async function processDirectKibbleApproval(kibbleTokenAddress, spenderAddress, s
|
|
|
3468
3500
|
|
|
3469
3501
|
// src/utils/marketplace/useApproveKibbleToken.ts
|
|
3470
3502
|
function useApproveKibbleToken() {
|
|
3471
|
-
return
|
|
3503
|
+
return useCallback19(
|
|
3472
3504
|
async (kibbleTokenAddress, marketplaceContract, amount, smartAccount, bundlerClient) => {
|
|
3473
3505
|
try {
|
|
3474
3506
|
const result = await processDirectKibbleApproval(
|
|
@@ -3495,10 +3527,10 @@ function useApproveKibbleToken() {
|
|
|
3495
3527
|
}
|
|
3496
3528
|
|
|
3497
3529
|
// src/utils/organization/useCreateOrganizationBase.ts
|
|
3498
|
-
import { useCallback as
|
|
3530
|
+
import { useCallback as useCallback20 } from "react";
|
|
3499
3531
|
import { decodeEventLog, encodeFunctionData as encodeFunctionData5 } from "viem";
|
|
3500
3532
|
function useCreateOrganizationBase() {
|
|
3501
|
-
return
|
|
3533
|
+
return useCallback20(
|
|
3502
3534
|
/**
|
|
3503
3535
|
* Creates a new organization on-chain.
|
|
3504
3536
|
*
|
|
@@ -3594,7 +3626,7 @@ function useCreateOrganizationBase() {
|
|
|
3594
3626
|
}
|
|
3595
3627
|
|
|
3596
3628
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
3597
|
-
import { useCallback as
|
|
3629
|
+
import { useCallback as useCallback21 } from "react";
|
|
3598
3630
|
|
|
3599
3631
|
// src/helpers/ProcessOrgKibbleApproval.tsx
|
|
3600
3632
|
import { encodeFunctionData as encodeFunctionData6, erc20Abi as erc20Abi3 } from "viem";
|
|
@@ -3692,7 +3724,7 @@ async function processOrgKibbleApproval(orgContractAddress, kibbleTokenAddress,
|
|
|
3692
3724
|
|
|
3693
3725
|
// src/utils/organization/useApproveOrgKibbleToken.ts
|
|
3694
3726
|
function useApproveOrgPartialPayment() {
|
|
3695
|
-
return
|
|
3727
|
+
return useCallback21(
|
|
3696
3728
|
async (orgContractAddress, kibbleTokenAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, approveAmount) => {
|
|
3697
3729
|
if (!orgContractAddress || !kibbleTokenAddress || !partialPaymentModuleAddress || !managerSmartAccount || !bundlerClient || !approveAmount) {
|
|
3698
3730
|
return {
|
|
@@ -3724,7 +3756,7 @@ function useApproveOrgPartialPayment() {
|
|
|
3724
3756
|
}
|
|
3725
3757
|
|
|
3726
3758
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
3727
|
-
import { useCallback as
|
|
3759
|
+
import { useCallback as useCallback22 } from "react";
|
|
3728
3760
|
|
|
3729
3761
|
// src/helpers/ProcessOrgPartialPayment.tsx
|
|
3730
3762
|
import { encodeFunctionData as encodeFunctionData7 } from "viem";
|
|
@@ -3782,7 +3814,7 @@ async function processOrgPartialPayment(orgContractAddress, partialPaymentModule
|
|
|
3782
3814
|
|
|
3783
3815
|
// src/utils/organization/useProcessOrgPartialKibblePayment.ts
|
|
3784
3816
|
function useProcessOrgPartialKibblePayment() {
|
|
3785
|
-
return
|
|
3817
|
+
return useCallback22(
|
|
3786
3818
|
async (orgContractAddress, partialPaymentModuleAddress, managerSmartAccount, bundlerClient, orderId, anymalNftId, pid, amountInTokens, maxTokenPayment, nonce, deadline, backendSignature) => {
|
|
3787
3819
|
if (!orgContractAddress || !partialPaymentModuleAddress || !managerSmartAccount || !bundlerClient || !orderId || !pid || !nonce || !backendSignature) {
|
|
3788
3820
|
return {
|
|
@@ -3820,9 +3852,9 @@ function useProcessOrgPartialKibblePayment() {
|
|
|
3820
3852
|
}
|
|
3821
3853
|
|
|
3822
3854
|
// src/utils/organization/useUpdateOrgWalletAddress.ts
|
|
3823
|
-
import { useCallback as
|
|
3855
|
+
import { useCallback as useCallback23 } from "react";
|
|
3824
3856
|
function useUpdateOrgWalletAddress() {
|
|
3825
|
-
return
|
|
3857
|
+
return useCallback23(
|
|
3826
3858
|
async (dbAuthToken, docID, baseWalletAddress, endpoint) => {
|
|
3827
3859
|
try {
|
|
3828
3860
|
const mutation = `
|
|
@@ -3862,9 +3894,9 @@ function useUpdateOrgWalletAddress() {
|
|
|
3862
3894
|
|
|
3863
3895
|
// src/utils/organization/useMintOrgAnymalNFT.ts
|
|
3864
3896
|
import { encodeFunctionData as encodeFunctionData8 } from "viem";
|
|
3865
|
-
import { useCallback as
|
|
3897
|
+
import { useCallback as useCallback24 } from "react";
|
|
3866
3898
|
function useMintOrgAnymalNFT() {
|
|
3867
|
-
return
|
|
3899
|
+
return useCallback24(
|
|
3868
3900
|
async (orgContractAddress, pid, nftId, anymalTxId, dbAuthToken, validationContractAddress, managerSmartAccount, bundlerClient) => {
|
|
3869
3901
|
if (!dbAuthToken || !nftId || !bundlerClient || !managerSmartAccount || !pid || !validationContractAddress || !orgContractAddress) {
|
|
3870
3902
|
return {
|
|
@@ -3949,9 +3981,9 @@ async function submitAction(idToken, pid, sourceType, payload, endpointBaseUrl)
|
|
|
3949
3981
|
}
|
|
3950
3982
|
|
|
3951
3983
|
// src/utils/actions/useFetchActions.ts
|
|
3952
|
-
import { useCallback as
|
|
3984
|
+
import { useCallback as useCallback25 } from "react";
|
|
3953
3985
|
function useFetchActions() {
|
|
3954
|
-
return
|
|
3986
|
+
return useCallback25(
|
|
3955
3987
|
async (idToken, actionsServiceBaseUrl, pid, status, limit, offset) => {
|
|
3956
3988
|
const params = new URLSearchParams({ pid });
|
|
3957
3989
|
if (status) params.set("status", status);
|
|
@@ -3980,9 +4012,9 @@ function useFetchActions() {
|
|
|
3980
4012
|
}
|
|
3981
4013
|
|
|
3982
4014
|
// src/utils/actions/useFetchActionDefinitions.ts
|
|
3983
|
-
import { useCallback as
|
|
4015
|
+
import { useCallback as useCallback26 } from "react";
|
|
3984
4016
|
function useFetchActionDefinitions() {
|
|
3985
|
-
return
|
|
4017
|
+
return useCallback26(
|
|
3986
4018
|
async (idToken, actionsServiceBaseUrl) => {
|
|
3987
4019
|
try {
|
|
3988
4020
|
const response = await fetch(
|
|
@@ -4079,10 +4111,10 @@ var convertToMultipleActionRecords = (frs) => frs.map(convertToActionRecord);
|
|
|
4079
4111
|
var convertToMultipleActionDefinitions = (frs) => frs.map(convertToActionDefinition);
|
|
4080
4112
|
|
|
4081
4113
|
// src/utils/application/useCreateUserAppData.ts
|
|
4082
|
-
import { useCallback as
|
|
4114
|
+
import { useCallback as useCallback27 } from "react";
|
|
4083
4115
|
import { v4 as uuid } from "uuid";
|
|
4084
4116
|
function useCreateUserAppData() {
|
|
4085
|
-
return
|
|
4117
|
+
return useCallback27(
|
|
4086
4118
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
4087
4119
|
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint) return;
|
|
4088
4120
|
const appValues = {
|
|
@@ -4137,10 +4169,10 @@ function useCreateUserAppData() {
|
|
|
4137
4169
|
}
|
|
4138
4170
|
|
|
4139
4171
|
// src/utils/application/useCreateOrganizationAppData.ts
|
|
4140
|
-
import { useCallback as
|
|
4172
|
+
import { useCallback as useCallback28 } from "react";
|
|
4141
4173
|
import { v4 as uuid2 } from "uuid";
|
|
4142
4174
|
function useCreateOrganizationAppData() {
|
|
4143
|
-
return
|
|
4175
|
+
return useCallback28(
|
|
4144
4176
|
async (appId, pid, dbAuthToken, endpoint) => {
|
|
4145
4177
|
if (!dbAuthToken || !pid || !dbAuthToken || !endpoint) return;
|
|
4146
4178
|
const appValues = {
|
|
@@ -4194,10 +4226,10 @@ function useCreateOrganizationAppData() {
|
|
|
4194
4226
|
}
|
|
4195
4227
|
|
|
4196
4228
|
// src/utils/balance/useFetchBalance.ts
|
|
4197
|
-
import { useCallback as
|
|
4229
|
+
import { useCallback as useCallback29 } from "react";
|
|
4198
4230
|
import { erc20Abi as erc20Abi4, getAddress } from "viem";
|
|
4199
4231
|
function useFetchBalance() {
|
|
4200
|
-
return
|
|
4232
|
+
return useCallback29(
|
|
4201
4233
|
async (publicClient, walletAddress, kibbleTokenAddress) => {
|
|
4202
4234
|
try {
|
|
4203
4235
|
const balance = await publicClient.readContract({
|
|
@@ -4217,9 +4249,9 @@ function useFetchBalance() {
|
|
|
4217
4249
|
|
|
4218
4250
|
// src/utils/actions/useClaimActionReward.ts
|
|
4219
4251
|
import { encodeFunctionData as encodeFunctionData9 } from "viem";
|
|
4220
|
-
import { useCallback as
|
|
4252
|
+
import { useCallback as useCallback30 } from "react";
|
|
4221
4253
|
function useClaimActionReward() {
|
|
4222
|
-
return
|
|
4254
|
+
return useCallback30(
|
|
4223
4255
|
async (actionId, claimIndex, rewardableActionContractAddress, smartAccount, bundlerClient) => {
|
|
4224
4256
|
if (!actionId || claimIndex === void 0 || !bundlerClient || !smartAccount || !rewardableActionContractAddress) {
|
|
4225
4257
|
return {
|
|
@@ -4266,9 +4298,9 @@ function useClaimActionReward() {
|
|
|
4266
4298
|
|
|
4267
4299
|
// src/utils/actions/useClaimOrgActionReward.ts
|
|
4268
4300
|
import { encodeFunctionData as encodeFunctionData10 } from "viem";
|
|
4269
|
-
import { useCallback as
|
|
4301
|
+
import { useCallback as useCallback31 } from "react";
|
|
4270
4302
|
function useClaimOrgActionReward() {
|
|
4271
|
-
return
|
|
4303
|
+
return useCallback31(
|
|
4272
4304
|
async (orgContractAddress, rewardableActionContractAddress, actionId, claimIndex, smartAccount, bundlerClient) => {
|
|
4273
4305
|
if (!orgContractAddress || !actionId || claimIndex === void 0 || !bundlerClient || !smartAccount) {
|
|
4274
4306
|
return {
|
|
@@ -4318,9 +4350,9 @@ function useClaimOrgActionReward() {
|
|
|
4318
4350
|
}
|
|
4319
4351
|
|
|
4320
4352
|
// src/utils/actions/useSubmitContractAction.ts
|
|
4321
|
-
import { useCallback as
|
|
4353
|
+
import { useCallback as useCallback32 } from "react";
|
|
4322
4354
|
function useSubmitContractAction() {
|
|
4323
|
-
return
|
|
4355
|
+
return useCallback32(
|
|
4324
4356
|
(idToken, pid, source, endpoint, payload) => {
|
|
4325
4357
|
if (!idToken || !pid || !source || !endpoint || !payload) return;
|
|
4326
4358
|
let sourceTypePayload = {};
|
|
@@ -4480,6 +4512,7 @@ export {
|
|
|
4480
4512
|
useCoinbaseClaimActionReward,
|
|
4481
4513
|
useCoinbaseCreateOrganizationWallet,
|
|
4482
4514
|
useCoinbaseMintAnymalNFT,
|
|
4515
|
+
useCoinbaseMintOrgAnymalNFT,
|
|
4483
4516
|
useCreateOrganizationAppData,
|
|
4484
4517
|
useCreateOrganizationBase,
|
|
4485
4518
|
useCreateUserAppData,
|
package/package.json
CHANGED