@funkit/core 2.2.7 → 2.2.9

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.
@@ -0,0 +1,4 @@
1
+ import { ClientError } from '@funkit/utils';
2
+ export declare class InvalidActionError extends ClientError {
3
+ constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
4
+ }
@@ -1,4 +1 @@
1
- export * from './BaseError';
2
- export * from './ClientError';
3
- export * from './ServerError';
4
- export * from './types';
1
+ export * from './clientErrors';
@@ -1,4 +1,3 @@
1
- import { type MoonpayCurrency } from '@funkit/api-base';
2
1
  import { type Address, type Hex } from 'viem';
3
2
  import { FirstClassActions } from '../actions/FirstClassActions';
4
3
  import type { Auth } from '../auth';
@@ -110,24 +109,6 @@ export declare class FunWallet extends FirstClassActions {
110
109
  * @returns A Promise that resolves when the wallet is saved to the authentication system.
111
110
  */
112
111
  saveWalletToAuth(auth: Auth, txOptions?: EnvOption): Promise<void>;
113
- /**
114
- * Generates an on-ramp URL for the account address.
115
- * @param {Address} address - The account address (optional, defaults to the wallet's address).
116
- * @param {string} currencyCode - The currency code (optional, defaults to undefined to allow users to select).
117
- * @returns {Promise<string>} The on-ramp URL.
118
- */
119
- onRamp(address?: Address, currencyCode?: string): Promise<string>;
120
- /**
121
- * Generates an off-ramp URL for the account address.
122
- * @param {Address} address - The account address (optional, defaults to the wallet's address).
123
- * @returns {Promise<string>} The off-ramp URL.
124
- */
125
- offRamp(address?: Address): Promise<string>;
126
- /**
127
- * Retrieves the supported currencies for on-ramp.
128
- * @returns {Promise<MoonpayCurrency[]>} The supported currencies.
129
- */
130
- getSupportedCurrencies(): Promise<MoonpayCurrency[]>;
131
112
  /**
132
113
  * Creates a new operation to be associated with the wallet and prepares it for execution.
133
114
  * @param {Auth} auth - The authentication instance for the user.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/core",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "description": "Funkit core SDK provides feature-rich and extensible smart wallets built on account abstraction",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,8 @@
25
25
  "ethers": "5.7.2",
26
26
  "uuid": "^9.0.0",
27
27
  "viem": "2.17.0",
28
- "@funkit/api-base": "1.4.0"
28
+ "@funkit/api-base": "1.4.2",
29
+ "@funkit/utils": "1.0.3"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@types/big.js": "^6.2.2",
@@ -1,9 +0,0 @@
1
- export declare class BaseError extends Error {
2
- baseType: string;
3
- type: string;
4
- code: string;
5
- paramsUsed: any;
6
- timestamp: string;
7
- constructor(baseType: string, type: string, code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string, isInternal?: boolean);
8
- loadEnd(): void;
9
- }
@@ -1,22 +0,0 @@
1
- import { BaseError } from './BaseError';
2
- export declare class ClientError extends BaseError {
3
- constructor(type: string, code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
4
- }
5
- export declare class InvalidParameterError extends ClientError {
6
- constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
7
- }
8
- export declare class ResourceNotFoundError extends ClientError {
9
- constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
10
- }
11
- export declare class InvalidActionError extends ClientError {
12
- constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
13
- }
14
- export declare class ThrottlingError extends ClientError {
15
- constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
16
- }
17
- export declare class AccessDeniedError extends ClientError {
18
- constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
19
- }
20
- export declare class UserOpFailureError extends ClientError {
21
- constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
22
- }
@@ -1,7 +0,0 @@
1
- import { BaseError } from './BaseError';
2
- export declare class ServerError extends BaseError {
3
- constructor(type: string, code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
4
- }
5
- export declare class InternalFailureError extends ServerError {
6
- constructor(code: string, msg: string, paramsUsed: any, fixSuggestion: string, docLink: string);
7
- }
@@ -1,60 +0,0 @@
1
- export type ErrorData = {
2
- location: string;
3
- error?: {
4
- txDetails?: ErrorTransactionDetails;
5
- reasonData?: {
6
- title: string;
7
- reasons: string[];
8
- };
9
- };
10
- };
11
- export type ErrorTransactionDetails = {
12
- method: string;
13
- params: any[];
14
- contractAddress?: string;
15
- chainId?: number | string;
16
- };
17
- export declare enum ErrorBaseType {
18
- ClientError = "ClientError",
19
- ServerError = "ServerError"
20
- }
21
- export declare enum ErrorType {
22
- InvalidParameter = "InvalidParameter",
23
- InternalServerFailure = "InternalServerFailure",
24
- ResourceNotFound = "ResourceNotFound",
25
- InvalidAction = "InvalidAction",
26
- ThrottlingError = "ThrottlingError",
27
- AccessDeniedError = "AccessDeniedError",
28
- UserOpFailureError = "UserOpFailureError"
29
- }
30
- export declare enum ErrorCode {
31
- MissingParameter = "MissingParameter",
32
- InvalidParameter = "InvalidParameter",
33
- InvalidThreshold = "InvalidThreshold",
34
- InvalidChainIdentifier = "InvalidChainIdentifier",
35
- InvalidNFTIdentifier = "InvalidNFTIdentifier",
36
- InsufficientSignatures = "InsufficientSignatures",
37
- InvalidParameterCombination = "InvalidParameterCombination",
38
- CheckPointHintsNotFound = "CheckPointHintsNotFound",
39
- GroupNotFound = "GroupNotFound",
40
- TokenNotFound = "TokenNotFound",
41
- AddressNotFound = "AddressNotFound",
42
- UserAlreadyExists = "UserAlreadyExists",
43
- UserNotFound = "UserNotFound",
44
- ChainNotSupported = "ChainNotSupported",
45
- ServerMissingData = "ServerMissingData",
46
- ServerFailure = "ServerFailure",
47
- ServerTimeout = "ServerTimeout",
48
- UnknownServerError = "UnknownServerError",
49
- ServerConnectionError = "ServerConnectionError",
50
- UserOpFailureError = "UserOpFailureError",
51
- Unauthorized = "Unauthorized",
52
- RequestLimitExceeded = "RequestLimitExceeded",
53
- WalletPrefundError = "PrefundError",
54
- GasSponsorFundError = "GasSponsorFundError",
55
- FunWalletErrorCode = "FunWalletErrorCode",
56
- BridgeRouteNotFound = "BridgeRouteNotFound",
57
- BridgeAllowanceDataNotFound = "BridgeAllowanceDataNotFound",
58
- BridgeApproveTxDataNotFound = "BridgeApproveTxDataNotFound",
59
- CheckoutInitDepositAddrNotFound = "CheckoutInitDepositAddrNotFound"
60
- }