@wirexapp/wpay-baas-sdk 0.1.7 → 0.1.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.
- package/README.md +32 -2
- package/dist/{chunk-Y7TGKAUA.js → chunk-D2YHFKQI.js} +3 -3
- package/dist/{chunk-Y7TGKAUA.js.map → chunk-D2YHFKQI.js.map} +1 -1
- package/dist/{chunk-BN5Q2YHP.js → chunk-NYDDEDPQ.js} +145 -13
- package/dist/chunk-NYDDEDPQ.js.map +1 -0
- package/dist/{chunk-C4OR7ZVY.js → chunk-YXNNTBO5.js} +3 -2
- package/dist/chunk-YXNNTBO5.js.map +1 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/{types-_VJ4UPM4.d.ts → crypto.module-BsI4pLhf.d.ts} +70 -52
- package/dist/{index-DETvmzdr.d.ts → index-3P-X9tLg.d.ts} +2 -2
- package/dist/index.d.ts +7 -7
- package/dist/index.js +6 -6
- package/dist/modules/api/index.d.ts +3 -3
- package/dist/modules/api/index.js +2 -2
- package/dist/modules/crypto/index.d.ts +32 -10
- package/dist/modules/crypto/index.js +3 -3
- package/dist/{types-IKGr4nyf.d.ts → types-_RME4STd.d.ts} +1 -1
- package/dist/{withdrawal.api-DsvQPbRN.d.ts → withdrawal.api-CmRHIoyc.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-BN5Q2YHP.js.map +0 -1
- package/dist/chunk-C4OR7ZVY.js.map +0 -1
|
@@ -201,6 +201,7 @@ var HttpClient = class {
|
|
|
201
201
|
// src/core/config/types.ts
|
|
202
202
|
var CONFIG_URLS = {
|
|
203
203
|
dev: "https://api-baas.wirexapp.tech/api/v1/config",
|
|
204
|
+
uat: "https://api-baas.wirexapp.tech/api/v1/config",
|
|
204
205
|
prod: "https://api-baas.wirexapp.com/api/v1/config"
|
|
205
206
|
};
|
|
206
207
|
|
|
@@ -299,5 +300,5 @@ _ConfigService.instance = null;
|
|
|
299
300
|
var ConfigService = _ConfigService;
|
|
300
301
|
|
|
301
302
|
export { AuthenticationError, ConfigService, ConfigurationError, ContractError, HttpClient, NetworkError, SDKError, TransactionError, ValidationError, WalletError, defaultLogger, silentLogger };
|
|
302
|
-
//# sourceMappingURL=chunk-
|
|
303
|
-
//# sourceMappingURL=chunk-
|
|
303
|
+
//# sourceMappingURL=chunk-YXNNTBO5.js.map
|
|
304
|
+
//# sourceMappingURL=chunk-YXNNTBO5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/types.ts","../src/core/errors.ts","../src/core/internal/http-client.ts","../src/core/config/types.ts","../src/core/config/config.service.ts"],"names":[],"mappings":";;;AAyEO,IAAM,aAAA,GAAwB;AAAA,EACnC,KAAA,EAAO,CAAC,OAAA,EAAA,GAAY,IAAA,KAAS,OAAA,CAAQ,MAAM,CAAA,MAAA,EAAS,OAAO,CAAA,CAAA,EAAI,GAAG,IAAI,CAAA;AAAA,EACtE,IAAA,EAAM,CAAC,OAAA,EAAA,GAAY,IAAA,KAAS,OAAA,CAAQ,KAAK,CAAA,MAAA,EAAS,OAAO,CAAA,CAAA,EAAI,GAAG,IAAI,CAAA;AAAA,EACpE,IAAA,EAAM,CAAC,OAAA,EAAA,GAAY,IAAA,KAAS,OAAA,CAAQ,KAAK,CAAA,MAAA,EAAS,OAAO,CAAA,CAAA,EAAI,GAAG,IAAI,CAAA;AAAA,EACpE,KAAA,EAAO,CAAC,OAAA,EAAA,GAAY,IAAA,KAAS,OAAA,CAAQ,MAAM,CAAA,MAAA,EAAS,OAAO,CAAA,CAAA,EAAI,GAAG,IAAI;AACxE;AAEO,IAAM,YAAA,GAAuB;AAAA,EAClC,OAAO,MAAM;AAAA,EAAC,CAAA;AAAA,EACd,MAAM,MAAM;AAAA,EAAC,CAAA;AAAA,EACb,MAAM,MAAM;AAAA,EAAC,CAAA;AAAA,EACb,OAAO,MAAM;AAAA,EAAC;AAChB;;;ACrFO,IAAM,QAAA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,OAAO,MAAM,CAAA,CAAE,KAAK,IAAI,CAAA;AAC5D,MAAA,MAAM,IAAI,kBAAA;AAAA,QACR,CAAA,MAAA,EAAS,OAAO,CAAA,wCAAA,EAA2C,eAAe,CAAA;AAAA,OAC5E;AAAA,IACF;AAEA,IAAA,OAAO,WAAA;AAAA,EACT;AAAA,EAEA,SAAA,GAAoB;AAClB,IAAA,OAAO,IAAA,CAAK,SAAA,EAAU,CAAE,GAAA,CAAI,MAAA;AAAA,EAC9B;AAAA,EAEA,cAAA,GAAyB;AACvB,IAAA,OAAO,IAAA,CAAK,SAAA,EAAU,CAAE,IAAA,CAAK,WAAA;AAAA,EAC/B;AAAA,EAEA,aAAA,GAAwB;AACtB,IAAA,OAAO,IAAA,CAAK,SAAA,EAAU,CAAE,IAAA,CAAK,UAAA;AAAA,EAC/B;AAAA,EAEA,mBAAA,GAA8B;AAC5B,IAAA,OAAO,IAAA,CAAK,WAAU,CAAE,gBAAA;AAAA,EAC1B;AAAA,EAEA,cAAA,GAAwC;AACtC,IAAA,OAAO,IAAA,CAAK,WAAA;AAAA,EACd;AACF,CAAA;AAvHa,cAAA,CACI,QAAA,GAAiC,IAAA;AAD3C,IAAM,aAAA,GAAN","file":"chunk-YXNNTBO5.js","sourcesContent":["import type { SDKEnvironment } from './config/index';\nimport type { HttpClient } from './internal/http-client';\nimport type { Chain as ViemChain } from 'viem';\n\nexport type Chain = ViemChain;\n\nexport interface MainWalletClient {\n address: `0x${string}`;\n getEthereumProvider(): Promise<unknown>;\n}\n\n/**\n * SDK configuration.\n * All chain/API values are fetched from remote config based on environment.\n */\nexport interface SDKConfig {\n /**\n * Environment: 'dev' or 'prod'. Selects the default remote-config URL\n * (`CONFIG_URLS[env]`). Used as the fallback when `configUrl` is not set.\n */\n env: SDKEnvironment;\n /**\n * Optional explicit remote-config URL. When set, it takes priority over `env`\n * and the config is fetched from this URL instead of the environment default.\n */\n configUrl?: string;\n /** Company ID (hex format without dashes, e.g., '0x...') */\n companyId: string;\n /**\n * Optional company name. When set, it is sent as the `X-Company-Name` header on the\n * remote-config fetch so the SDK resolves the chain/contracts/default company for that\n * company (e.g. \"Wirex One\" → Arc Testnet) instead of the default company's config.\n */\n companyName?: string;\n /** Function to get the main wallet client (e.g., from Privy) */\n getMainWalletClient: () => MainWalletClient | Promise<MainWalletClient>;\n /**\n * Optional Rhino.fi API key. Required only for smart deposit addresses\n * (`sdk.crypto.smartDepositAddress`). If omitted, accessing that service logs an error.\n */\n rhinoApiKey?: string;\n /** Enable logging. If false, no logs are written. Default: false */\n enableLogging?: boolean;\n /** Optional: Custom logger (used only if enableLogging is true) */\n logger?: Logger;\n}\n\n/**\n * Internal resolved configuration used by SDK modules.\n * Contains all values resolved from remote config + user overrides.\n */\nexport interface ResolvedSDKConfig {\n env: SDKEnvironment;\n chainId: number;\n chain: Chain;\n rpcUrl: string;\n bundlerRpc: string;\n paymasterRpc: string;\n contractRegistry: `0x${string}`;\n apiBaseUrl: string;\n rhinoApiKey?: string;\n companyId: string;\n logger: Logger;\n getMainWalletClient: () => MainWalletClient | Promise<MainWalletClient>;\n}\n\nexport interface Logger {\n debug(message: string, ...args: unknown[]): void;\n info(message: string, ...args: unknown[]): void;\n warn(message: string, ...args: unknown[]): void;\n error(message: string, ...args: unknown[]): void;\n}\n\nexport const defaultLogger: Logger = {\n debug: (message, ...args) => console.debug(`[SDK] ${message}`, ...args),\n info: (message, ...args) => console.info(`[SDK] ${message}`, ...args),\n warn: (message, ...args) => console.warn(`[SDK] ${message}`, ...args),\n error: (message, ...args) => console.error(`[SDK] ${message}`, ...args),\n};\n\nexport const silentLogger: Logger = {\n debug: () => {},\n info: () => {},\n warn: () => {},\n error: () => {},\n};\n\nexport interface TokenInfo {\n symbol: string;\n address: `0x${string}`;\n decimals: number;\n baseToken?: TokenInfo;\n isSynthetic: boolean;\n}\n\nexport interface ContractAddresses {\n accounts: `0x${string}`;\n corporateAccounts: `0x${string}`;\n tokenRegistry: `0x${string}`;\n processing: `0x${string}`;\n executionDelayPolicy: `0x${string}`;\n fundsManagement: `0x${string}`;\n fundsBuffer: `0x${string}`;\n syntheticRouter: `0x${string}`;\n yieldCalculator: `0x${string}`;\n cardsManagement: `0x${string}`;\n}\n\nexport type Hex = `0x${string}`;\n\nexport type TransactionHash = `0x${string}`;\n\nexport interface SDKModule {\n readonly name: string;\n initialize(): Promise<void>;\n isInitialized(): boolean;\n}\n\nexport interface ModuleContext {\n config: ResolvedSDKConfig;\n logger: Logger;\n httpClient: HttpClient;\n}\n","export class SDKError extends Error {\n public readonly code: string;\n public readonly cause?: Error;\n\n constructor(message: string, code: string, cause?: Error) {\n super(message);\n this.name = 'SDKError';\n this.code = code;\n this.cause = cause;\n Object.setPrototypeOf(this, SDKError.prototype);\n }\n}\n\nexport class ConfigurationError extends SDKError {\n constructor(message: string, cause?: Error) {\n super(message, 'CONFIGURATION_ERROR', cause);\n this.name = 'ConfigurationError';\n Object.setPrototypeOf(this, ConfigurationError.prototype);\n }\n}\n\nexport class NetworkError extends SDKError {\n public readonly statusCode?: number;\n\n constructor(message: string, statusCode?: number, cause?: Error) {\n super(message, 'NETWORK_ERROR', cause);\n this.name = 'NetworkError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, NetworkError.prototype);\n }\n}\n\nexport class ContractError extends SDKError {\n public readonly contractAddress?: string;\n\n constructor(message: string, contractAddress?: string, cause?: Error) {\n super(message, 'CONTRACT_ERROR', cause);\n this.name = 'ContractError';\n this.contractAddress = contractAddress;\n Object.setPrototypeOf(this, ContractError.prototype);\n }\n}\n\nexport class WalletError extends SDKError {\n constructor(message: string, cause?: Error) {\n super(message, 'WALLET_ERROR', cause);\n this.name = 'WalletError';\n Object.setPrototypeOf(this, WalletError.prototype);\n }\n}\n\nexport class TransactionError extends SDKError {\n public readonly transactionHash?: string;\n\n constructor(message: string, transactionHash?: string, cause?: Error) {\n super(message, 'TRANSACTION_ERROR', cause);\n this.name = 'TransactionError';\n this.transactionHash = transactionHash;\n Object.setPrototypeOf(this, TransactionError.prototype);\n }\n}\n\nexport class AuthenticationError extends SDKError {\n constructor(message: string, cause?: Error) {\n super(message, 'AUTHENTICATION_ERROR', cause);\n this.name = 'AuthenticationError';\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n}\n\nexport class ValidationError extends SDKError {\n public readonly field?: string;\n\n constructor(message: string, field?: string, cause?: Error) {\n super(message, 'VALIDATION_ERROR', cause);\n this.name = 'ValidationError';\n this.field = field;\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n","import axios, { type AxiosInstance, type AxiosResponse } from 'axios';\n\nimport { NetworkError, AuthenticationError } from '../errors';\n\nimport type { Logger } from '../types';\n\ndeclare module 'axios' {\n interface AxiosRequestConfig {\n requireAuth?: boolean;\n }\n interface InternalAxiosRequestConfig {\n requireAuth?: boolean;\n }\n}\n\nexport interface HttpClientConfig {\n baseUrl: string;\n chainId: number;\n logger?: Logger;\n getAccessToken?: () => string | null;\n isAuthenticated?: () => boolean;\n getUserWallet?: () => string | null;\n}\n\nexport interface RequestOptions {\n headers?: Record<string, string | undefined>;\n params?: Record<string, unknown>;\n timeout?: number;\n requireAuth?: boolean;\n}\n\nexport class HttpClient {\n private readonly client: AxiosInstance;\n private readonly logger?: Logger;\n private readonly getAccessToken?: () => string | null;\n private readonly isAuthenticated?: () => boolean;\n private readonly getUserWallet?: () => string | null;\n\n constructor(config: HttpClientConfig) {\n this.logger = config.logger;\n this.getAccessToken = config.getAccessToken;\n this.isAuthenticated = config.isAuthenticated;\n this.getUserWallet = config.getUserWallet;\n\n this.client = axios.create({\n baseURL: config.baseUrl,\n timeout: 30000,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Chain-Id': String(config.chainId),\n },\n });\n\n this.setupInterceptors();\n }\n\n private setupInterceptors(): void {\n this.client.interceptors.request.use(\n config => {\n const requireAuth = config.requireAuth !== false;\n\n if (requireAuth) {\n if (this.isAuthenticated && !this.isAuthenticated()) {\n throw new AuthenticationError('User is not authenticated. Please login first.');\n }\n\n if (this.getAccessToken) {\n const token = this.getAccessToken();\n if (token) {\n config.headers.Authorization = `Bearer ${token}`;\n }\n }\n\n if (this.getUserWallet) {\n const wallet = this.getUserWallet();\n if (wallet) {\n config.headers['X-User-Wallet'] = wallet;\n }\n }\n }\n\n this.logger?.debug(`Request: ${config.method?.toUpperCase()} ${config.url}`);\n return config;\n },\n error => {\n this.logger?.error('Request interceptor error', error);\n return Promise.reject(error);\n },\n );\n\n this.client.interceptors.response.use(\n response => {\n this.logger?.debug(`Response: ${response.status} ${response.config.url}`);\n return response;\n },\n error => {\n if (axios.isAxiosError(error)) {\n const status = error.response?.status;\n const message = error.response?.data?.message || error.message;\n\n this.logger?.error(`HTTP Error: ${status} - ${message}`);\n\n if (status === 401 || status === 403) {\n throw new AuthenticationError(message, error);\n }\n\n throw new NetworkError(message, status, error);\n }\n throw error;\n },\n );\n }\n\n async get<T>(url: string, options?: RequestOptions): Promise<T> {\n const response: AxiosResponse<T> = await this.client.get(url, {\n headers: options?.headers,\n params: options?.params,\n timeout: options?.timeout,\n requireAuth: options?.requireAuth,\n });\n return response.data;\n }\n\n async post<T>(url: string, data?: unknown, options?: RequestOptions): Promise<T> {\n const response: AxiosResponse<T> = await this.client.post(url, data, {\n headers: options?.headers,\n params: options?.params,\n timeout: options?.timeout,\n requireAuth: options?.requireAuth,\n });\n return response.data;\n }\n\n async put<T>(url: string, data?: unknown, options?: RequestOptions): Promise<T> {\n const response: AxiosResponse<T> = await this.client.put(url, data, {\n headers: options?.headers,\n params: options?.params,\n timeout: options?.timeout,\n requireAuth: options?.requireAuth,\n });\n return response.data;\n }\n\n async delete<T>(url: string, options?: RequestOptions): Promise<T> {\n const response: AxiosResponse<T> = await this.client.delete(url, {\n headers: options?.headers,\n params: options?.params,\n timeout: options?.timeout,\n requireAuth: options?.requireAuth,\n });\n return response.data;\n }\n\n async patch<T>(url: string, data?: unknown, options?: RequestOptions): Promise<T> {\n const response: AxiosResponse<T> = await this.client.patch(url, data, {\n headers: options?.headers,\n params: options?.params,\n timeout: options?.timeout,\n requireAuth: options?.requireAuth,\n });\n return response.data;\n }\n\n setHeader(name: string, value: string): void {\n this.client.defaults.headers.common[name] = value;\n }\n\n removeHeader(name: string): void {\n delete this.client.defaults.headers.common[name];\n }\n}\n","export type SDKEnvironment = 'dev' | 'uat' | 'prod';\n\nexport interface ChainConfig {\n id: number;\n name: string;\n contractRegistry: `0x${string}`;\n blockExplorerUrl: string;\n bridgeUrl: string;\n rpcUrl: string;\n rpcWsUrl: string;\n bundlerUrl: string;\n paymasterUrl: string;\n}\n\nexport interface RemoteConfig {\n auth: {\n privyAppId: string;\n privyClientId: string;\n crossmintAppId: string;\n crossmintApiKey: string;\n googleApiKey: string;\n rhinoApiKey: string;\n };\n api: {\n socketIo: string;\n apiUrl: string;\n };\n support: {\n chatUrl: string;\n widgetId: string;\n };\n analytics: {\n googleTagManagerId: string;\n googleAnalyticsId: string;\n amplitudeApiKey: string;\n };\n defaultChain: ChainConfig;\n defaultCompanyId: string;\n chains: Record<string, ChainConfig>;\n}\n\nexport const CONFIG_URLS: Record<SDKEnvironment, string> = {\n dev: 'https://api-baas.wirexapp.tech/api/v1/config',\n uat: 'https://api-baas.wirexapp.tech/api/v1/config',\n prod: 'https://api-baas.wirexapp.com/api/v1/config',\n};\n","import { CONFIG_URLS } from './types';\nimport { ConfigurationError } from '../errors';\n\nimport type { SDKEnvironment, RemoteConfig, ChainConfig } from './types';\n\nexport class ConfigService {\n private static instance: ConfigService | null = null;\n private config: RemoteConfig | null = null;\n private environment: SDKEnvironment | null = null;\n private companyName: string | undefined = undefined;\n private configUrl: string | undefined = undefined;\n\n private constructor() {}\n\n static getInstance(): ConfigService {\n if (!ConfigService.instance) {\n ConfigService.instance = new ConfigService();\n }\n return ConfigService.instance;\n }\n\n static resetInstance(): void {\n ConfigService.instance = null;\n }\n\n /**\n * Loads the remote config.\n *\n * The config URL is resolved with `configUrl` taking priority over the\n * environment-based URL: an explicit `configUrl` wins, otherwise the URL is\n * derived from `env` (`CONFIG_URLS[env]`).\n */\n async loadConfig(\n env: SDKEnvironment,\n companyName?: string,\n configUrl?: string,\n ): Promise<RemoteConfig> {\n if (\n this.config &&\n this.environment === env &&\n this.companyName === companyName &&\n this.configUrl === configUrl\n ) {\n return this.config;\n }\n\n const url = configUrl ?? CONFIG_URLS[env];\n const headers: Record<string, string> = {};\n if (companyName) headers['X-Company-Name'] = companyName;\n const maxAttempts = 2;\n let lastError: Error | null = null;\n\n for (let attempt = 1; attempt <= maxAttempts; attempt++) {\n try {\n const response = await fetch(url, { headers });\n\n if (!response.ok) {\n throw new ConfigurationError(`Failed to fetch config: ${response.statusText}`);\n }\n\n this.config = (await response.json()) as RemoteConfig;\n this.environment = env;\n this.companyName = companyName;\n this.configUrl = configUrl;\n\n return this.config!;\n } catch (error) {\n lastError = error as Error;\n\n if (attempt < maxAttempts) {\n continue;\n }\n }\n }\n\n throw new ConfigurationError(\n `Failed to load SDK config after ${maxAttempts} attempts: ${lastError?.message}`,\n );\n }\n\n getConfig(): RemoteConfig {\n if (!this.config) {\n throw new ConfigurationError('Config not loaded. Call loadConfig() first.');\n }\n return this.config;\n }\n\n getChainConfig(chainId?: number): ChainConfig {\n const config = this.getConfig();\n\n if (!chainId) {\n return config.defaultChain;\n }\n\n const chainConfig = config.chains[String(chainId)];\n if (!chainConfig) {\n const availableChains = Object.keys(config.chains).join(', ');\n throw new ConfigurationError(\n `Chain ${chainId} not found in config. Available chains: ${availableChains}`,\n );\n }\n\n return chainConfig;\n }\n\n getApiUrl(): string {\n return this.getConfig().api.apiUrl;\n }\n\n getRhinoApiKey(): string {\n return this.getConfig().auth.rhinoApiKey;\n }\n\n getPrivyAppId(): string {\n return this.getConfig().auth.privyAppId;\n }\n\n getDefaultCompanyId(): string {\n return this.getConfig().defaultCompanyId;\n }\n\n getEnvironment(): SDKEnvironment | null {\n return this.environment;\n }\n}\n"]}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SDKEnvironment, R as RemoteConfig, C as ChainConfig } from '../types-
|
|
2
|
-
export { a as Chain, b as ContractAddresses, H as Hex, c as HttpClient, d as HttpClientConfig, L as Logger, M as MainWalletClient, e as ModuleContext, f as RequestOptions, g as ResolvedSDKConfig, h as SDKConfig, i as SDKModule, T as TokenInfo, j as TransactionHash, k as defaultLogger, s as silentLogger } from '../types-
|
|
1
|
+
import { S as SDKEnvironment, R as RemoteConfig, C as ChainConfig } from '../types-_RME4STd.js';
|
|
2
|
+
export { a as Chain, b as ContractAddresses, H as Hex, c as HttpClient, d as HttpClientConfig, L as Logger, M as MainWalletClient, e as ModuleContext, f as RequestOptions, g as ResolvedSDKConfig, h as SDKConfig, i as SDKModule, T as TokenInfo, j as TransactionHash, k as defaultLogger, s as silentLogger } from '../types-_RME4STd.js';
|
|
3
3
|
export { A as AuthenticationError, C as ConfigurationError, a as ContractError, N as NetworkError, S as SDKError, T as TransactionError, V as ValidationError, W as WalletError } from '../errors-5LpyK95R.js';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
package/dist/core/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AuthenticationError, ConfigService, ConfigurationError, ContractError, HttpClient, NetworkError, SDKError, TransactionError, ValidationError, WalletError, defaultLogger, silentLogger } from '../chunk-
|
|
1
|
+
export { AuthenticationError, ConfigService, ConfigurationError, ContractError, HttpClient, NetworkError, SDKError, TransactionError, ValidationError, WalletError, defaultLogger, silentLogger } from '../chunk-YXNNTBO5.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,15 +1,68 @@
|
|
|
1
1
|
import { KernelAccountClient } from '@zerodev/sdk';
|
|
2
2
|
import { WalletClient, PublicClient, HttpTransport } from 'viem';
|
|
3
|
-
import {
|
|
4
|
-
import { W as WithdrawalApi, I as ICryptoService } from './withdrawal.api-
|
|
3
|
+
import { H as Hex, j as TransactionHash, b as ContractAddresses, T as TokenInfo, M as MainWalletClient, a as Chain, L as Logger, i as SDKModule, e as ModuleContext } from './types-_RME4STd.js';
|
|
4
|
+
import { W as WithdrawalApi, I as ICryptoService } from './withdrawal.api-CmRHIoyc.js';
|
|
5
5
|
import { WaitForUserOperationReceiptReturnType } from 'viem/account-abstraction';
|
|
6
6
|
|
|
7
|
+
/** A single call inside a UserOp batch, as accepted by `account.encodeCalls`. */
|
|
8
|
+
interface CallData {
|
|
9
|
+
to: Hex;
|
|
10
|
+
value: bigint;
|
|
11
|
+
data: Hex;
|
|
12
|
+
}
|
|
13
|
+
interface TransferRequest {
|
|
14
|
+
to: Hex;
|
|
15
|
+
amount: string;
|
|
16
|
+
token: string;
|
|
17
|
+
}
|
|
18
|
+
interface TransferResult {
|
|
19
|
+
transactionHash: TransactionHash;
|
|
20
|
+
status: 'success' | 'pending' | 'failed';
|
|
21
|
+
}
|
|
22
|
+
interface BatchTransferItem {
|
|
23
|
+
to: Hex;
|
|
24
|
+
amount: string;
|
|
25
|
+
token: string;
|
|
26
|
+
guid: string;
|
|
27
|
+
}
|
|
28
|
+
interface BatchTransferResult {
|
|
29
|
+
transactionHashes: TransactionHash[];
|
|
30
|
+
successCount: number;
|
|
31
|
+
failedCount: number;
|
|
32
|
+
}
|
|
33
|
+
interface YieldData {
|
|
34
|
+
tokenSymbol: string;
|
|
35
|
+
apy: string;
|
|
36
|
+
currentYield: string;
|
|
37
|
+
weeklyYield: string;
|
|
38
|
+
lifetimeYield: string;
|
|
39
|
+
}
|
|
40
|
+
interface YieldGraphicDataPoint {
|
|
41
|
+
timestamp: number;
|
|
42
|
+
value: string;
|
|
43
|
+
}
|
|
44
|
+
interface AccountStatus {
|
|
45
|
+
isRegistered: boolean;
|
|
46
|
+
address: Hex;
|
|
47
|
+
}
|
|
48
|
+
interface PolicyStatus {
|
|
49
|
+
isPolicyInstalled: boolean;
|
|
50
|
+
isExecutorInstalled: boolean;
|
|
51
|
+
}
|
|
52
|
+
interface CryptoModuleState {
|
|
53
|
+
initialized: boolean;
|
|
54
|
+
contracts: ContractAddresses | null;
|
|
55
|
+
tokens: TokenInfo[];
|
|
56
|
+
}
|
|
57
|
+
|
|
7
58
|
interface IAccountAbstractionService {
|
|
8
59
|
isExecutorInstalled(): Promise<boolean>;
|
|
9
60
|
isPolicyInstalled(): Promise<boolean>;
|
|
10
61
|
signInPolicyAndExecutor(): Promise<any>;
|
|
11
62
|
signInPolicy(): Promise<any>;
|
|
12
63
|
signInExecutor(): Promise<any>;
|
|
64
|
+
getExecutorInstallCall(): Promise<CallData>;
|
|
65
|
+
getPolicyInstallCall(): Promise<CallData>;
|
|
13
66
|
}
|
|
14
67
|
|
|
15
68
|
interface IYieldData {
|
|
@@ -35,18 +88,25 @@ interface IAccountContractService {
|
|
|
35
88
|
isWalletInCorporateAccounts(): Promise<boolean>;
|
|
36
89
|
registerInAccounts(): Promise<WaitForUserOperationReceiptReturnType>;
|
|
37
90
|
registerInCorporateAccounts(): Promise<WaitForUserOperationReceiptReturnType>;
|
|
91
|
+
getAccountRegistrationCall(): Promise<CallData>;
|
|
38
92
|
}
|
|
39
93
|
|
|
94
|
+
interface IOnboardingService {
|
|
95
|
+
allInOneStepOnboarding(): Promise<WaitForUserOperationReceiptReturnType>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
interface SendUserOperationConfig {
|
|
99
|
+
waitOnChainBlocks?: number;
|
|
100
|
+
applyUnwrapGasFloor?: boolean;
|
|
101
|
+
}
|
|
40
102
|
interface IWalletService {
|
|
41
103
|
getSmartWalletClientWithoutPolicy(): Promise<KernelAccountClient>;
|
|
42
104
|
getSmartWalletClient(): Promise<KernelAccountClient>;
|
|
43
105
|
getSmartAccountSigner(): Promise<WalletClient>;
|
|
44
106
|
getSmartWalletAddress(): Promise<`0x${string}`>;
|
|
45
107
|
getMainWalletClient(): Promise<MainWalletClient>;
|
|
46
|
-
sendUserOperationsAndWaitReceipt(callData: any, smartWalletClient?: KernelAccountClient, config?:
|
|
47
|
-
|
|
48
|
-
}): Promise<any>;
|
|
49
|
-
sendUserOperationsWithNonceAndWaitReceipt(callData: any, nonce: bigint): Promise<any>;
|
|
108
|
+
sendUserOperationsAndWaitReceipt(callData: any, smartWalletClient?: KernelAccountClient, config?: SendUserOperationConfig): Promise<any>;
|
|
109
|
+
sendUserOperationsWithNonceAndWaitReceipt(callData: any, nonce: bigint, config?: SendUserOperationConfig): Promise<any>;
|
|
50
110
|
invalidateLocalCache(): void;
|
|
51
111
|
}
|
|
52
112
|
interface ChainServiceConfig {
|
|
@@ -69,6 +129,7 @@ interface ChainServicesFactory {
|
|
|
69
129
|
createCryptoService(config: ChainServiceConfig, walletService: IWalletService, tokens: TokenInfo[]): ICryptoService;
|
|
70
130
|
createYieldService(config: ChainServiceConfig, walletService: IWalletService, tokens: TokenInfo[]): IYieldService;
|
|
71
131
|
createAccountContractService(config: ChainServiceConfig, walletService: IWalletService): IAccountContractService;
|
|
132
|
+
createOnboardingService(config: ChainServiceConfig, walletService: IWalletService, accountAbstractionService: IAccountAbstractionService, accountContractService: IAccountContractService): IOnboardingService;
|
|
72
133
|
}
|
|
73
134
|
|
|
74
135
|
interface IDepositAddressData {
|
|
@@ -111,6 +172,7 @@ declare class CryptoModule implements SDKModule {
|
|
|
111
172
|
private _cryptoService?;
|
|
112
173
|
private _yieldService?;
|
|
113
174
|
private _accountContractService?;
|
|
175
|
+
private _onboardingService?;
|
|
114
176
|
private _smartDepositService?;
|
|
115
177
|
private _contracts?;
|
|
116
178
|
private _tokens;
|
|
@@ -126,6 +188,7 @@ declare class CryptoModule implements SDKModule {
|
|
|
126
188
|
get transfer(): ICryptoService;
|
|
127
189
|
get yield(): IYieldService;
|
|
128
190
|
get accountContract(): IAccountContractService;
|
|
191
|
+
get onboarding(): IOnboardingService;
|
|
129
192
|
get smartDepositAddress(): SmartDepositAddressesService;
|
|
130
193
|
get contracts(): ContractAddresses | undefined;
|
|
131
194
|
get tokens(): TokenInfo[];
|
|
@@ -137,49 +200,4 @@ declare class CryptoModule implements SDKModule {
|
|
|
137
200
|
getToken(symbol: string): TokenInfo | undefined;
|
|
138
201
|
}
|
|
139
202
|
|
|
140
|
-
|
|
141
|
-
to: Hex;
|
|
142
|
-
amount: string;
|
|
143
|
-
token: string;
|
|
144
|
-
}
|
|
145
|
-
interface TransferResult {
|
|
146
|
-
transactionHash: TransactionHash;
|
|
147
|
-
status: 'success' | 'pending' | 'failed';
|
|
148
|
-
}
|
|
149
|
-
interface BatchTransferItem {
|
|
150
|
-
to: Hex;
|
|
151
|
-
amount: string;
|
|
152
|
-
token: string;
|
|
153
|
-
guid: string;
|
|
154
|
-
}
|
|
155
|
-
interface BatchTransferResult {
|
|
156
|
-
transactionHashes: TransactionHash[];
|
|
157
|
-
successCount: number;
|
|
158
|
-
failedCount: number;
|
|
159
|
-
}
|
|
160
|
-
interface YieldData {
|
|
161
|
-
tokenSymbol: string;
|
|
162
|
-
apy: string;
|
|
163
|
-
currentYield: string;
|
|
164
|
-
weeklyYield: string;
|
|
165
|
-
lifetimeYield: string;
|
|
166
|
-
}
|
|
167
|
-
interface YieldGraphicDataPoint {
|
|
168
|
-
timestamp: number;
|
|
169
|
-
value: string;
|
|
170
|
-
}
|
|
171
|
-
interface AccountStatus {
|
|
172
|
-
isRegistered: boolean;
|
|
173
|
-
address: Hex;
|
|
174
|
-
}
|
|
175
|
-
interface PolicyStatus {
|
|
176
|
-
isPolicyInstalled: boolean;
|
|
177
|
-
isExecutorInstalled: boolean;
|
|
178
|
-
}
|
|
179
|
-
interface CryptoModuleState {
|
|
180
|
-
initialized: boolean;
|
|
181
|
-
contracts: ContractAddresses | null;
|
|
182
|
-
tokens: TokenInfo[];
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export { type AccountStatus as A, type BatchTransferItem as B, CryptoModule as C, type IWalletService as I, type PolicyStatus as P, type TransferRequest as T, type YieldData as Y, type BatchTransferResult as a, type TransferResult as b, type YieldGraphicDataPoint as c, type ChainServiceConfig as d, type IAccountAbstractionService as e, type IYieldService as f, type IYieldData as g, type IYieldGraphicData as h, type IAccountContractService as i, type ChainServicesFactory as j, type CryptoModuleState as k };
|
|
203
|
+
export { type AccountStatus as A, type BatchTransferItem as B, CryptoModule as C, type IWalletService as I, type PolicyStatus as P, type SendUserOperationConfig as S, type TransferRequest as T, type YieldData as Y, type BatchTransferResult as a, type CallData as b, type TransferResult as c, type YieldGraphicDataPoint as d, type ChainServiceConfig as e, type IAccountAbstractionService as f, type IYieldService as g, type IYieldData as h, type IYieldGraphicData as i, type IAccountContractService as j, type IOnboardingService as k, type ChainServicesFactory as l, type CryptoModuleState as m };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as HttpClient, L as Logger, i as SDKModule, e as ModuleContext } from './types-
|
|
2
|
-
import { W as WithdrawalApi } from './withdrawal.api-
|
|
1
|
+
import { c as HttpClient, L as Logger, i as SDKModule, e as ModuleContext } from './types-_RME4STd.js';
|
|
2
|
+
import { W as WithdrawalApi } from './withdrawal.api-CmRHIoyc.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Activity Feed endpoints - Types match API spec
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { C as CryptoModule } from './
|
|
2
|
-
export { A as AccountStatus, B as BatchTransferItem, a as BatchTransferResult, P as PolicyStatus, T as TransferRequest,
|
|
3
|
-
import { g as ResolvedSDKConfig, i as SDKModule, h as SDKConfig } from './types-
|
|
4
|
-
export { b as ContractAddresses, H as Hex, L as Logger, M as MainWalletClient, e as ModuleContext, S as SDKEnvironment, T as TokenInfo, j as TransactionHash, k as defaultLogger } from './types-
|
|
5
|
-
import { A as ApiModule, a as AuthService } from './index-
|
|
6
|
-
export { b as ActionConfirmationCreateSmsRequest, c as ActionConfirmationCreateTokenRequest, d as ActionConfirmationSmsSessionResponse, e as ActionConfirmationVerifySmsRequest, f as ActionTokenResponse, g as ActivateBankAccountRequest, h as AuthResponse, i as AuthorizeUserResponse, B as BaasModule, W as BaasWalletBalance, C as CardActivateRequestBody, j as CardDetailsGetCvvRequestBody, k as CardDetailsGetDetailsRequestBody, l as CardDetailsGetPinRequestBody, m as CardFeesCreateInvoiceRequestBody, n as CardIssuePlasticRequest, o as CardIssueVirtualRequest, p as CardLimitChangeRequestBody, q as CardNameChangeRequestBody, r as CardTransactionResponse, s as CardTransactionsResponse, t as CardTransferEstimateRequest, u as CardTransferExecuteRequest, v as CardWithdrawalEstimateRequestBody, w as CardWithdrawalExecuteRequestBody, x as ConfirmPhoneNumberRequest, y as ConfirmationActionType, z as CorridorEstimateRequest, D as CorridorTransferRequest, E as CreateUserRequest, F as EstimateTransferRequest, G as ExecuteTransferRequest, H as GetActivityByIdRequest, I as GetActivityFeedRequest, J as GetBankAccountsRequest, K as GetCardTransactionsRequest, L as GetCardsRequest, M as GetFullStatementRequest, N as GetRatesRequest, O as GetRecipientsByCatalogRequest, P as GetRecipientsByCurrencyRequest, Q as GetRecipientsByNameRequest, R as GetRecipientsByTypeRequest, S as GetRecipientsRequest, T as GetSharingTokenResponse, U as GetVerificationTokenResponse, V as GetWalletRequest, X as InitialData, Y as LoginCompanyParams, Z as LoginUserParams, _ as OAuth2TokenRequest, $ as OAuth2TokenResponse, a0 as PrivyAuth, a1 as RatesResponse, a2 as RecipientCreateDetailsRequestBody, a3 as RecipientCreateRequest, a4 as RecipientCreateRequestV2, a5 as RecipientDetailsType, a6 as RecipientPaymentDetailsAch, a7 as RecipientPaymentDetailsBiFast, a8 as RecipientPaymentDetailsCard, a9 as RecipientPaymentDetailsCrypto, aa as RecipientPaymentDetailsFasterPayment, ab as RecipientPaymentDetailsFpsHk, ac as RecipientPaymentDetailsImps, ad as RecipientPaymentDetailsInstapay, ae as RecipientPaymentDetailsIpp, af as RecipientPaymentDetailsLegalAddress, ag as RecipientPaymentDetailsNip, ah as RecipientPaymentDetailsPix, ai as RecipientPaymentDetailsPse, aj as RecipientPaymentDetailsResponse, ak as RecipientPaymentDetailsSepa, al as RecipientPaymentDetailsSpei, am as RecipientPaymentDetailsSwift, an as RecipientPersonalInfo, ao as RecipientResponse, ap as RecipientSortOrder, aq as RecipientUpdateDetailsRequestBody, ar as RecipientUpdateRequestBody, as as RecipientsResponse, at as RegisterCompanyParams, au as RegisterUserParams, av as RegisterUserResponse, aw as RequestedErcWithdrawalResponse, ax as RequestedErcWithdrawalsResponse, ay as ResidenceAddress, az as SendVerificationLinkRequest, aA as SwapEstimateRequest, aB as SwapEstimateRequestByDestinationAmount, aC as SwapEstimateRequestBySourceAmount, aD as SwapEstimateResponse, aE as SwapExecuteRequest, aF as SwapExecuteResponse, aG as TokenResponse, aH as UpdateFreshdeskIdRequest, aI as UpdatePhoneNumberRequest, aJ as UserDescriptor, aK as UserProfile, aL as ValidateUserParams, aM as ValidateUserResponse, aN as VerifyTokenRequest, aO as VerifyTokenResponse, aP as WalletCreateGlobalRequest, aQ as WalletResponse, aR as WalletStatus, aS as WalletType } from './index-
|
|
1
|
+
import { C as CryptoModule } from './crypto.module-BsI4pLhf.js';
|
|
2
|
+
export { A as AccountStatus, B as BatchTransferItem, a as BatchTransferResult, b as CallData, P as PolicyStatus, T as TransferRequest, c as TransferResult, Y as YieldData, d as YieldGraphicDataPoint } from './crypto.module-BsI4pLhf.js';
|
|
3
|
+
import { g as ResolvedSDKConfig, i as SDKModule, h as SDKConfig } from './types-_RME4STd.js';
|
|
4
|
+
export { b as ContractAddresses, H as Hex, L as Logger, M as MainWalletClient, e as ModuleContext, S as SDKEnvironment, T as TokenInfo, j as TransactionHash, k as defaultLogger } from './types-_RME4STd.js';
|
|
5
|
+
import { A as ApiModule, a as AuthService } from './index-3P-X9tLg.js';
|
|
6
|
+
export { b as ActionConfirmationCreateSmsRequest, c as ActionConfirmationCreateTokenRequest, d as ActionConfirmationSmsSessionResponse, e as ActionConfirmationVerifySmsRequest, f as ActionTokenResponse, g as ActivateBankAccountRequest, h as AuthResponse, i as AuthorizeUserResponse, B as BaasModule, W as BaasWalletBalance, C as CardActivateRequestBody, j as CardDetailsGetCvvRequestBody, k as CardDetailsGetDetailsRequestBody, l as CardDetailsGetPinRequestBody, m as CardFeesCreateInvoiceRequestBody, n as CardIssuePlasticRequest, o as CardIssueVirtualRequest, p as CardLimitChangeRequestBody, q as CardNameChangeRequestBody, r as CardTransactionResponse, s as CardTransactionsResponse, t as CardTransferEstimateRequest, u as CardTransferExecuteRequest, v as CardWithdrawalEstimateRequestBody, w as CardWithdrawalExecuteRequestBody, x as ConfirmPhoneNumberRequest, y as ConfirmationActionType, z as CorridorEstimateRequest, D as CorridorTransferRequest, E as CreateUserRequest, F as EstimateTransferRequest, G as ExecuteTransferRequest, H as GetActivityByIdRequest, I as GetActivityFeedRequest, J as GetBankAccountsRequest, K as GetCardTransactionsRequest, L as GetCardsRequest, M as GetFullStatementRequest, N as GetRatesRequest, O as GetRecipientsByCatalogRequest, P as GetRecipientsByCurrencyRequest, Q as GetRecipientsByNameRequest, R as GetRecipientsByTypeRequest, S as GetRecipientsRequest, T as GetSharingTokenResponse, U as GetVerificationTokenResponse, V as GetWalletRequest, X as InitialData, Y as LoginCompanyParams, Z as LoginUserParams, _ as OAuth2TokenRequest, $ as OAuth2TokenResponse, a0 as PrivyAuth, a1 as RatesResponse, a2 as RecipientCreateDetailsRequestBody, a3 as RecipientCreateRequest, a4 as RecipientCreateRequestV2, a5 as RecipientDetailsType, a6 as RecipientPaymentDetailsAch, a7 as RecipientPaymentDetailsBiFast, a8 as RecipientPaymentDetailsCard, a9 as RecipientPaymentDetailsCrypto, aa as RecipientPaymentDetailsFasterPayment, ab as RecipientPaymentDetailsFpsHk, ac as RecipientPaymentDetailsImps, ad as RecipientPaymentDetailsInstapay, ae as RecipientPaymentDetailsIpp, af as RecipientPaymentDetailsLegalAddress, ag as RecipientPaymentDetailsNip, ah as RecipientPaymentDetailsPix, ai as RecipientPaymentDetailsPse, aj as RecipientPaymentDetailsResponse, ak as RecipientPaymentDetailsSepa, al as RecipientPaymentDetailsSpei, am as RecipientPaymentDetailsSwift, an as RecipientPersonalInfo, ao as RecipientResponse, ap as RecipientSortOrder, aq as RecipientUpdateDetailsRequestBody, ar as RecipientUpdateRequestBody, as as RecipientsResponse, at as RegisterCompanyParams, au as RegisterUserParams, av as RegisterUserResponse, aw as RequestedErcWithdrawalResponse, ax as RequestedErcWithdrawalsResponse, ay as ResidenceAddress, az as SendVerificationLinkRequest, aA as SwapEstimateRequest, aB as SwapEstimateRequestByDestinationAmount, aC as SwapEstimateRequestBySourceAmount, aD as SwapEstimateResponse, aE as SwapExecuteRequest, aF as SwapExecuteResponse, aG as TokenResponse, aH as UpdateFreshdeskIdRequest, aI as UpdatePhoneNumberRequest, aJ as UserDescriptor, aK as UserProfile, aL as ValidateUserParams, aM as ValidateUserResponse, aN as VerifyTokenRequest, aO as VerifyTokenResponse, aP as WalletCreateGlobalRequest, aQ as WalletResponse, aR as WalletStatus, aS as WalletType } from './index-3P-X9tLg.js';
|
|
7
7
|
export { A as AuthenticationError, C as ConfigurationError, a as ContractError, N as NetworkError, S as SDKError, T as TransactionError, V as ValidationError, W as WalletError } from './errors-5LpyK95R.js';
|
|
8
8
|
export { Signer } from '@zerodev/sdk/types';
|
|
9
9
|
import '@zerodev/sdk';
|
|
10
10
|
import 'viem';
|
|
11
|
-
import './withdrawal.api-
|
|
11
|
+
import './withdrawal.api-CmRHIoyc.js';
|
|
12
12
|
import 'viem/account-abstraction';
|
|
13
13
|
|
|
14
14
|
declare class WirexPaySDK {
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CryptoModule } from './chunk-
|
|
2
|
-
export { CryptoModule } from './chunk-
|
|
3
|
-
import { AuthService, ApiModule } from './chunk-
|
|
4
|
-
export { ApiModule, AuthService, BaasModule } from './chunk-
|
|
5
|
-
import { HttpClient, ConfigurationError, defaultLogger, silentLogger, ConfigService } from './chunk-
|
|
6
|
-
export { AuthenticationError, ConfigurationError, ContractError, NetworkError, SDKError, TransactionError, ValidationError, WalletError, defaultLogger } from './chunk-
|
|
1
|
+
import { CryptoModule } from './chunk-NYDDEDPQ.js';
|
|
2
|
+
export { CryptoModule } from './chunk-NYDDEDPQ.js';
|
|
3
|
+
import { AuthService, ApiModule } from './chunk-D2YHFKQI.js';
|
|
4
|
+
export { ApiModule, AuthService, BaasModule } from './chunk-D2YHFKQI.js';
|
|
5
|
+
import { HttpClient, ConfigurationError, defaultLogger, silentLogger, ConfigService } from './chunk-YXNNTBO5.js';
|
|
6
|
+
export { AuthenticationError, ConfigurationError, ContractError, NetworkError, SDKError, TransactionError, ValidationError, WalletError, defaultLogger } from './chunk-YXNNTBO5.js';
|
|
7
7
|
import { arcTestnet, baseSepolia, base } from 'viem/chains';
|
|
8
8
|
|
|
9
9
|
var CHAIN_MAP = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as ActionConfirmationCreateSmsRequest, c as ActionConfirmationCreateTokenRequest, d as ActionConfirmationSmsSessionResponse, e as ActionConfirmationVerifySmsRequest, f as ActionTokenResponse, g as ActivateBankAccountRequest, aT as ActivateBankAccountResponse, aU as ActivityAmount, aV as ActivityDirection, aW as ActivityFeedResponse, aX as ActivityFullStatementResponse, aY as ActivityItem, aZ as ActivityOperation, a_ as ActivityRate, a$ as ActivityRecipient, b0 as ActivityReward, b1 as ActivityRewardType, b2 as ActivityService, b3 as ActivitySortOrder, b4 as ActivityStatus, b5 as ActivityStep, b6 as ActivityStepType, b7 as ActivitySubject, b8 as ActivitySubjectBankAccount, b9 as ActivitySubjectCard, ba as ActivitySubjectMerchant, bb as ActivitySubjectType, bc as ActivitySubjectWallet, bd as ActivityType, be as ApiError, A as ApiModule, bf as ApiResponse, i as AuthorizeUserResponse, B as BaasModule, bg as BankAccount, bh as BankAccountDetails, bi as BankAccountStatus, bj as BankAccountType, bk as BankAccountsResponse, bl as BankCorridorEstimateResponse, bm as BankCorridorExecuteResponse, bn as BankService, bo as BankSortOrder, bp as Capability, bq as CapabilityStatus, br as CapabilityType, bs as CardAction, bt as CardActionType, C as CardActivateRequestBody, bu as CardBalance, bv as CardData, bw as CardDeliveryAddress, bx as CardDeliveryMethod, by as CardDetailsCvvResponse, j as CardDetailsGetCvvRequestBody, k as CardDetailsGetDetailsRequestBody, l as CardDetailsGetPinRequestBody, bz as CardDetailsPanExpiryResponse, bA as CardDetailsPinResponse, m as CardFeesCreateInvoiceRequestBody, bB as CardFeesInvoiceResponse, bC as CardFeesOrderResponse, bD as CardFormat, bE as CardGeneration, n as CardIssuePlasticRequest, bF as CardIssueResponse, o as CardIssueVirtualRequest, bG as CardLimit, p as CardLimitChangeRequestBody, q as CardNameChangeRequestBody, bH as CardPaymentSystem, bI as CardProvider, bJ as CardResponse, bK as CardSortOrder, bL as CardStatus, bM as CardTransactionConfirmationResponse, bN as CardTransactionDirection, r as CardTransactionResponse, bO as CardTransactionResponseCardAmount, bP as CardTransactionResponseMerchantAmount, bQ as CardTransactionResponseMerchantDetails, bR as CardTransactionStatus, bS as CardTransactionType, s as CardTransactionsResponse, t as CardTransferEstimateRequest, bT as CardTransferEstimateResponse, u as CardTransferExecuteRequest, bU as CardTransferExecuteResponse, v as CardWithdrawalEstimateRequestBody, bV as CardWithdrawalEstimateResponse, w as CardWithdrawalExecuteRequestBody, bW as CardWithdrawalExecuteResponse, bX as CardsResponse, bY as CardsService, bZ as ClientAppConfig, b_ as ConfigAnalytics, b$ as ConfigApi, c0 as ConfigAuth, c1 as ConfigChain, c2 as ConfigService, c3 as ConfigSupport, x as ConfirmPhoneNumberRequest, y as ConfirmationActionType, c4 as ConfirmationService, z as CorridorEstimateRequest, D as CorridorTransferRequest, c5 as CreateRetailUserRequest, c6 as CreateRetailUserResponse, E as CreateUserRequest, c7 as CreateUserResponse, c8 as DeliveryAddress, F as EstimateTransferRequest, c9 as EstimateTransferResponse, ca as EstimatedAmount, cb as EstimatedAmountResponse, G as ExecuteTransferRequest, cc as ExecuteTransferResponse, H as GetActivityByIdRequest, I as GetActivityFeedRequest, J as GetBankAccountsRequest, K as GetCardTransactionsRequest, L as GetCardsRequest, M as GetFullStatementRequest, N as GetRatesRequest, O as GetRecipientsByCatalogRequest, P as GetRecipientsByCurrencyRequest, Q as GetRecipientsByNameRequest, R as GetRecipientsByTypeRequest, S as GetRecipientsRequest, cd as GetSharingTokenRequest, T as GetSharingTokenResponse, ce as GetVerificationLinkResponse, U as GetVerificationTokenResponse, V as GetWalletRequest, cf as LegalAddress, _ as OAuth2TokenRequest, $ as OAuth2TokenResponse, cg as PaginatedResponse, ch as Rate, a1 as RatesResponse, ci as RatesService, cj as RecipientAccount, a2 as RecipientCreateDetailsRequestBody, a3 as RecipientCreateRequest, a4 as RecipientCreateRequestV2, a5 as RecipientDetailsType, ck as RecipientInfo, a6 as RecipientPaymentDetailsAch, a7 as RecipientPaymentDetailsBiFast, a8 as RecipientPaymentDetailsCard, a9 as RecipientPaymentDetailsCrypto, aa as RecipientPaymentDetailsFasterPayment, ab as RecipientPaymentDetailsFpsHk, ac as RecipientPaymentDetailsImps, ad as RecipientPaymentDetailsInstapay, ae as RecipientPaymentDetailsIpp, af as RecipientPaymentDetailsLegalAddress, ag as RecipientPaymentDetailsNip, ah as RecipientPaymentDetailsPix, ai as RecipientPaymentDetailsPse, aj as RecipientPaymentDetailsResponse, ak as RecipientPaymentDetailsSepa, al as RecipientPaymentDetailsSpei, am as RecipientPaymentDetailsSwift, an as RecipientPersonalInfo, ao as RecipientResponse, ap as RecipientSortOrder, aq as RecipientUpdateDetailsRequestBody, ar as RecipientUpdateRequestBody, as as RecipientsResponse, cl as RecipientsService, aw as RequestedErcWithdrawalResponse, ax as RequestedErcWithdrawalsResponse, cm as SetSharingTokenRequest, cn as SetSharingTokenResponse, co as StatementBalance, cp as StatementBankAccountsResponse, cq as StatementPeriod, cr as StatementTransaction, cs as StatementUserData, aA as SwapEstimateRequest, aB as SwapEstimateRequestByDestinationAmount, aC as SwapEstimateRequestBySourceAmount, aD as SwapEstimateResponse, aE as SwapExecuteRequest, aF as SwapExecuteResponse, ct as SwapService, aG as TokenResponse, cu as TokenService, aH as UpdateFreshdeskIdRequest, aI as UpdatePhoneNumberRequest, cv as User, cw as UserAction, cx as UserActionType, aJ as UserDescriptor, cy as UserDocumentV2, cz as UserExternalProviderV2, cA as UserPersonalInfo, cB as UserPhoneNumberData, cC as UserProfileV2, cD as UserResidenceAddress, cE as UserResidenceAddressV2, cF as UserService, cG as UserStatus, cH as UserV2, cI as UserVerificationLevelV2, cJ as UserVerificationStatus, cK as UserVerificationV2, cL as ValidateRetailUserResponse, cM as VerificationLevel, W as WalletBalance, aP as WalletCreateGlobalRequest, aQ as WalletResponse, cN as WalletService, aR as WalletStatus, aS as WalletType } from '../../index-
|
|
2
|
-
export { W as WithdrawalApi } from '../../withdrawal.api-
|
|
3
|
-
import '../../types-
|
|
1
|
+
export { b as ActionConfirmationCreateSmsRequest, c as ActionConfirmationCreateTokenRequest, d as ActionConfirmationSmsSessionResponse, e as ActionConfirmationVerifySmsRequest, f as ActionTokenResponse, g as ActivateBankAccountRequest, aT as ActivateBankAccountResponse, aU as ActivityAmount, aV as ActivityDirection, aW as ActivityFeedResponse, aX as ActivityFullStatementResponse, aY as ActivityItem, aZ as ActivityOperation, a_ as ActivityRate, a$ as ActivityRecipient, b0 as ActivityReward, b1 as ActivityRewardType, b2 as ActivityService, b3 as ActivitySortOrder, b4 as ActivityStatus, b5 as ActivityStep, b6 as ActivityStepType, b7 as ActivitySubject, b8 as ActivitySubjectBankAccount, b9 as ActivitySubjectCard, ba as ActivitySubjectMerchant, bb as ActivitySubjectType, bc as ActivitySubjectWallet, bd as ActivityType, be as ApiError, A as ApiModule, bf as ApiResponse, i as AuthorizeUserResponse, B as BaasModule, bg as BankAccount, bh as BankAccountDetails, bi as BankAccountStatus, bj as BankAccountType, bk as BankAccountsResponse, bl as BankCorridorEstimateResponse, bm as BankCorridorExecuteResponse, bn as BankService, bo as BankSortOrder, bp as Capability, bq as CapabilityStatus, br as CapabilityType, bs as CardAction, bt as CardActionType, C as CardActivateRequestBody, bu as CardBalance, bv as CardData, bw as CardDeliveryAddress, bx as CardDeliveryMethod, by as CardDetailsCvvResponse, j as CardDetailsGetCvvRequestBody, k as CardDetailsGetDetailsRequestBody, l as CardDetailsGetPinRequestBody, bz as CardDetailsPanExpiryResponse, bA as CardDetailsPinResponse, m as CardFeesCreateInvoiceRequestBody, bB as CardFeesInvoiceResponse, bC as CardFeesOrderResponse, bD as CardFormat, bE as CardGeneration, n as CardIssuePlasticRequest, bF as CardIssueResponse, o as CardIssueVirtualRequest, bG as CardLimit, p as CardLimitChangeRequestBody, q as CardNameChangeRequestBody, bH as CardPaymentSystem, bI as CardProvider, bJ as CardResponse, bK as CardSortOrder, bL as CardStatus, bM as CardTransactionConfirmationResponse, bN as CardTransactionDirection, r as CardTransactionResponse, bO as CardTransactionResponseCardAmount, bP as CardTransactionResponseMerchantAmount, bQ as CardTransactionResponseMerchantDetails, bR as CardTransactionStatus, bS as CardTransactionType, s as CardTransactionsResponse, t as CardTransferEstimateRequest, bT as CardTransferEstimateResponse, u as CardTransferExecuteRequest, bU as CardTransferExecuteResponse, v as CardWithdrawalEstimateRequestBody, bV as CardWithdrawalEstimateResponse, w as CardWithdrawalExecuteRequestBody, bW as CardWithdrawalExecuteResponse, bX as CardsResponse, bY as CardsService, bZ as ClientAppConfig, b_ as ConfigAnalytics, b$ as ConfigApi, c0 as ConfigAuth, c1 as ConfigChain, c2 as ConfigService, c3 as ConfigSupport, x as ConfirmPhoneNumberRequest, y as ConfirmationActionType, c4 as ConfirmationService, z as CorridorEstimateRequest, D as CorridorTransferRequest, c5 as CreateRetailUserRequest, c6 as CreateRetailUserResponse, E as CreateUserRequest, c7 as CreateUserResponse, c8 as DeliveryAddress, F as EstimateTransferRequest, c9 as EstimateTransferResponse, ca as EstimatedAmount, cb as EstimatedAmountResponse, G as ExecuteTransferRequest, cc as ExecuteTransferResponse, H as GetActivityByIdRequest, I as GetActivityFeedRequest, J as GetBankAccountsRequest, K as GetCardTransactionsRequest, L as GetCardsRequest, M as GetFullStatementRequest, N as GetRatesRequest, O as GetRecipientsByCatalogRequest, P as GetRecipientsByCurrencyRequest, Q as GetRecipientsByNameRequest, R as GetRecipientsByTypeRequest, S as GetRecipientsRequest, cd as GetSharingTokenRequest, T as GetSharingTokenResponse, ce as GetVerificationLinkResponse, U as GetVerificationTokenResponse, V as GetWalletRequest, cf as LegalAddress, _ as OAuth2TokenRequest, $ as OAuth2TokenResponse, cg as PaginatedResponse, ch as Rate, a1 as RatesResponse, ci as RatesService, cj as RecipientAccount, a2 as RecipientCreateDetailsRequestBody, a3 as RecipientCreateRequest, a4 as RecipientCreateRequestV2, a5 as RecipientDetailsType, ck as RecipientInfo, a6 as RecipientPaymentDetailsAch, a7 as RecipientPaymentDetailsBiFast, a8 as RecipientPaymentDetailsCard, a9 as RecipientPaymentDetailsCrypto, aa as RecipientPaymentDetailsFasterPayment, ab as RecipientPaymentDetailsFpsHk, ac as RecipientPaymentDetailsImps, ad as RecipientPaymentDetailsInstapay, ae as RecipientPaymentDetailsIpp, af as RecipientPaymentDetailsLegalAddress, ag as RecipientPaymentDetailsNip, ah as RecipientPaymentDetailsPix, ai as RecipientPaymentDetailsPse, aj as RecipientPaymentDetailsResponse, ak as RecipientPaymentDetailsSepa, al as RecipientPaymentDetailsSpei, am as RecipientPaymentDetailsSwift, an as RecipientPersonalInfo, ao as RecipientResponse, ap as RecipientSortOrder, aq as RecipientUpdateDetailsRequestBody, ar as RecipientUpdateRequestBody, as as RecipientsResponse, cl as RecipientsService, aw as RequestedErcWithdrawalResponse, ax as RequestedErcWithdrawalsResponse, cm as SetSharingTokenRequest, cn as SetSharingTokenResponse, co as StatementBalance, cp as StatementBankAccountsResponse, cq as StatementPeriod, cr as StatementTransaction, cs as StatementUserData, aA as SwapEstimateRequest, aB as SwapEstimateRequestByDestinationAmount, aC as SwapEstimateRequestBySourceAmount, aD as SwapEstimateResponse, aE as SwapExecuteRequest, aF as SwapExecuteResponse, ct as SwapService, aG as TokenResponse, cu as TokenService, aH as UpdateFreshdeskIdRequest, aI as UpdatePhoneNumberRequest, cv as User, cw as UserAction, cx as UserActionType, aJ as UserDescriptor, cy as UserDocumentV2, cz as UserExternalProviderV2, cA as UserPersonalInfo, cB as UserPhoneNumberData, cC as UserProfileV2, cD as UserResidenceAddress, cE as UserResidenceAddressV2, cF as UserService, cG as UserStatus, cH as UserV2, cI as UserVerificationLevelV2, cJ as UserVerificationStatus, cK as UserVerificationV2, cL as ValidateRetailUserResponse, cM as VerificationLevel, W as WalletBalance, aP as WalletCreateGlobalRequest, aQ as WalletResponse, cN as WalletService, aR as WalletStatus, aS as WalletType } from '../../index-3P-X9tLg.js';
|
|
2
|
+
export { W as WithdrawalApi } from '../../withdrawal.api-CmRHIoyc.js';
|
|
3
|
+
import '../../types-_RME4STd.js';
|
|
4
4
|
import 'viem';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActivityService, ApiModule, BaasModule, BankService, CardsService, ConfigService, ConfirmationService, RatesService, RecipientsService, SwapService, TokenService, UserService, WalletService, WithdrawalApi } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { ActivityService, ApiModule, BaasModule, BankService, CardsService, ConfigService, ConfirmationService, RatesService, RecipientsService, SwapService, TokenService, UserService, WalletService, WithdrawalApi } from '../../chunk-D2YHFKQI.js';
|
|
2
|
+
import '../../chunk-YXNNTBO5.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { I as IWalletService,
|
|
2
|
-
export { A as AccountStatus, B as BatchTransferItem, a as BatchTransferResult, C as CryptoModule,
|
|
1
|
+
import { I as IWalletService, e as ChainServiceConfig, S as SendUserOperationConfig, f as IAccountAbstractionService, b as CallData, g as IYieldService, h as IYieldData, i as IYieldGraphicData, j as IAccountContractService, k as IOnboardingService, l as ChainServicesFactory } from '../../crypto.module-BsI4pLhf.js';
|
|
2
|
+
export { A as AccountStatus, B as BatchTransferItem, a as BatchTransferResult, C as CryptoModule, m as CryptoModuleState, P as PolicyStatus, T as TransferRequest, c as TransferResult, Y as YieldData, d as YieldGraphicDataPoint } from '../../crypto.module-BsI4pLhf.js';
|
|
3
3
|
export { Signer } from '@zerodev/sdk/types';
|
|
4
|
-
import { M as MainWalletClient, b as ContractAddresses, L as Logger, T as TokenInfo, H as Hex$1 } from '../../types-
|
|
4
|
+
import { M as MainWalletClient, b as ContractAddresses, L as Logger, T as TokenInfo, H as Hex$1 } from '../../types-_RME4STd.js';
|
|
5
5
|
import * as viem from 'viem';
|
|
6
6
|
import { WalletClient, PublicClient, Hex } from 'viem';
|
|
7
7
|
import { KernelAccountClient } from '@zerodev/sdk';
|
|
8
|
-
import { I as ICryptoService, W as WithdrawalApi, E as Erc20TransferParams, S as SyntheticTransferParams, F as FullTransferParams, a as FullTransferResult, b as SwapTransferParams, B as BatchTransferParams } from '../../withdrawal.api-
|
|
9
|
-
export { c as BatchTransferResponse } from '../../withdrawal.api-
|
|
8
|
+
import { I as ICryptoService, W as WithdrawalApi, E as Erc20TransferParams, S as SyntheticTransferParams, F as FullTransferParams, a as FullTransferResult, b as SwapTransferParams, B as BatchTransferParams } from '../../withdrawal.api-CmRHIoyc.js';
|
|
9
|
+
export { c as BatchTransferResponse } from '../../withdrawal.api-CmRHIoyc.js';
|
|
10
10
|
import { WaitForUserOperationReceiptReturnType } from 'viem/account-abstraction';
|
|
11
11
|
|
|
12
12
|
declare class BaseWalletService implements IWalletService {
|
|
@@ -26,9 +26,7 @@ declare class BaseWalletService implements IWalletService {
|
|
|
26
26
|
getSmartWalletAddress(): Promise<`0x${string}`>;
|
|
27
27
|
getMainWalletClient(): Promise<MainWalletClient>;
|
|
28
28
|
getSmartAccountSigner(): Promise<WalletClient>;
|
|
29
|
-
sendUserOperationsAndWaitReceipt(callData: any, smartWalletClient?: KernelAccountClient, config?: {
|
|
30
|
-
waitOnChainBlocks?: number;
|
|
31
|
-
}): Promise<{
|
|
29
|
+
sendUserOperationsAndWaitReceipt(callData: any, smartWalletClient?: KernelAccountClient, config?: SendUserOperationConfig): Promise<{
|
|
32
30
|
actualGasCost: bigint;
|
|
33
31
|
actualGasUsed: bigint;
|
|
34
32
|
entryPoint: viem.Address;
|
|
@@ -41,7 +39,7 @@ declare class BaseWalletService implements IWalletService {
|
|
|
41
39
|
success: boolean;
|
|
42
40
|
userOpHash: viem.Hash;
|
|
43
41
|
}>;
|
|
44
|
-
sendUserOperationsWithNonceAndWaitReceipt(callData: any, nonce: bigint): Promise<{
|
|
42
|
+
sendUserOperationsWithNonceAndWaitReceipt(callData: any, nonce: bigint, config?: SendUserOperationConfig): Promise<{
|
|
45
43
|
actualGasCost: bigint;
|
|
46
44
|
actualGasUsed: bigint;
|
|
47
45
|
entryPoint: viem.Address;
|
|
@@ -54,6 +52,7 @@ declare class BaseWalletService implements IWalletService {
|
|
|
54
52
|
success: boolean;
|
|
55
53
|
userOpHash: viem.Hash;
|
|
56
54
|
}>;
|
|
55
|
+
private sendUserOperation;
|
|
57
56
|
invalidateLocalCache(): void;
|
|
58
57
|
private createSimpleValidator;
|
|
59
58
|
private createKernelClient;
|
|
@@ -78,6 +77,8 @@ declare class BaseAccountAbstractionService implements IAccountAbstractionServic
|
|
|
78
77
|
signInPolicyAndExecutor(): Promise<any>;
|
|
79
78
|
signInPolicy(): Promise<any>;
|
|
80
79
|
signInExecutor(): Promise<any>;
|
|
80
|
+
getExecutorInstallCall(): Promise<CallData>;
|
|
81
|
+
getPolicyInstallCall(): Promise<CallData>;
|
|
81
82
|
private createExecutionDelayValidator;
|
|
82
83
|
private getExecutorCallData;
|
|
83
84
|
private getPolicyCallData;
|
|
@@ -163,10 +164,31 @@ declare class BaseAccountContractService implements IAccountContractService {
|
|
|
163
164
|
isWalletInCorporateAccounts(): Promise<boolean>;
|
|
164
165
|
registerInAccounts(): Promise<WaitForUserOperationReceiptReturnType>;
|
|
165
166
|
registerInCorporateAccounts(): Promise<WaitForUserOperationReceiptReturnType>;
|
|
167
|
+
getAccountRegistrationCall(): Promise<CallData>;
|
|
166
168
|
private getCorporateCallData;
|
|
167
169
|
private getCallData;
|
|
168
170
|
}
|
|
169
171
|
|
|
172
|
+
declare class BaseOnboardingService implements IOnboardingService {
|
|
173
|
+
private readonly walletService;
|
|
174
|
+
private readonly accountAbstractionService;
|
|
175
|
+
private readonly accountContractService;
|
|
176
|
+
private readonly logger?;
|
|
177
|
+
constructor(config: {
|
|
178
|
+
walletService: IWalletService;
|
|
179
|
+
accountAbstractionService: IAccountAbstractionService;
|
|
180
|
+
accountContractService: IAccountContractService;
|
|
181
|
+
logger?: Logger;
|
|
182
|
+
});
|
|
183
|
+
/**
|
|
184
|
+
* Executor install + root validator switch + Accounts registration in one UserOp,
|
|
185
|
+
* signed by the pre-policy (ECDSA sudo) client. Replaces the three-signature
|
|
186
|
+
* sequence signInExecutor → signInPolicy → registerInAccounts for wallets that
|
|
187
|
+
* have neither the executor nor the policy installed yet.
|
|
188
|
+
*/
|
|
189
|
+
allInOneStepOnboarding(): Promise<WaitForUserOperationReceiptReturnType>;
|
|
190
|
+
}
|
|
191
|
+
|
|
170
192
|
declare class ChainRegistry {
|
|
171
193
|
private factories;
|
|
172
194
|
register(chainId: number, factory: ChainServicesFactory): void;
|
|
@@ -189,4 +211,4 @@ declare class ContractRegistryService {
|
|
|
189
211
|
loadTokens(tokenRegistryAddress: Hex$1): Promise<TokenInfo[]>;
|
|
190
212
|
}
|
|
191
213
|
|
|
192
|
-
export { BaseAccountAbstractionService, BaseAccountContractService, BaseCryptoService, BaseWalletService, BaseYieldService, BatchTransferParams, ChainServiceConfig, ChainServicesFactory, ContractRegistryService, Erc20TransferParams, IAccountAbstractionService, IAccountContractService, ICryptoService, IWalletService, IYieldData, IYieldGraphicData, IYieldService, SyntheticTransferParams, chainRegistry };
|
|
214
|
+
export { BaseAccountAbstractionService, BaseAccountContractService, BaseCryptoService, BaseOnboardingService, BaseWalletService, BaseYieldService, BatchTransferParams, CallData, ChainServiceConfig, ChainServicesFactory, ContractRegistryService, Erc20TransferParams, IAccountAbstractionService, IAccountContractService, ICryptoService, IOnboardingService, IWalletService, IYieldData, IYieldGraphicData, IYieldService, SendUserOperationConfig, SyntheticTransferParams, chainRegistry };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { BaseAccountAbstractionService, BaseAccountContractService, BaseCryptoService, BaseWalletService, BaseYieldService, ContractRegistryService, CryptoModule, chainRegistry } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
1
|
+
export { BaseAccountAbstractionService, BaseAccountContractService, BaseCryptoService, BaseOnboardingService, BaseWalletService, BaseYieldService, ContractRegistryService, CryptoModule, chainRegistry } from '../../chunk-NYDDEDPQ.js';
|
|
2
|
+
import '../../chunk-D2YHFKQI.js';
|
|
3
|
+
import '../../chunk-YXNNTBO5.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
5
5
|
//# sourceMappingURL=index.js.map
|