anymal-protocol 1.0.154 → 1.0.156
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -16
- package/dist/index.mjs +10 -16
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -70,7 +70,7 @@ declare function useCoinbaseClaimActionReward(): (evmAddress: `0x${string}`, act
|
|
|
70
70
|
status: string;
|
|
71
71
|
}>;
|
|
72
72
|
|
|
73
|
-
declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string,
|
|
73
|
+
declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string, passportID: string, anymalTxId: string, validationContractAddress: `0x${string}`) => Promise<{
|
|
74
74
|
success: boolean;
|
|
75
75
|
message: string;
|
|
76
76
|
status: string;
|
|
@@ -437,7 +437,7 @@ declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName
|
|
|
437
437
|
data: GetUserOperationResult | undefined;
|
|
438
438
|
}>;
|
|
439
439
|
|
|
440
|
-
declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, orgContractAddress: string, pid: string,
|
|
440
|
+
declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, orgContractAddress: string, pid: string, passportID: string, anymalTxId: string, validationContractAddress: `0x${string}`, isProduction?: boolean) => Promise<{
|
|
441
441
|
success: boolean;
|
|
442
442
|
message: string;
|
|
443
443
|
status: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ declare function useCoinbaseClaimActionReward(): (evmAddress: `0x${string}`, act
|
|
|
70
70
|
status: string;
|
|
71
71
|
}>;
|
|
72
72
|
|
|
73
|
-
declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string,
|
|
73
|
+
declare function useCoinbaseMintAnymalNFT(): (evmAddress: `0x${string}`, pid: string, passportID: string, anymalTxId: string, validationContractAddress: `0x${string}`) => Promise<{
|
|
74
74
|
success: boolean;
|
|
75
75
|
message: string;
|
|
76
76
|
status: string;
|
|
@@ -437,7 +437,7 @@ declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName
|
|
|
437
437
|
data: GetUserOperationResult | undefined;
|
|
438
438
|
}>;
|
|
439
439
|
|
|
440
|
-
declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, orgContractAddress: string, pid: string,
|
|
440
|
+
declare function useCoinbaseMintOrgAnymalNFT(): (evmAddress: `0x${string}`, orgContractAddress: string, pid: string, passportID: string, anymalTxId: string, validationContractAddress: `0x${string}`, isProduction?: boolean) => Promise<{
|
|
441
441
|
success: boolean;
|
|
442
442
|
message: string;
|
|
443
443
|
status: string;
|
package/dist/index.js
CHANGED
|
@@ -468,8 +468,8 @@ function useFetchNotifications() {
|
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
// src/utils/coinbase/useSendCoinbaseUserOperation.ts
|
|
471
|
-
var import_react10 = require("react");
|
|
472
471
|
var import_cdp_hooks = require("@coinbase/cdp-hooks");
|
|
472
|
+
var import_react10 = require("react");
|
|
473
473
|
var import_viem = require("viem");
|
|
474
474
|
var import_chains = require("viem/chains");
|
|
475
475
|
function useSendCoinbaseUserOperation() {
|
|
@@ -483,13 +483,6 @@ function useSendCoinbaseUserOperation() {
|
|
|
483
483
|
);
|
|
484
484
|
const sendOperationFn = (0, import_react10.useCallback)(
|
|
485
485
|
async (evmAddress, contractAddress, abi, functionName, args) => {
|
|
486
|
-
console.log("sendOperationFn called with:", {
|
|
487
|
-
evmAddress,
|
|
488
|
-
contractAddress,
|
|
489
|
-
functionName,
|
|
490
|
-
args,
|
|
491
|
-
argsLength: args.length
|
|
492
|
-
});
|
|
493
486
|
if (!evmAddress || !contractAddress || !abi || !functionName) {
|
|
494
487
|
return { success: false, message: "Missing required information" };
|
|
495
488
|
}
|
|
@@ -2993,8 +2986,8 @@ var import_react12 = require("react");
|
|
|
2993
2986
|
function useCoinbaseMintAnymalNFT() {
|
|
2994
2987
|
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
2995
2988
|
return (0, import_react12.useCallback)(
|
|
2996
|
-
async (evmAddress, pid,
|
|
2997
|
-
if (!
|
|
2989
|
+
async (evmAddress, pid, passportID, anymalTxId, validationContractAddress) => {
|
|
2990
|
+
if (!passportID || !pid || !validationContractAddress) {
|
|
2998
2991
|
return {
|
|
2999
2992
|
success: false,
|
|
3000
2993
|
message: "Coinbase Mint NFT: Missing authentication token OR NFT ID.",
|
|
@@ -3008,8 +3001,8 @@ function useCoinbaseMintAnymalNFT() {
|
|
|
3008
3001
|
"submitMetadataByCampaignName",
|
|
3009
3002
|
[
|
|
3010
3003
|
pid,
|
|
3011
|
-
|
|
3012
|
-
`https://dev-nft.petastic.com/metadata/${
|
|
3004
|
+
passportID,
|
|
3005
|
+
`https://dev-nft.petastic.com/metadata/${passportID}`,
|
|
3013
3006
|
"petastic-signup-campaign-1",
|
|
3014
3007
|
anymalTxId
|
|
3015
3008
|
]
|
|
@@ -3078,18 +3071,19 @@ var import_viem4 = require("viem");
|
|
|
3078
3071
|
function useCoinbaseMintOrgAnymalNFT() {
|
|
3079
3072
|
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
3080
3073
|
return (0, import_react14.useCallback)(
|
|
3081
|
-
async (evmAddress, orgContractAddress, pid,
|
|
3082
|
-
if (!
|
|
3074
|
+
async (evmAddress, orgContractAddress, pid, passportID, anymalTxId, validationContractAddress, isProduction) => {
|
|
3075
|
+
if (!passportID || !orgContractAddress || !pid || !validationContractAddress) {
|
|
3083
3076
|
return {
|
|
3084
3077
|
success: false,
|
|
3085
3078
|
message: "Coinbase Mint NFT: Missing authentication token OR NFT ID.",
|
|
3086
3079
|
status: "error"
|
|
3087
3080
|
};
|
|
3088
3081
|
}
|
|
3082
|
+
const metadataUrl = isProduction ? `https://nft.petastic.com/metadata/${passportID}` : `https://dev-nft.petastic.com/metadata/${passportID}`;
|
|
3089
3083
|
const args = [
|
|
3090
3084
|
pid,
|
|
3091
|
-
|
|
3092
|
-
|
|
3085
|
+
passportID,
|
|
3086
|
+
metadataUrl,
|
|
3093
3087
|
"petastic-signup-campaign-1",
|
|
3094
3088
|
anymalTxId
|
|
3095
3089
|
];
|
package/dist/index.mjs
CHANGED
|
@@ -387,8 +387,8 @@ function useFetchNotifications() {
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
// src/utils/coinbase/useSendCoinbaseUserOperation.ts
|
|
390
|
-
import { useCallback as useCallback10, useMemo } from "react";
|
|
391
390
|
import { useSendUserOperation } from "@coinbase/cdp-hooks";
|
|
391
|
+
import { useCallback as useCallback10, useMemo } from "react";
|
|
392
392
|
import { createPublicClient, encodeFunctionData, http } from "viem";
|
|
393
393
|
import { baseSepolia } from "viem/chains";
|
|
394
394
|
function useSendCoinbaseUserOperation() {
|
|
@@ -402,13 +402,6 @@ function useSendCoinbaseUserOperation() {
|
|
|
402
402
|
);
|
|
403
403
|
const sendOperationFn = useCallback10(
|
|
404
404
|
async (evmAddress, contractAddress, abi, functionName, args) => {
|
|
405
|
-
console.log("sendOperationFn called with:", {
|
|
406
|
-
evmAddress,
|
|
407
|
-
contractAddress,
|
|
408
|
-
functionName,
|
|
409
|
-
args,
|
|
410
|
-
argsLength: args.length
|
|
411
|
-
});
|
|
412
405
|
if (!evmAddress || !contractAddress || !abi || !functionName) {
|
|
413
406
|
return { success: false, message: "Missing required information" };
|
|
414
407
|
}
|
|
@@ -2912,8 +2905,8 @@ import { useCallback as useCallback12 } from "react";
|
|
|
2912
2905
|
function useCoinbaseMintAnymalNFT() {
|
|
2913
2906
|
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
2914
2907
|
return useCallback12(
|
|
2915
|
-
async (evmAddress, pid,
|
|
2916
|
-
if (!
|
|
2908
|
+
async (evmAddress, pid, passportID, anymalTxId, validationContractAddress) => {
|
|
2909
|
+
if (!passportID || !pid || !validationContractAddress) {
|
|
2917
2910
|
return {
|
|
2918
2911
|
success: false,
|
|
2919
2912
|
message: "Coinbase Mint NFT: Missing authentication token OR NFT ID.",
|
|
@@ -2927,8 +2920,8 @@ function useCoinbaseMintAnymalNFT() {
|
|
|
2927
2920
|
"submitMetadataByCampaignName",
|
|
2928
2921
|
[
|
|
2929
2922
|
pid,
|
|
2930
|
-
|
|
2931
|
-
`https://dev-nft.petastic.com/metadata/${
|
|
2923
|
+
passportID,
|
|
2924
|
+
`https://dev-nft.petastic.com/metadata/${passportID}`,
|
|
2932
2925
|
"petastic-signup-campaign-1",
|
|
2933
2926
|
anymalTxId
|
|
2934
2927
|
]
|
|
@@ -2997,18 +2990,19 @@ import { encodeFunctionData as encodeFunctionData2 } from "viem";
|
|
|
2997
2990
|
function useCoinbaseMintOrgAnymalNFT() {
|
|
2998
2991
|
const { sendOperationFn, status } = useSendCoinbaseUserOperation();
|
|
2999
2992
|
return useCallback14(
|
|
3000
|
-
async (evmAddress, orgContractAddress, pid,
|
|
3001
|
-
if (!
|
|
2993
|
+
async (evmAddress, orgContractAddress, pid, passportID, anymalTxId, validationContractAddress, isProduction) => {
|
|
2994
|
+
if (!passportID || !orgContractAddress || !pid || !validationContractAddress) {
|
|
3002
2995
|
return {
|
|
3003
2996
|
success: false,
|
|
3004
2997
|
message: "Coinbase Mint NFT: Missing authentication token OR NFT ID.",
|
|
3005
2998
|
status: "error"
|
|
3006
2999
|
};
|
|
3007
3000
|
}
|
|
3001
|
+
const metadataUrl = isProduction ? `https://nft.petastic.com/metadata/${passportID}` : `https://dev-nft.petastic.com/metadata/${passportID}`;
|
|
3008
3002
|
const args = [
|
|
3009
3003
|
pid,
|
|
3010
|
-
|
|
3011
|
-
|
|
3004
|
+
passportID,
|
|
3005
|
+
metadataUrl,
|
|
3012
3006
|
"petastic-signup-campaign-1",
|
|
3013
3007
|
anymalTxId
|
|
3014
3008
|
];
|
package/package.json
CHANGED