anymal-protocol 1.0.141 → 1.0.143
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 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +10 -8
- package/dist/index.mjs +10 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _coinbase_cdp_hooks from '@coinbase/cdp-hooks';
|
|
2
2
|
import * as _coinbase_cdp_api_client from '@coinbase/cdp-api-client';
|
|
3
3
|
import * as abitype from 'abitype';
|
|
4
|
+
import { GetUserOperationResult } from '@coinbase/cdp-core';
|
|
4
5
|
import { BundlerClient } from 'viem/account-abstraction';
|
|
5
6
|
import { ec } from 'elliptic';
|
|
6
7
|
|
|
@@ -428,11 +429,12 @@ declare const ORG_FUNCTION = "executeCall";
|
|
|
428
429
|
*
|
|
429
430
|
* @returns {Function} - Async function to create the organization.
|
|
430
431
|
*/
|
|
431
|
-
declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName: string,
|
|
432
|
+
declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName: string, orgContractAddress: `0x${string}`, evmAddress: `0x${string}`) => Promise<{
|
|
432
433
|
success: boolean;
|
|
433
434
|
message: string;
|
|
434
435
|
proxyAddress?: string;
|
|
435
436
|
status: string;
|
|
437
|
+
data: GetUserOperationResult | undefined;
|
|
436
438
|
}>;
|
|
437
439
|
|
|
438
440
|
declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _coinbase_cdp_hooks from '@coinbase/cdp-hooks';
|
|
2
2
|
import * as _coinbase_cdp_api_client from '@coinbase/cdp-api-client';
|
|
3
3
|
import * as abitype from 'abitype';
|
|
4
|
+
import { GetUserOperationResult } from '@coinbase/cdp-core';
|
|
4
5
|
import { BundlerClient } from 'viem/account-abstraction';
|
|
5
6
|
import { ec } from 'elliptic';
|
|
6
7
|
|
|
@@ -428,11 +429,12 @@ declare const ORG_FUNCTION = "executeCall";
|
|
|
428
429
|
*
|
|
429
430
|
* @returns {Function} - Async function to create the organization.
|
|
430
431
|
*/
|
|
431
|
-
declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName: string,
|
|
432
|
+
declare function useCoinbaseCreateOrganizationWallet(): (orgPid: string, orgName: string, orgContractAddress: `0x${string}`, evmAddress: `0x${string}`) => Promise<{
|
|
432
433
|
success: boolean;
|
|
433
434
|
message: string;
|
|
434
435
|
proxyAddress?: string;
|
|
435
436
|
status: string;
|
|
437
|
+
data: GetUserOperationResult | undefined;
|
|
436
438
|
}>;
|
|
437
439
|
|
|
438
440
|
declare function useMintAnymalNFT(): (pid: string, nftId: string, anymalTxId: string, dbAuthToken: string, validationContractAddress: string, smartAccount: any, bundlerClient: any) => Promise<{
|
package/dist/index.js
CHANGED
|
@@ -3030,17 +3030,17 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
3030
3030
|
*
|
|
3031
3031
|
* @param orgPid - The PID of the organization as registered in Firestore.
|
|
3032
3032
|
* @param orgName - The name of the organization as registered in Firestore.
|
|
3033
|
-
* @param ownerAddress - The wallet address of the user who will be the default manager.
|
|
3034
3033
|
* @param orgContractAddress - The contract address of the organization beacon.
|
|
3035
3034
|
* @param evmAddress - The Coinbase smart account address of the admin.
|
|
3036
3035
|
* @returns A promise with success status, message, and optional proxyAddress.
|
|
3037
3036
|
*/
|
|
3038
|
-
async (orgPid, orgName,
|
|
3039
|
-
if (!orgPid || !orgName || !
|
|
3037
|
+
async (orgPid, orgName, orgContractAddress, evmAddress) => {
|
|
3038
|
+
if (!orgPid || !orgName || !evmAddress || !orgContractAddress) {
|
|
3040
3039
|
return {
|
|
3041
3040
|
success: false,
|
|
3042
3041
|
message: "Missing required parameters for organization creation.",
|
|
3043
|
-
status: "error"
|
|
3042
|
+
status: "error",
|
|
3043
|
+
data
|
|
3044
3044
|
};
|
|
3045
3045
|
}
|
|
3046
3046
|
try {
|
|
@@ -3049,21 +3049,23 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
3049
3049
|
orgContractAddress,
|
|
3050
3050
|
ORGANIZATION_BEACON_ABI,
|
|
3051
3051
|
"createOrganizationProxy",
|
|
3052
|
-
[
|
|
3052
|
+
[evmAddress, orgName, orgPid]
|
|
3053
3053
|
);
|
|
3054
3054
|
if (!result.success) {
|
|
3055
|
-
return { ...result, status: "error" };
|
|
3055
|
+
return { ...result, status: "error", data };
|
|
3056
3056
|
}
|
|
3057
3057
|
return {
|
|
3058
3058
|
...result,
|
|
3059
|
-
status
|
|
3059
|
+
status,
|
|
3060
|
+
data
|
|
3060
3061
|
};
|
|
3061
3062
|
} catch (error) {
|
|
3062
3063
|
console.error("Org wallet creation error", error);
|
|
3063
3064
|
return {
|
|
3064
3065
|
success: false,
|
|
3065
3066
|
message: "Error",
|
|
3066
|
-
status: "error"
|
|
3067
|
+
status: "error",
|
|
3068
|
+
data
|
|
3067
3069
|
};
|
|
3068
3070
|
}
|
|
3069
3071
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -2951,17 +2951,17 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
2951
2951
|
*
|
|
2952
2952
|
* @param orgPid - The PID of the organization as registered in Firestore.
|
|
2953
2953
|
* @param orgName - The name of the organization as registered in Firestore.
|
|
2954
|
-
* @param ownerAddress - The wallet address of the user who will be the default manager.
|
|
2955
2954
|
* @param orgContractAddress - The contract address of the organization beacon.
|
|
2956
2955
|
* @param evmAddress - The Coinbase smart account address of the admin.
|
|
2957
2956
|
* @returns A promise with success status, message, and optional proxyAddress.
|
|
2958
2957
|
*/
|
|
2959
|
-
async (orgPid, orgName,
|
|
2960
|
-
if (!orgPid || !orgName || !
|
|
2958
|
+
async (orgPid, orgName, orgContractAddress, evmAddress) => {
|
|
2959
|
+
if (!orgPid || !orgName || !evmAddress || !orgContractAddress) {
|
|
2961
2960
|
return {
|
|
2962
2961
|
success: false,
|
|
2963
2962
|
message: "Missing required parameters for organization creation.",
|
|
2964
|
-
status: "error"
|
|
2963
|
+
status: "error",
|
|
2964
|
+
data
|
|
2965
2965
|
};
|
|
2966
2966
|
}
|
|
2967
2967
|
try {
|
|
@@ -2970,21 +2970,23 @@ function useCoinbaseCreateOrganizationWallet() {
|
|
|
2970
2970
|
orgContractAddress,
|
|
2971
2971
|
ORGANIZATION_BEACON_ABI,
|
|
2972
2972
|
"createOrganizationProxy",
|
|
2973
|
-
[
|
|
2973
|
+
[evmAddress, orgName, orgPid]
|
|
2974
2974
|
);
|
|
2975
2975
|
if (!result.success) {
|
|
2976
|
-
return { ...result, status: "error" };
|
|
2976
|
+
return { ...result, status: "error", data };
|
|
2977
2977
|
}
|
|
2978
2978
|
return {
|
|
2979
2979
|
...result,
|
|
2980
|
-
status
|
|
2980
|
+
status,
|
|
2981
|
+
data
|
|
2981
2982
|
};
|
|
2982
2983
|
} catch (error) {
|
|
2983
2984
|
console.error("Org wallet creation error", error);
|
|
2984
2985
|
return {
|
|
2985
2986
|
success: false,
|
|
2986
2987
|
message: "Error",
|
|
2987
|
-
status: "error"
|
|
2988
|
+
status: "error",
|
|
2989
|
+
data
|
|
2988
2990
|
};
|
|
2989
2991
|
}
|
|
2990
2992
|
},
|
package/package.json
CHANGED