anymal-protocol 1.0.134 → 1.0.136

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
@@ -428,15 +428,12 @@ declare const ORG_FUNCTION = "executeCall";
428
428
  *
429
429
  * @returns {Function} - Async function to create the organization.
430
430
  */
431
- declare function useCoinbaseCreateOrganizationWallet(): {
432
- createOrganization: (orgPid: string, orgName: string, ownerAddress: string, orgContractAddress: `0x${string}`, evmAddress: `0x${string}`) => Promise<{
433
- success: boolean;
434
- message: string;
435
- proxyAddress?: string;
436
- status: string;
437
- }>;
438
- status: _coinbase_cdp_hooks.Status;
439
- };
431
+ declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName: string, ownerAddress: string, orgContractAddress: `0x${string}`, evmAddress: `0x${string}`) => Promise<{
432
+ success: boolean;
433
+ message: string;
434
+ proxyAddress?: string;
435
+ status: string;
436
+ }>;
440
437
 
441
438
  declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
442
439
  success: boolean;
package/dist/index.d.ts CHANGED
@@ -428,15 +428,12 @@ declare const ORG_FUNCTION = "executeCall";
428
428
  *
429
429
  * @returns {Function} - Async function to create the organization.
430
430
  */
431
- declare function useCoinbaseCreateOrganizationWallet(): {
432
- createOrganization: (orgPid: string, orgName: string, ownerAddress: string, orgContractAddress: `0x${string}`, evmAddress: `0x${string}`) => Promise<{
433
- success: boolean;
434
- message: string;
435
- proxyAddress?: string;
436
- status: string;
437
- }>;
438
- status: _coinbase_cdp_hooks.Status;
439
- };
431
+ declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName: string, ownerAddress: string, orgContractAddress: `0x${string}`, evmAddress: `0x${string}`) => Promise<{
432
+ success: boolean;
433
+ message: string;
434
+ proxyAddress?: string;
435
+ status: string;
436
+ }>;
440
437
 
441
438
  declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
442
439
  success: boolean;
package/dist/index.js CHANGED
@@ -3024,12 +3024,12 @@ function useCoinbaseCreateOrganizationWallet() {
3024
3024
  }),
3025
3025
  []
3026
3026
  );
3027
- const createOrganization = (0, import_react13.useCallback)(
3027
+ return (0, import_react13.useCallback)(
3028
3028
  /**
3029
3029
  * Creates a new organization on-chain.
3030
3030
  *
3031
- * @param orgPid - The PID of the organization as registered in DefraDB.
3032
- * @param orgName - The name of the organization as registered in DefraDB.
3031
+ * @param orgPid - The PID of the organization as registered in Firestore.
3032
+ * @param orgName - The name of the organization as registered in Firestore.
3033
3033
  * @param ownerAddress - The wallet address of the user who will be the default manager.
3034
3034
  * @param orgContractAddress - The contract address of the organization beacon.
3035
3035
  * @param evmAddress - The Coinbase smart account address of the admin.
@@ -3055,10 +3055,10 @@ function useCoinbaseCreateOrganizationWallet() {
3055
3055
  }
3056
3056
  let proxyAddress;
3057
3057
  try {
3058
- if (data?.transactionHash) {
3059
- const receipt = await publicClient.waitForTransactionReceipt({
3060
- hash: data.transactionHash,
3061
- timeout: 3e4
3058
+ const txHash = data?.receipts?.[0]?.transactionHash || data?.transactionHash;
3059
+ if (txHash) {
3060
+ const receipt = await publicClient.getTransactionReceipt({
3061
+ hash: txHash
3062
3062
  });
3063
3063
  for (const log of receipt.logs) {
3064
3064
  try {
@@ -3094,7 +3094,6 @@ function useCoinbaseCreateOrganizationWallet() {
3094
3094
  },
3095
3095
  [sendOperationFn, data, publicClient, status]
3096
3096
  );
3097
- return { createOrganization, status };
3098
3097
  }
3099
3098
 
3100
3099
  // src/utils/anymals/useMintAnymalNFT.ts
package/dist/index.mjs CHANGED
@@ -2945,12 +2945,12 @@ function useCoinbaseCreateOrganizationWallet() {
2945
2945
  }),
2946
2946
  []
2947
2947
  );
2948
- const createOrganization = useCallback13(
2948
+ return useCallback13(
2949
2949
  /**
2950
2950
  * Creates a new organization on-chain.
2951
2951
  *
2952
- * @param orgPid - The PID of the organization as registered in DefraDB.
2953
- * @param orgName - The name of the organization as registered in DefraDB.
2952
+ * @param orgPid - The PID of the organization as registered in Firestore.
2953
+ * @param orgName - The name of the organization as registered in Firestore.
2954
2954
  * @param ownerAddress - The wallet address of the user who will be the default manager.
2955
2955
  * @param orgContractAddress - The contract address of the organization beacon.
2956
2956
  * @param evmAddress - The Coinbase smart account address of the admin.
@@ -2976,10 +2976,10 @@ function useCoinbaseCreateOrganizationWallet() {
2976
2976
  }
2977
2977
  let proxyAddress;
2978
2978
  try {
2979
- if (data?.transactionHash) {
2980
- const receipt = await publicClient.waitForTransactionReceipt({
2981
- hash: data.transactionHash,
2982
- timeout: 3e4
2979
+ const txHash = data?.receipts?.[0]?.transactionHash || data?.transactionHash;
2980
+ if (txHash) {
2981
+ const receipt = await publicClient.getTransactionReceipt({
2982
+ hash: txHash
2983
2983
  });
2984
2984
  for (const log of receipt.logs) {
2985
2985
  try {
@@ -3015,7 +3015,6 @@ function useCoinbaseCreateOrganizationWallet() {
3015
3015
  },
3016
3016
  [sendOperationFn, data, publicClient, status]
3017
3017
  );
3018
- return { createOrganization, status };
3019
3018
  }
3020
3019
 
3021
3020
  // src/utils/anymals/useMintAnymalNFT.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anymal-protocol",
3
- "version": "1.0.134",
3
+ "version": "1.0.136",
4
4
  "description": "A React/TypeScript-based utility library for reusable functions and hooks inside of the Anymal Ecosystem.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {