anymal-protocol 1.0.129 → 1.0.130
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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +8 -5
- package/dist/index.mjs +8 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -54,7 +54,7 @@ declare function useUpdateUserName(): (dbAuthToken: string, docID: string, name:
|
|
|
54
54
|
declare function useFetchNotifications(): (pid: string, dbAuthToken: string, endpoint: string, additionalFilters?: Record<string, any>) => Promise<any>;
|
|
55
55
|
|
|
56
56
|
declare function useSendCoinbaseUserOperation(): {
|
|
57
|
-
sendOperationFn: (evmAddress: `0x${string}`, callData: any, contractAddress: `0x${string}
|
|
57
|
+
sendOperationFn: (evmAddress: `0x${string}`, callData: any, contractAddress: `0x${string}`, paymasterUrl: string) => Promise<{
|
|
58
58
|
success: boolean;
|
|
59
59
|
message: string;
|
|
60
60
|
}>;
|
|
@@ -63,13 +63,13 @@ declare function useSendCoinbaseUserOperation(): {
|
|
|
63
63
|
error: Error | undefined;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
declare function useCoinbaseClaimActionReward(): (evmAddress: `0x${string}`, actionId: string, claimIndex: number, validationContractAddress: `0x${string}
|
|
66
|
+
declare function useCoinbaseClaimActionReward(): (evmAddress: `0x${string}`, actionId: string, claimIndex: number, validationContractAddress: `0x${string}`, paymasterUrl: string) => Promise<{
|
|
67
67
|
success: boolean;
|
|
68
68
|
message: string;
|
|
69
69
|
status: string;
|
|
70
70
|
}>;
|
|
71
71
|
|
|
72
|
-
declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string, nftId: string, anymalTxId: string, validationContractAddress: `0x${string}
|
|
72
|
+
declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string, nftId: string, anymalTxId: string, validationContractAddress: `0x${string}`, paymasterUrl: string) => Promise<{
|
|
73
73
|
success: boolean;
|
|
74
74
|
message: string;
|
|
75
75
|
status: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ declare function useUpdateUserName(): (dbAuthToken: string, docID: string, name:
|
|
|
54
54
|
declare function useFetchNotifications(): (pid: string, dbAuthToken: string, endpoint: string, additionalFilters?: Record<string, any>) => Promise<any>;
|
|
55
55
|
|
|
56
56
|
declare function useSendCoinbaseUserOperation(): {
|
|
57
|
-
sendOperationFn: (evmAddress: `0x${string}`, callData: any, contractAddress: `0x${string}
|
|
57
|
+
sendOperationFn: (evmAddress: `0x${string}`, callData: any, contractAddress: `0x${string}`, paymasterUrl: string) => Promise<{
|
|
58
58
|
success: boolean;
|
|
59
59
|
message: string;
|
|
60
60
|
}>;
|
|
@@ -63,13 +63,13 @@ declare function useSendCoinbaseUserOperation(): {
|
|
|
63
63
|
error: Error | undefined;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
declare function useCoinbaseClaimActionReward(): (evmAddress: `0x${string}`, actionId: string, claimIndex: number, validationContractAddress: `0x${string}
|
|
66
|
+
declare function useCoinbaseClaimActionReward(): (evmAddress: `0x${string}`, actionId: string, claimIndex: number, validationContractAddress: `0x${string}`, paymasterUrl: string) => Promise<{
|
|
67
67
|
success: boolean;
|
|
68
68
|
message: string;
|
|
69
69
|
status: string;
|
|
70
70
|
}>;
|
|
71
71
|
|
|
72
|
-
declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string, nftId: string, anymalTxId: string, validationContractAddress: `0x${string}
|
|
72
|
+
declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string, nftId: string, anymalTxId: string, validationContractAddress: `0x${string}`, paymasterUrl: string) => Promise<{
|
|
73
73
|
success: boolean;
|
|
74
74
|
message: string;
|
|
75
75
|
status: string;
|
package/dist/index.js
CHANGED
|
@@ -470,7 +470,7 @@ var import_cdp_hooks = require("@coinbase/cdp-hooks");
|
|
|
470
470
|
function useSendCoinbaseUserOperation() {
|
|
471
471
|
const { sendUserOperation, data, error, status } = (0, import_cdp_hooks.useSendUserOperation)();
|
|
472
472
|
const sendOperationFn = (0, import_react10.useCallback)(
|
|
473
|
-
async (evmAddress, callData, contractAddress) => {
|
|
473
|
+
async (evmAddress, callData, contractAddress, paymasterUrl) => {
|
|
474
474
|
if (!evmAddress || !callData || !contractAddress) {
|
|
475
475
|
return { success: false, message: "Missing required information" };
|
|
476
476
|
}
|
|
@@ -479,6 +479,7 @@ function useSendCoinbaseUserOperation() {
|
|
|
479
479
|
evmSmartAccount: evmAddress,
|
|
480
480
|
network: "base-sepolia",
|
|
481
481
|
useCdpPaymaster: true,
|
|
482
|
+
paymasterUrl,
|
|
482
483
|
calls: [{ data: callData, to: contractAddress }]
|
|
483
484
|
});
|
|
484
485
|
return { success: true, message: "Operation submitted." };
|
|
@@ -2931,7 +2932,7 @@ var import_react11 = require("react");
|
|
|
2931
2932
|
function useCoinbaseClaimActionReward() {
|
|
2932
2933
|
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
2933
2934
|
return (0, import_react11.useCallback)(
|
|
2934
|
-
async (evmAddress, actionId, claimIndex, validationContractAddress) => {
|
|
2935
|
+
async (evmAddress, actionId, claimIndex, validationContractAddress, paymasterUrl) => {
|
|
2935
2936
|
if (!evmAddress || !actionId || claimIndex === void 0 || !validationContractAddress) {
|
|
2936
2937
|
return {
|
|
2937
2938
|
success: false,
|
|
@@ -2950,7 +2951,8 @@ function useCoinbaseClaimActionReward() {
|
|
|
2950
2951
|
const opsRes = await sendOperationFn(
|
|
2951
2952
|
evmAddress,
|
|
2952
2953
|
callData,
|
|
2953
|
-
validationContractAddress
|
|
2954
|
+
validationContractAddress,
|
|
2955
|
+
paymasterUrl
|
|
2954
2956
|
);
|
|
2955
2957
|
return { success: opsRes.success, message: opsRes.message, status };
|
|
2956
2958
|
} catch (error) {
|
|
@@ -2972,7 +2974,7 @@ var import_react12 = require("react");
|
|
|
2972
2974
|
function useCoinbaseMintAnymalNFT() {
|
|
2973
2975
|
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
2974
2976
|
return (0, import_react12.useCallback)(
|
|
2975
|
-
async (evmAddress, pid, nftId, anymalTxId, validationContractAddress) => {
|
|
2977
|
+
async (evmAddress, pid, nftId, anymalTxId, validationContractAddress, paymasterUrl) => {
|
|
2976
2978
|
if (!nftId || !pid || !validationContractAddress) {
|
|
2977
2979
|
return {
|
|
2978
2980
|
success: false,
|
|
@@ -2997,7 +2999,8 @@ function useCoinbaseMintAnymalNFT() {
|
|
|
2997
2999
|
const opsRes = await sendOperationFn(
|
|
2998
3000
|
evmAddress,
|
|
2999
3001
|
callData,
|
|
3000
|
-
validationContractAddress
|
|
3002
|
+
validationContractAddress,
|
|
3003
|
+
paymasterUrl
|
|
3001
3004
|
);
|
|
3002
3005
|
return { success: opsRes.success, message: opsRes.message, status };
|
|
3003
3006
|
} catch (error) {
|
package/dist/index.mjs
CHANGED
|
@@ -392,7 +392,7 @@ import { useSendUserOperation } from "@coinbase/cdp-hooks";
|
|
|
392
392
|
function useSendCoinbaseUserOperation() {
|
|
393
393
|
const { sendUserOperation, data, error, status } = useSendUserOperation();
|
|
394
394
|
const sendOperationFn = useCallback10(
|
|
395
|
-
async (evmAddress, callData, contractAddress) => {
|
|
395
|
+
async (evmAddress, callData, contractAddress, paymasterUrl) => {
|
|
396
396
|
if (!evmAddress || !callData || !contractAddress) {
|
|
397
397
|
return { success: false, message: "Missing required information" };
|
|
398
398
|
}
|
|
@@ -401,6 +401,7 @@ function useSendCoinbaseUserOperation() {
|
|
|
401
401
|
evmSmartAccount: evmAddress,
|
|
402
402
|
network: "base-sepolia",
|
|
403
403
|
useCdpPaymaster: true,
|
|
404
|
+
paymasterUrl,
|
|
404
405
|
calls: [{ data: callData, to: contractAddress }]
|
|
405
406
|
});
|
|
406
407
|
return { success: true, message: "Operation submitted." };
|
|
@@ -2853,7 +2854,7 @@ import { useCallback as useCallback11 } from "react";
|
|
|
2853
2854
|
function useCoinbaseClaimActionReward() {
|
|
2854
2855
|
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
2855
2856
|
return useCallback11(
|
|
2856
|
-
async (evmAddress, actionId, claimIndex, validationContractAddress) => {
|
|
2857
|
+
async (evmAddress, actionId, claimIndex, validationContractAddress, paymasterUrl) => {
|
|
2857
2858
|
if (!evmAddress || !actionId || claimIndex === void 0 || !validationContractAddress) {
|
|
2858
2859
|
return {
|
|
2859
2860
|
success: false,
|
|
@@ -2872,7 +2873,8 @@ function useCoinbaseClaimActionReward() {
|
|
|
2872
2873
|
const opsRes = await sendOperationFn(
|
|
2873
2874
|
evmAddress,
|
|
2874
2875
|
callData,
|
|
2875
|
-
validationContractAddress
|
|
2876
|
+
validationContractAddress,
|
|
2877
|
+
paymasterUrl
|
|
2876
2878
|
);
|
|
2877
2879
|
return { success: opsRes.success, message: opsRes.message, status };
|
|
2878
2880
|
} catch (error) {
|
|
@@ -2894,7 +2896,7 @@ import { useCallback as useCallback12 } from "react";
|
|
|
2894
2896
|
function useCoinbaseMintAnymalNFT() {
|
|
2895
2897
|
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
2896
2898
|
return useCallback12(
|
|
2897
|
-
async (evmAddress, pid, nftId, anymalTxId, validationContractAddress) => {
|
|
2899
|
+
async (evmAddress, pid, nftId, anymalTxId, validationContractAddress, paymasterUrl) => {
|
|
2898
2900
|
if (!nftId || !pid || !validationContractAddress) {
|
|
2899
2901
|
return {
|
|
2900
2902
|
success: false,
|
|
@@ -2919,7 +2921,8 @@ function useCoinbaseMintAnymalNFT() {
|
|
|
2919
2921
|
const opsRes = await sendOperationFn(
|
|
2920
2922
|
evmAddress,
|
|
2921
2923
|
callData,
|
|
2922
|
-
validationContractAddress
|
|
2924
|
+
validationContractAddress,
|
|
2925
|
+
paymasterUrl
|
|
2923
2926
|
);
|
|
2924
2927
|
return { success: opsRes.success, message: opsRes.message, status };
|
|
2925
2928
|
} catch (error) {
|
package/package.json
CHANGED