@dynamic-labs-sdk/react-hooks 1.20.0 → 1.21.2
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/exports/index.d.ts +9 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/hooks/wrappers/functions/useAddBusinessAccountMember/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useAddBusinessAccountMember/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useAddBusinessAccountMember/useAddBusinessAccountMember.d.ts +49 -0
- package/dist/hooks/wrappers/functions/useAddBusinessAccountMember/useAddBusinessAccountMember.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useAddBusinessAccountSigner/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useAddBusinessAccountSigner/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useAddBusinessAccountSigner/useAddBusinessAccountSigner.d.ts +52 -0
- package/dist/hooks/wrappers/functions/useAddBusinessAccountSigner/useAddBusinessAccountSigner.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useAddWalletToBusinessAccount/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useAddWalletToBusinessAccount/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useAddWalletToBusinessAccount/useAddWalletToBusinessAccount.d.ts +50 -0
- package/dist/hooks/wrappers/functions/useAddWalletToBusinessAccount/useAddWalletToBusinessAccount.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useCreateBusinessAccount/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useCreateBusinessAccount/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useCreateBusinessAccount/useCreateBusinessAccount.d.ts +45 -0
- package/dist/hooks/wrappers/functions/useCreateBusinessAccount/useCreateBusinessAccount.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useCreateWalletForBusinessAccount/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useCreateWalletForBusinessAccount/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useCreateWalletForBusinessAccount/useCreateWalletForBusinessAccount.d.ts +55 -0
- package/dist/hooks/wrappers/functions/useCreateWalletForBusinessAccount/useCreateWalletForBusinessAccount.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useGetBusinessAccount/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useGetBusinessAccount/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useGetBusinessAccount/useGetBusinessAccount.d.ts +42 -0
- package/dist/hooks/wrappers/functions/useGetBusinessAccount/useGetBusinessAccount.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useListBusinessAccounts/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useListBusinessAccounts/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useListBusinessAccounts/useListBusinessAccounts.d.ts +37 -0
- package/dist/hooks/wrappers/functions/useListBusinessAccounts/useListBusinessAccounts.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useRemoveBusinessAccountMember/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useRemoveBusinessAccountMember/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useRemoveBusinessAccountMember/useRemoveBusinessAccountMember.d.ts +46 -0
- package/dist/hooks/wrappers/functions/useRemoveBusinessAccountMember/useRemoveBusinessAccountMember.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useRemoveBusinessAccountSigner/index.d.ts +2 -0
- package/dist/hooks/wrappers/functions/useRemoveBusinessAccountSigner/index.d.ts.map +1 -0
- package/dist/hooks/wrappers/functions/useRemoveBusinessAccountSigner/useRemoveBusinessAccountSigner.d.ts +47 -0
- package/dist/hooks/wrappers/functions/useRemoveBusinessAccountSigner/useRemoveBusinessAccountSigner.d.ts.map +1 -0
- package/dist/index.cjs +216 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +209 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { removeBusinessAccountSigner } from '@dynamic-labs-sdk/client/waas';
|
|
2
|
+
import type { UseBaseMutationParams } from '../../../../foundation/useBaseMutation';
|
|
3
|
+
type RemoveBusinessAccountSignerVariables = Parameters<typeof removeBusinessAccountSigner>[0];
|
|
4
|
+
type RemoveBusinessAccountSignerResult = Awaited<ReturnType<typeof removeBusinessAccountSigner>>;
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for {@link useRemoveBusinessAccountSigner}: an optional override of the underlying
|
|
7
|
+
* react-query mutation options.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const params: UseRemoveBusinessAccountSignerParams = {
|
|
12
|
+
* mutateParams: { onSuccess: () => {} },
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
15
|
+
* @see useRemoveBusinessAccountSigner
|
|
16
|
+
* @see removeBusinessAccountSigner
|
|
17
|
+
*/
|
|
18
|
+
export type UseRemoveBusinessAccountSignerParams = {
|
|
19
|
+
/**
|
|
20
|
+
* Optional override of any react-query `UseMutationOptions`
|
|
21
|
+
* (`onSuccess`, `onError`, `retry`, etc.).
|
|
22
|
+
*/
|
|
23
|
+
mutateParams?: NonNullable<UseBaseMutationParams<RemoveBusinessAccountSignerResult, RemoveBusinessAccountSignerVariables>['mutateParams']>;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Wraps `removeBusinessAccountSigner` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)`
|
|
27
|
+
* to remove a signer from a business-account wallet (the backend refuses to remove the last signer).
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* const { mutate, isPending } = useRemoveBusinessAccountSigner();
|
|
32
|
+
* <button onClick={() => mutate({ businessAccountId, walletId, signerId })} disabled={isPending}>
|
|
33
|
+
* Remove signer
|
|
34
|
+
* </button>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @returns A react-query mutation whose `mutate`/`mutateAsync` calls `removeBusinessAccountSigner` and whose `data` is the removed signer.
|
|
38
|
+
* @see removeBusinessAccountSigner
|
|
39
|
+
* @see UseRemoveBusinessAccountSignerParams
|
|
40
|
+
*/
|
|
41
|
+
export declare const useRemoveBusinessAccountSigner: ({ mutateParams, }?: UseRemoveBusinessAccountSignerParams) => import("@tanstack/react-query").UseMutationResult<import("@dynamic-labs-sdk/client/waas").BusinessAccountSigner, Error, {
|
|
42
|
+
businessAccountId: string;
|
|
43
|
+
signerId: string;
|
|
44
|
+
walletId: string;
|
|
45
|
+
}>;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=useRemoveBusinessAccountSigner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRemoveBusinessAccountSigner.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/wrappers/functions/useRemoveBusinessAccountSigner/useRemoveBusinessAccountSigner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAGpF,KAAK,oCAAoC,GAAG,UAAU,CACpD,OAAO,2BAA2B,CACnC,CAAC,CAAC,CAAC,CAAC;AACL,KAAK,iCAAiC,GAAG,OAAO,CAC9C,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAC/C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD;;;OAGG;IACH,YAAY,CAAC,EAAE,WAAW,CACxB,qBAAqB,CACnB,iCAAiC,EACjC,oCAAoC,CACrC,CAAC,cAAc,CAAC,CAClB,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,8BAA8B,uBAExC,oCAAoC;;;;EAQnC,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ let _dynamic_labs_sdk_client_waas = require("@dynamic-labs-sdk/client/waas");
|
|
|
8
8
|
|
|
9
9
|
//#region package.json
|
|
10
10
|
var name = "@dynamic-labs-sdk/react-hooks";
|
|
11
|
-
var version = "1.
|
|
11
|
+
var version = "1.21.2";
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/modules/DynamicContext/DynamicContext.ts
|
|
@@ -299,6 +299,52 @@ const useGetActiveNetworkId = ({ queryParams, ...args }) => useBaseQuery({
|
|
|
299
299
|
queryParams
|
|
300
300
|
});
|
|
301
301
|
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region src/hooks/wrappers/functions/useAddBusinessAccountMember/useAddBusinessAccountMember.ts
|
|
304
|
+
/**
|
|
305
|
+
* Wraps `addBusinessAccountMember` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
|
|
306
|
+
* add a member to an existing business account.
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* ```tsx
|
|
310
|
+
* const { mutate, isPending } = useAddBusinessAccountMember();
|
|
311
|
+
* <button onClick={() => mutate({ businessAccountId, identifier: 'user@acme.com' })} disabled={isPending}>
|
|
312
|
+
* Add member
|
|
313
|
+
* </button>
|
|
314
|
+
* ```
|
|
315
|
+
*
|
|
316
|
+
* @returns A react-query mutation whose `mutate`/`mutateAsync` calls `addBusinessAccountMember` and whose `data` is its resolved value.
|
|
317
|
+
* @see addBusinessAccountMember
|
|
318
|
+
* @see UseAddBusinessAccountMemberParams
|
|
319
|
+
*/
|
|
320
|
+
const useAddBusinessAccountMember = ({ mutateParams } = {}) => useBaseMutation({
|
|
321
|
+
mutateParams,
|
|
322
|
+
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.addBusinessAccountMember)(variables, client)
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region src/hooks/wrappers/functions/useAddBusinessAccountSigner/useAddBusinessAccountSigner.ts
|
|
327
|
+
/**
|
|
328
|
+
* Wraps `addBusinessAccountSigner` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
|
|
329
|
+
* add a signer to a business-account wallet via the reshare ceremony.
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```tsx
|
|
333
|
+
* const { mutate, isPending } = useAddBusinessAccountSigner();
|
|
334
|
+
* <button onClick={() => mutate({ targetSignerIdentity, walletAccount })} disabled={isPending}>
|
|
335
|
+
* Add signer
|
|
336
|
+
* </button>
|
|
337
|
+
* ```
|
|
338
|
+
*
|
|
339
|
+
* @returns A react-query mutation whose `mutate`/`mutateAsync` calls `addBusinessAccountSigner` and whose `data` is its resolved value.
|
|
340
|
+
* @see addBusinessAccountSigner
|
|
341
|
+
* @see UseAddBusinessAccountSignerParams
|
|
342
|
+
*/
|
|
343
|
+
const useAddBusinessAccountSigner = ({ mutateParams } = {}) => useBaseMutation({
|
|
344
|
+
mutateParams,
|
|
345
|
+
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.addBusinessAccountSigner)(variables, client)
|
|
346
|
+
});
|
|
347
|
+
|
|
302
348
|
//#endregion
|
|
303
349
|
//#region src/hooks/wrappers/functions/useAddNetwork/useAddNetwork.ts
|
|
304
350
|
/**
|
|
@@ -320,6 +366,29 @@ const useAddNetwork = ({ mutateParams } = {}) => useBaseMutation({
|
|
|
320
366
|
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client.addNetwork)(variables, client)
|
|
321
367
|
});
|
|
322
368
|
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region src/hooks/wrappers/functions/useAddWalletToBusinessAccount/useAddWalletToBusinessAccount.ts
|
|
371
|
+
/**
|
|
372
|
+
* Wraps `addWalletToBusinessAccount` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
|
|
373
|
+
* link an existing wallet to a business account.
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* ```tsx
|
|
377
|
+
* const { mutate, isPending } = useAddWalletToBusinessAccount();
|
|
378
|
+
* <button onClick={() => mutate({ businessAccountId, walletId })} disabled={isPending}>
|
|
379
|
+
* Link wallet
|
|
380
|
+
* </button>
|
|
381
|
+
* ```
|
|
382
|
+
*
|
|
383
|
+
* @returns A react-query mutation whose `mutate`/`mutateAsync` calls `addWalletToBusinessAccount` and whose `data` is its resolved value.
|
|
384
|
+
* @see addWalletToBusinessAccount
|
|
385
|
+
* @see UseAddWalletToBusinessAccountParams
|
|
386
|
+
*/
|
|
387
|
+
const useAddWalletToBusinessAccount = ({ mutateParams } = {}) => useBaseMutation({
|
|
388
|
+
mutateParams,
|
|
389
|
+
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.addWalletToBusinessAccount)(variables, client)
|
|
390
|
+
});
|
|
391
|
+
|
|
323
392
|
//#endregion
|
|
324
393
|
//#region src/hooks/wrappers/functions/useAssertWalletAccountSigningAvailability/useAssertWalletAccountSigningAvailability.ts
|
|
325
394
|
/**
|
|
@@ -617,6 +686,27 @@ const useGetBalanceForAddress = ({ queryParams, ...args }) => useBaseQuery({
|
|
|
617
686
|
queryParams
|
|
618
687
|
});
|
|
619
688
|
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region src/hooks/wrappers/functions/useGetBusinessAccount/useGetBusinessAccount.ts
|
|
691
|
+
/**
|
|
692
|
+
* Wraps `getBusinessAccount` from `@dynamic-labs-sdk/client/waas`. Retrieves a business account by
|
|
693
|
+
* ID, including its members, signers, and wallets.
|
|
694
|
+
*
|
|
695
|
+
* @example
|
|
696
|
+
* ```tsx
|
|
697
|
+
* const { data: businessAccount, isLoading } = useGetBusinessAccount({ businessAccountId });
|
|
698
|
+
* ```
|
|
699
|
+
*
|
|
700
|
+
* @returns A react-query result whose `data` is the business account detail resolved by `getBusinessAccount`.
|
|
701
|
+
* @see getBusinessAccount
|
|
702
|
+
* @see UseGetBusinessAccountParams
|
|
703
|
+
*/
|
|
704
|
+
const useGetBusinessAccount = ({ queryParams, ...args }) => useBaseQuery({
|
|
705
|
+
queryFn: (client) => (0, _dynamic_labs_sdk_client_waas.getBusinessAccount)(args, client),
|
|
706
|
+
queryKey: ["useGetBusinessAccount", args],
|
|
707
|
+
queryParams
|
|
708
|
+
});
|
|
709
|
+
|
|
620
710
|
//#endregion
|
|
621
711
|
//#region src/hooks/wrappers/functions/useBroadcastFlow/useBroadcastFlow.ts
|
|
622
712
|
/**
|
|
@@ -943,6 +1033,29 @@ const useConnectWithWalletProvider = ({ mutateParams } = {}) => useBaseMutation(
|
|
|
943
1033
|
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client.connectWithWalletProvider)(variables, client)
|
|
944
1034
|
});
|
|
945
1035
|
|
|
1036
|
+
//#endregion
|
|
1037
|
+
//#region src/hooks/wrappers/functions/useCreateBusinessAccount/useCreateBusinessAccount.ts
|
|
1038
|
+
/**
|
|
1039
|
+
* Wraps `createBusinessAccount` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)` to
|
|
1040
|
+
* create a new business account.
|
|
1041
|
+
*
|
|
1042
|
+
* @example
|
|
1043
|
+
* ```tsx
|
|
1044
|
+
* const { mutate, isPending } = useCreateBusinessAccount();
|
|
1045
|
+
* <button onClick={() => mutate({ name: 'Acme' })} disabled={isPending}>
|
|
1046
|
+
* Create
|
|
1047
|
+
* </button>
|
|
1048
|
+
* ```
|
|
1049
|
+
*
|
|
1050
|
+
* @returns A react-query mutation whose `mutate`/`mutateAsync` calls `createBusinessAccount` and whose `data` is its resolved value.
|
|
1051
|
+
* @see createBusinessAccount
|
|
1052
|
+
* @see UseCreateBusinessAccountParams
|
|
1053
|
+
*/
|
|
1054
|
+
const useCreateBusinessAccount = ({ mutateParams } = {}) => useBaseMutation({
|
|
1055
|
+
mutateParams,
|
|
1056
|
+
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.createBusinessAccount)(variables, client)
|
|
1057
|
+
});
|
|
1058
|
+
|
|
946
1059
|
//#endregion
|
|
947
1060
|
//#region src/hooks/wrappers/functions/useCreateCoinbaseOnrampOrder/useCreateCoinbaseOnrampOrder.ts
|
|
948
1061
|
/**
|
|
@@ -1290,6 +1403,27 @@ const useGetKrakenWhitelistedAddresses = ({ queryParams } = {}) => useBaseQuery(
|
|
|
1290
1403
|
queryParams
|
|
1291
1404
|
});
|
|
1292
1405
|
|
|
1406
|
+
//#endregion
|
|
1407
|
+
//#region src/hooks/wrappers/functions/useListBusinessAccounts/useListBusinessAccounts.ts
|
|
1408
|
+
/**
|
|
1409
|
+
* Wraps `listBusinessAccounts` from `@dynamic-labs-sdk/client/waas`. Lists all business accounts for
|
|
1410
|
+
* the current project environment.
|
|
1411
|
+
*
|
|
1412
|
+
* @example
|
|
1413
|
+
* ```tsx
|
|
1414
|
+
* const { data: businessAccounts, isLoading } = useListBusinessAccounts();
|
|
1415
|
+
* ```
|
|
1416
|
+
*
|
|
1417
|
+
* @returns A react-query result whose `data` is the paginated list resolved by `listBusinessAccounts`.
|
|
1418
|
+
* @see listBusinessAccounts
|
|
1419
|
+
* @see UseListBusinessAccountsParams
|
|
1420
|
+
*/
|
|
1421
|
+
const useListBusinessAccounts = ({ queryParams } = {}) => useBaseQuery({
|
|
1422
|
+
queryFn: (client) => (0, _dynamic_labs_sdk_client_waas.listBusinessAccounts)(client),
|
|
1423
|
+
queryKey: ["useListBusinessAccounts"],
|
|
1424
|
+
queryParams
|
|
1425
|
+
});
|
|
1426
|
+
|
|
1293
1427
|
//#endregion
|
|
1294
1428
|
//#region src/hooks/wrappers/functions/useLogout/useLogout.ts
|
|
1295
1429
|
/**
|
|
@@ -1651,6 +1785,52 @@ const useRegisterTotpMfaDevice = ({ mutateParams } = {}) => useBaseMutation({
|
|
|
1651
1785
|
mutationFn: ({ client }) => (0, _dynamic_labs_sdk_client.registerTotpMfaDevice)(client)
|
|
1652
1786
|
});
|
|
1653
1787
|
|
|
1788
|
+
//#endregion
|
|
1789
|
+
//#region src/hooks/wrappers/functions/useRemoveBusinessAccountMember/useRemoveBusinessAccountMember.ts
|
|
1790
|
+
/**
|
|
1791
|
+
* Wraps `removeBusinessAccountMember` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)`
|
|
1792
|
+
* to remove a member from a business account (the backend refuses to remove the last owner).
|
|
1793
|
+
*
|
|
1794
|
+
* @example
|
|
1795
|
+
* ```tsx
|
|
1796
|
+
* const { mutate, isPending } = useRemoveBusinessAccountMember();
|
|
1797
|
+
* <button onClick={() => mutate({ businessAccountId, userId })} disabled={isPending}>
|
|
1798
|
+
* Remove member
|
|
1799
|
+
* </button>
|
|
1800
|
+
* ```
|
|
1801
|
+
*
|
|
1802
|
+
* @returns A react-query mutation whose `mutate`/`mutateAsync` calls `removeBusinessAccountMember` and whose `data` is the removed member.
|
|
1803
|
+
* @see removeBusinessAccountMember
|
|
1804
|
+
* @see UseRemoveBusinessAccountMemberParams
|
|
1805
|
+
*/
|
|
1806
|
+
const useRemoveBusinessAccountMember = ({ mutateParams } = {}) => useBaseMutation({
|
|
1807
|
+
mutateParams,
|
|
1808
|
+
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.removeBusinessAccountMember)(variables, client)
|
|
1809
|
+
});
|
|
1810
|
+
|
|
1811
|
+
//#endregion
|
|
1812
|
+
//#region src/hooks/wrappers/functions/useRemoveBusinessAccountSigner/useRemoveBusinessAccountSigner.ts
|
|
1813
|
+
/**
|
|
1814
|
+
* Wraps `removeBusinessAccountSigner` from `@dynamic-labs-sdk/client/waas`. Call `mutate(variables)`
|
|
1815
|
+
* to remove a signer from a business-account wallet (the backend refuses to remove the last signer).
|
|
1816
|
+
*
|
|
1817
|
+
* @example
|
|
1818
|
+
* ```tsx
|
|
1819
|
+
* const { mutate, isPending } = useRemoveBusinessAccountSigner();
|
|
1820
|
+
* <button onClick={() => mutate({ businessAccountId, walletId, signerId })} disabled={isPending}>
|
|
1821
|
+
* Remove signer
|
|
1822
|
+
* </button>
|
|
1823
|
+
* ```
|
|
1824
|
+
*
|
|
1825
|
+
* @returns A react-query mutation whose `mutate`/`mutateAsync` calls `removeBusinessAccountSigner` and whose `data` is the removed signer.
|
|
1826
|
+
* @see removeBusinessAccountSigner
|
|
1827
|
+
* @see UseRemoveBusinessAccountSignerParams
|
|
1828
|
+
*/
|
|
1829
|
+
const useRemoveBusinessAccountSigner = ({ mutateParams } = {}) => useBaseMutation({
|
|
1830
|
+
mutateParams,
|
|
1831
|
+
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.removeBusinessAccountSigner)(variables, client)
|
|
1832
|
+
});
|
|
1833
|
+
|
|
1654
1834
|
//#endregion
|
|
1655
1835
|
//#region src/hooks/wrappers/functions/useRemoveWalletAccount/useRemoveWalletAccount.ts
|
|
1656
1836
|
/**
|
|
@@ -2463,6 +2643,32 @@ const useCreateWaasWalletAccounts = ({ mutateParams } = {}) => useBaseMutation({
|
|
|
2463
2643
|
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.createWaasWalletAccounts)(variables, client)
|
|
2464
2644
|
});
|
|
2465
2645
|
|
|
2646
|
+
//#endregion
|
|
2647
|
+
//#region src/hooks/wrappers/functions/useCreateWalletForBusinessAccount/useCreateWalletForBusinessAccount.ts
|
|
2648
|
+
/**
|
|
2649
|
+
* Wraps `createWalletForBusinessAccount` from `@dynamic-labs-sdk/client/waas`. Call
|
|
2650
|
+
* `mutate(variables)` to create a WaaS wallet owned directly by a business account in one step.
|
|
2651
|
+
*
|
|
2652
|
+
* @example
|
|
2653
|
+
* ```tsx
|
|
2654
|
+
* const { mutate, isPending } = useCreateWalletForBusinessAccount();
|
|
2655
|
+
* <button
|
|
2656
|
+
* onClick={() => mutate({ businessAccountId: 'ba-1', chain: 'EVM' })}
|
|
2657
|
+
* disabled={isPending}
|
|
2658
|
+
* >
|
|
2659
|
+
* Create wallet
|
|
2660
|
+
* </button>
|
|
2661
|
+
* ```
|
|
2662
|
+
*
|
|
2663
|
+
* @returns A react-query mutation whose `mutate`/`mutateAsync` calls `createWalletForBusinessAccount` and whose `data` is its resolved value.
|
|
2664
|
+
* @see createWalletForBusinessAccount
|
|
2665
|
+
* @see UseCreateWalletForBusinessAccountParams
|
|
2666
|
+
*/
|
|
2667
|
+
const useCreateWalletForBusinessAccount = ({ mutateParams } = {}) => useBaseMutation({
|
|
2668
|
+
mutateParams,
|
|
2669
|
+
mutationFn: ({ client, variables }) => (0, _dynamic_labs_sdk_client_waas.createWalletForBusinessAccount)(variables, client)
|
|
2670
|
+
});
|
|
2671
|
+
|
|
2466
2672
|
//#endregion
|
|
2467
2673
|
//#region src/hooks/wrappers/functions/useDelegateWaasKeyShares/useDelegateWaasKeyShares.ts
|
|
2468
2674
|
/**
|
|
@@ -2796,8 +3002,11 @@ const useUser = () => useBaseState({
|
|
|
2796
3002
|
//#endregion
|
|
2797
3003
|
exports.DynamicProvider = DynamicProvider;
|
|
2798
3004
|
exports.useAcknowledgeRecoveryCodes = useAcknowledgeRecoveryCodes;
|
|
3005
|
+
exports.useAddBusinessAccountMember = useAddBusinessAccountMember;
|
|
3006
|
+
exports.useAddBusinessAccountSigner = useAddBusinessAccountSigner;
|
|
2799
3007
|
exports.useAddCoinbaseOnrampOrderEventListener = useAddCoinbaseOnrampOrderEventListener;
|
|
2800
3008
|
exports.useAddNetwork = useAddNetwork;
|
|
3009
|
+
exports.useAddWalletToBusinessAccount = useAddWalletToBusinessAccount;
|
|
2801
3010
|
exports.useAssertWalletAccountSigningAvailability = useAssertWalletAccountSigningAvailability;
|
|
2802
3011
|
exports.useAttachFlowSource = useAttachFlowSource;
|
|
2803
3012
|
exports.useAuthenticateMfaRecoveryCode = useAuthenticateMfaRecoveryCode;
|
|
@@ -2812,11 +3021,13 @@ exports.useCompleteSocialRedirect = useCompleteSocialRedirect;
|
|
|
2812
3021
|
exports.useConfirmTransaction = useConfirmTransaction;
|
|
2813
3022
|
exports.useConnectAndVerifyWithWalletProvider = useConnectAndVerifyWithWalletProvider;
|
|
2814
3023
|
exports.useConnectWithWalletProvider = useConnectWithWalletProvider;
|
|
3024
|
+
exports.useCreateBusinessAccount = useCreateBusinessAccount;
|
|
2815
3025
|
exports.useCreateCoinbaseOnrampOrder = useCreateCoinbaseOnrampOrder;
|
|
2816
3026
|
exports.useCreateCryptoDotComPayment = useCreateCryptoDotComPayment;
|
|
2817
3027
|
exports.useCreateKrakenExchangeTransfer = useCreateKrakenExchangeTransfer;
|
|
2818
3028
|
exports.useCreateNewMfaRecoveryCodes = useCreateNewMfaRecoveryCodes;
|
|
2819
3029
|
exports.useCreateWaasWalletAccounts = useCreateWaasWalletAccounts;
|
|
3030
|
+
exports.useCreateWalletForBusinessAccount = useCreateWalletForBusinessAccount;
|
|
2820
3031
|
exports.useDelegateWaasKeyShares = useDelegateWaasKeyShares;
|
|
2821
3032
|
exports.useDeleteMfaDevice = useDeleteMfaDevice;
|
|
2822
3033
|
exports.useDeletePasskey = useDeletePasskey;
|
|
@@ -2830,6 +3041,7 @@ exports.useGetActiveNetworkData = useGetActiveNetworkData;
|
|
|
2830
3041
|
exports.useGetActiveNetworkId = useGetActiveNetworkId;
|
|
2831
3042
|
exports.useGetAvailableWalletProvidersData = useGetAvailableWalletProvidersData;
|
|
2832
3043
|
exports.useGetBalanceForAddress = useGetBalanceForAddress;
|
|
3044
|
+
exports.useGetBusinessAccount = useGetBusinessAccount;
|
|
2833
3045
|
exports.useGetCoinbaseBuyUrl = useGetCoinbaseBuyUrl;
|
|
2834
3046
|
exports.useGetConnectedAddresses = useGetConnectedAddresses;
|
|
2835
3047
|
exports.useGetFlow = useGetFlow;
|
|
@@ -2864,6 +3076,7 @@ exports.useIsMfaRequiredForAction = useIsMfaRequiredForAction;
|
|
|
2864
3076
|
exports.useIsPendingRecoveryCodesAcknowledgment = useIsPendingRecoveryCodesAcknowledgment;
|
|
2865
3077
|
exports.useIsUserMissingMfaAuth = useIsUserMissingMfaAuth;
|
|
2866
3078
|
exports.useIsUserOnboardingComplete = useIsUserOnboardingComplete;
|
|
3079
|
+
exports.useListBusinessAccounts = useListBusinessAccounts;
|
|
2867
3080
|
exports.useLogout = useLogout;
|
|
2868
3081
|
exports.useMergeUserAccounts = useMergeUserAccounts;
|
|
2869
3082
|
exports.useMigrateFromFireblocks = useMigrateFromFireblocks;
|
|
@@ -2876,6 +3089,8 @@ exports.useRefreshAuth = useRefreshAuth;
|
|
|
2876
3089
|
exports.useRefreshWaasWalletAccountShares = useRefreshWaasWalletAccountShares;
|
|
2877
3090
|
exports.useRegisterPasskey = useRegisterPasskey;
|
|
2878
3091
|
exports.useRegisterTotpMfaDevice = useRegisterTotpMfaDevice;
|
|
3092
|
+
exports.useRemoveBusinessAccountMember = useRemoveBusinessAccountMember;
|
|
3093
|
+
exports.useRemoveBusinessAccountSigner = useRemoveBusinessAccountSigner;
|
|
2879
3094
|
exports.useRemoveWalletAccount = useRemoveWalletAccount;
|
|
2880
3095
|
exports.useRequestExternalAuthElevatedToken = useRequestExternalAuthElevatedToken;
|
|
2881
3096
|
exports.useRevokeAllRegisteredDevices = useRevokeAllRegisteredDevices;
|