@reown/appkit-common-react-native 0.0.0-feat-onramp-20250602154313 → 0.0.0-feat-multichain-20250604171123
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/lib/commonjs/adapters/BlockchainAdapter.js +79 -0
- package/lib/commonjs/adapters/BlockchainAdapter.js.map +1 -0
- package/lib/commonjs/adapters/EvmAdapter.js +83 -0
- package/lib/commonjs/adapters/EvmAdapter.js.map +1 -0
- package/lib/commonjs/adapters/SolanaBaseAdapter.js +12 -0
- package/lib/commonjs/adapters/SolanaBaseAdapter.js.map +1 -0
- package/lib/commonjs/index.js +25 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/ConstantsUtil.js +1 -1
- package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
- package/lib/commonjs/utils/NumberUtil.js +52 -11
- package/lib/commonjs/utils/NumberUtil.js.map +1 -1
- package/lib/commonjs/utils/PresetsUtil.js +34 -3
- package/lib/commonjs/utils/PresetsUtil.js.map +1 -1
- package/lib/commonjs/utils/TypeUtil.js +29 -0
- package/lib/commonjs/utils/TypeUtil.js.map +1 -1
- package/lib/module/adapters/BlockchainAdapter.js +72 -0
- package/lib/module/adapters/BlockchainAdapter.js.map +1 -0
- package/lib/module/adapters/EvmAdapter.js +76 -0
- package/lib/module/adapters/EvmAdapter.js.map +1 -0
- package/lib/module/adapters/SolanaBaseAdapter.js +5 -0
- package/lib/module/adapters/SolanaBaseAdapter.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/ConstantsUtil.js +1 -1
- package/lib/module/utils/ConstantsUtil.js.map +1 -1
- package/lib/module/utils/NumberUtil.js +52 -11
- package/lib/module/utils/NumberUtil.js.map +1 -1
- package/lib/module/utils/PresetsUtil.js +34 -3
- package/lib/module/utils/PresetsUtil.js.map +1 -1
- package/lib/module/utils/TypeUtil.js +23 -0
- package/lib/module/utils/TypeUtil.js.map +1 -1
- package/lib/typescript/adapters/BlockchainAdapter.d.ts +27 -0
- package/lib/typescript/adapters/BlockchainAdapter.d.ts.map +1 -0
- package/lib/typescript/adapters/EvmAdapter.d.ts +6 -0
- package/lib/typescript/adapters/EvmAdapter.d.ts.map +1 -0
- package/lib/typescript/adapters/SolanaBaseAdapter.d.ts +4 -0
- package/lib/typescript/adapters/SolanaBaseAdapter.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/NumberUtil.d.ts +39 -11
- package/lib/typescript/utils/NumberUtil.d.ts.map +1 -1
- package/lib/typescript/utils/PresetsUtil.d.ts +1 -1
- package/lib/typescript/utils/PresetsUtil.d.ts.map +1 -1
- package/lib/typescript/utils/TypeUtil.d.ts +147 -1
- package/lib/typescript/utils/TypeUtil.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapters/BlockchainAdapter.ts +109 -0
- package/src/adapters/EvmAdapter.ts +79 -0
- package/src/adapters/SolanaBaseAdapter.ts +5 -0
- package/src/index.ts +3 -0
- package/src/utils/ConstantsUtil.ts +1 -1
- package/src/utils/NumberUtil.ts +54 -11
- package/src/utils/PresetsUtil.ts +36 -3
- package/src/utils/TypeUtil.ts +181 -1
|
@@ -1,8 +1,56 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
export type CaipAddress = `${string}:${string}:${string}`;
|
|
4
|
+
export type CaipNetworkId = `${string}:${string}`;
|
|
5
|
+
export type ChainNamespace = 'eip155' | 'solana' | 'polkadot' | 'bip122';
|
|
6
|
+
export type Network = {
|
|
7
|
+
id: number | string;
|
|
8
|
+
name: string;
|
|
9
|
+
nativeCurrency: {
|
|
10
|
+
name: string;
|
|
11
|
+
symbol: string;
|
|
12
|
+
decimals: number;
|
|
13
|
+
};
|
|
14
|
+
rpcUrls: {
|
|
15
|
+
default: {
|
|
16
|
+
http: readonly string[];
|
|
17
|
+
};
|
|
18
|
+
[key: string]: {
|
|
19
|
+
http: readonly string[];
|
|
20
|
+
} | undefined;
|
|
21
|
+
};
|
|
22
|
+
blockExplorers?: {
|
|
23
|
+
default: {
|
|
24
|
+
name: string;
|
|
25
|
+
url: string;
|
|
26
|
+
};
|
|
27
|
+
[key: string]: {
|
|
28
|
+
name: string;
|
|
29
|
+
url: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
};
|
|
32
|
+
chainNamespace?: ChainNamespace;
|
|
33
|
+
caipNetworkId?: CaipNetworkId;
|
|
34
|
+
testnet?: boolean;
|
|
35
|
+
deprecatedCaipNetworkId?: CaipNetworkId;
|
|
36
|
+
};
|
|
37
|
+
export type AppKitNetwork = Network & {
|
|
38
|
+
chainNamespace: ChainNamespace;
|
|
39
|
+
caipNetworkId: CaipNetworkId;
|
|
40
|
+
testnet?: boolean;
|
|
41
|
+
deprecatedCaipNetworkId?: CaipNetworkId;
|
|
42
|
+
};
|
|
43
|
+
export interface CaipNetwork {
|
|
44
|
+
id: CaipNetworkId;
|
|
45
|
+
name?: string;
|
|
46
|
+
imageId?: string;
|
|
47
|
+
imageUrl?: string;
|
|
48
|
+
}
|
|
1
49
|
export interface Balance {
|
|
2
50
|
name: string;
|
|
3
51
|
symbol: string;
|
|
4
52
|
chainId: string;
|
|
5
|
-
address?:
|
|
53
|
+
address?: CaipAddress;
|
|
6
54
|
value?: number;
|
|
7
55
|
price: number;
|
|
8
56
|
quantity: BalanceQuantity;
|
|
@@ -79,6 +127,104 @@ export type ThemeMode = 'dark' | 'light';
|
|
|
79
127
|
export interface ThemeVariables {
|
|
80
128
|
accent?: string;
|
|
81
129
|
}
|
|
130
|
+
export interface Token {
|
|
131
|
+
address: string;
|
|
132
|
+
image?: string;
|
|
133
|
+
}
|
|
134
|
+
export type Tokens = Record<CaipNetworkId, Token>;
|
|
82
135
|
export type ConnectorType = 'WALLET_CONNECT' | 'COINBASE' | 'AUTH' | 'EXTERNAL';
|
|
136
|
+
export type AccountsChangedEvent = {
|
|
137
|
+
accounts: string[];
|
|
138
|
+
};
|
|
139
|
+
export type ChainChangedEvent = {
|
|
140
|
+
chainId: string;
|
|
141
|
+
};
|
|
142
|
+
export type DisconnectEvent = {};
|
|
143
|
+
export type BalanceChangedEvent = {
|
|
144
|
+
address: CaipAddress;
|
|
145
|
+
balance: {
|
|
146
|
+
amount: string;
|
|
147
|
+
symbol: string;
|
|
148
|
+
contractAddress?: ContractAddress;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
export interface AdapterEvents {
|
|
152
|
+
accountsChanged: (event: AccountsChangedEvent) => void;
|
|
153
|
+
chainChanged: (event: ChainChangedEvent) => void;
|
|
154
|
+
disconnect: (event: DisconnectEvent) => void;
|
|
155
|
+
balanceChanged: (event: BalanceChangedEvent) => void;
|
|
156
|
+
}
|
|
157
|
+
export interface GetBalanceParams {
|
|
158
|
+
address?: CaipAddress;
|
|
159
|
+
network?: AppKitNetwork;
|
|
160
|
+
tokens?: Tokens;
|
|
161
|
+
}
|
|
162
|
+
type ContractAddress = CaipAddress;
|
|
163
|
+
export interface GetBalanceResponse {
|
|
164
|
+
amount: string;
|
|
165
|
+
symbol: string;
|
|
166
|
+
contractAddress?: ContractAddress;
|
|
167
|
+
}
|
|
168
|
+
interface BaseNamespace {
|
|
169
|
+
chains?: CaipNetworkId[];
|
|
170
|
+
accounts: CaipAddress[];
|
|
171
|
+
methods: string[];
|
|
172
|
+
events: string[];
|
|
173
|
+
}
|
|
174
|
+
type Namespace = BaseNamespace;
|
|
175
|
+
export type Namespaces = Record<string, Namespace>;
|
|
176
|
+
export type ProposalNamespaces = Record<string, Omit<Namespace, 'accounts'> & Required<Pick<Namespace, 'chains'>>>;
|
|
177
|
+
export type ConnectOptions = {
|
|
178
|
+
namespaces?: ProposalNamespaces;
|
|
179
|
+
defaultChain?: CaipNetworkId;
|
|
180
|
+
universalLink?: string;
|
|
181
|
+
};
|
|
182
|
+
export declare abstract class WalletConnector extends EventEmitter {
|
|
183
|
+
type: New_ConnectorType;
|
|
184
|
+
protected provider: Provider;
|
|
185
|
+
protected namespaces?: Namespaces;
|
|
186
|
+
protected wallet?: WalletInfo;
|
|
187
|
+
constructor({ type, provider }: {
|
|
188
|
+
type: New_ConnectorType;
|
|
189
|
+
provider: Provider;
|
|
190
|
+
});
|
|
191
|
+
abstract connect(opts: ConnectOptions): Promise<Namespaces | undefined>;
|
|
192
|
+
abstract disconnect(): Promise<void>;
|
|
193
|
+
abstract getProvider(): Provider;
|
|
194
|
+
abstract getNamespaces(): Namespaces;
|
|
195
|
+
abstract getChainId(namespace: ChainNamespace): CaipNetworkId | undefined;
|
|
196
|
+
abstract getWalletInfo(): WalletInfo | undefined;
|
|
197
|
+
abstract switchNetwork(network: AppKitNetwork): Promise<void>;
|
|
198
|
+
}
|
|
199
|
+
export interface Provider {
|
|
200
|
+
connect<T>(params?: any): Promise<T>;
|
|
201
|
+
disconnect(): Promise<void>;
|
|
202
|
+
request<T = unknown>(args: RequestArguments, chain?: string | undefined, expiry?: number | undefined): Promise<T>;
|
|
203
|
+
on(event: string, listener: (args?: any) => void): any;
|
|
204
|
+
off(event: string, listener: (args?: any) => void): any;
|
|
205
|
+
}
|
|
206
|
+
export interface RequestArguments {
|
|
207
|
+
method: string;
|
|
208
|
+
params?: unknown[] | Record<string, unknown> | object | undefined;
|
|
209
|
+
}
|
|
210
|
+
export type New_ConnectorType = 'walletconnect' | 'coinbase' | 'auth';
|
|
211
|
+
export interface ConnectionResponse {
|
|
212
|
+
accounts: string[];
|
|
213
|
+
chainId: string;
|
|
214
|
+
[key: string]: any;
|
|
215
|
+
}
|
|
216
|
+
export interface WalletInfo {
|
|
217
|
+
name?: string;
|
|
218
|
+
icon?: string;
|
|
219
|
+
description?: string;
|
|
220
|
+
url?: string;
|
|
221
|
+
icons?: string[];
|
|
222
|
+
redirect?: {
|
|
223
|
+
native?: string;
|
|
224
|
+
universal?: string;
|
|
225
|
+
linkMode?: boolean;
|
|
226
|
+
};
|
|
227
|
+
[key: string]: unknown;
|
|
228
|
+
}
|
|
83
229
|
export {};
|
|
84
230
|
//# sourceMappingURL=TypeUtil.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/TypeUtil.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"TypeUtil.d.ts","sourceRoot":"","sources":["../../../src/utils/TypeUtil.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,MAAM,WAAW,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEzE,MAAM,MAAM,OAAO,GAAG;IAEpB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,OAAO,EAAE;QACP,OAAO,EAAE;YAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;SAAE,CAAC;QACrC,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;SAAE,GAAG,SAAS,CAAC;KACxD,CAAC;IACF,cAAc,CAAC,EAAE;QACf,OAAO,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAA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GAAG,CAAC;CACzD;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC;CACnE;AAGD,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,UAAU,GAAG,MAAM,CAAC;AAItE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import type {
|
|
3
|
+
AdapterEvents,
|
|
4
|
+
AppKitNetwork,
|
|
5
|
+
CaipAddress,
|
|
6
|
+
ChainNamespace,
|
|
7
|
+
GetBalanceParams,
|
|
8
|
+
GetBalanceResponse,
|
|
9
|
+
Provider,
|
|
10
|
+
WalletConnector
|
|
11
|
+
} from '../utils/TypeUtil';
|
|
12
|
+
|
|
13
|
+
export abstract class BlockchainAdapter extends EventEmitter {
|
|
14
|
+
public projectId: string;
|
|
15
|
+
public connector?: WalletConnector;
|
|
16
|
+
public supportedNamespace: ChainNamespace;
|
|
17
|
+
|
|
18
|
+
// Typed emit method
|
|
19
|
+
override emit<K extends keyof AdapterEvents>(
|
|
20
|
+
event: K,
|
|
21
|
+
payload: Parameters<AdapterEvents[K]>[0]
|
|
22
|
+
): boolean {
|
|
23
|
+
return super.emit(event, payload);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
constructor({
|
|
27
|
+
projectId,
|
|
28
|
+
supportedNamespace
|
|
29
|
+
}: {
|
|
30
|
+
projectId: string;
|
|
31
|
+
supportedNamespace: ChainNamespace;
|
|
32
|
+
}) {
|
|
33
|
+
super();
|
|
34
|
+
this.projectId = projectId;
|
|
35
|
+
this.supportedNamespace = supportedNamespace;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
setConnector(connector: WalletConnector) {
|
|
39
|
+
this.connector = connector;
|
|
40
|
+
this.subscribeToEvents();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
removeConnector() {
|
|
44
|
+
this.connector = undefined;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
getProvider(): Provider {
|
|
48
|
+
if (!this.connector) throw new Error('No active connector');
|
|
49
|
+
|
|
50
|
+
return this.connector.getProvider();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
subscribeToEvents(): void {
|
|
54
|
+
const provider = this.connector?.getProvider();
|
|
55
|
+
if (!provider) return;
|
|
56
|
+
|
|
57
|
+
provider.on('chainChanged', this.onChainChanged.bind(this));
|
|
58
|
+
provider.on('accountsChanged', this.onAccountsChanged.bind(this));
|
|
59
|
+
provider.on('disconnect', this.onDisconnect.bind(this));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
onChainChanged(chainId: string): void {
|
|
63
|
+
const _chains = this.getAccounts()?.map(account => account.split(':')[1]);
|
|
64
|
+
const shouldEmit = _chains?.some(chain => chain === chainId);
|
|
65
|
+
|
|
66
|
+
if (shouldEmit) {
|
|
67
|
+
this.emit('chainChanged', { chainId });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
onAccountsChanged(accounts: string[]): void {
|
|
72
|
+
const _accounts = this.getAccounts();
|
|
73
|
+
const shouldEmit = _accounts?.some(account => {
|
|
74
|
+
const accountAddress = account.split(':')[2];
|
|
75
|
+
|
|
76
|
+
return accountAddress !== undefined && accounts.includes(accountAddress);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
if (shouldEmit) {
|
|
80
|
+
this.emit('accountsChanged', { accounts });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
onDisconnect(): void {
|
|
85
|
+
this.emit('disconnect', { namespace: this.getSupportedNamespace() });
|
|
86
|
+
|
|
87
|
+
const provider = this.connector?.getProvider();
|
|
88
|
+
if (provider) {
|
|
89
|
+
provider.off('chainChanged', this.onChainChanged.bind(this));
|
|
90
|
+
provider.off('accountsChanged', this.onAccountsChanged.bind(this));
|
|
91
|
+
provider.off('disconnect', this.onDisconnect.bind(this));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
this.connector = undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
parseUnits(value: string, decimals: number): bigint {
|
|
98
|
+
const [whole, fraction = ''] = value.split('.');
|
|
99
|
+
const paddedFraction = (fraction + '0'.repeat(decimals)).slice(0, decimals);
|
|
100
|
+
|
|
101
|
+
return BigInt(whole + paddedFraction);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
abstract disconnect(): Promise<void>;
|
|
105
|
+
abstract getSupportedNamespace(): ChainNamespace;
|
|
106
|
+
abstract getBalance(params: GetBalanceParams): Promise<GetBalanceResponse>;
|
|
107
|
+
abstract getAccounts(): CaipAddress[] | undefined;
|
|
108
|
+
abstract switchNetwork(network: AppKitNetwork): Promise<void>;
|
|
109
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { BlockchainAdapter } from './BlockchainAdapter';
|
|
2
|
+
import { NumberUtil } from '../utils/NumberUtil';
|
|
3
|
+
|
|
4
|
+
export abstract class EVMAdapter extends BlockchainAdapter {
|
|
5
|
+
async estimateGas({ address, to, data, chainNamespace }: any): Promise<bigint> {
|
|
6
|
+
const provider = this.getProvider();
|
|
7
|
+
|
|
8
|
+
if (!provider) {
|
|
9
|
+
throw new Error('EVMAdapter:estimateGas - provider is undefined');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (!address) {
|
|
13
|
+
throw new Error('EVMAdapter:estimateGas - from address is undefined');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (chainNamespace && chainNamespace !== 'eip155') {
|
|
17
|
+
throw new Error('EVMAdapter:estimateGas - chainNamespace is not eip155');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
const txParams = {
|
|
22
|
+
from: address,
|
|
23
|
+
to,
|
|
24
|
+
data,
|
|
25
|
+
type: '0x0' // optional, legacy type
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const estimatedGasHex = await provider.request({
|
|
29
|
+
method: 'eth_estimateGas',
|
|
30
|
+
params: [txParams]
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return BigInt(estimatedGasHex as string);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
throw new Error('EVMAdapter:estimateGas - eth_estimateGas RPC failed');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async sendTransaction(data: any) {
|
|
40
|
+
const { address } = data || {};
|
|
41
|
+
|
|
42
|
+
if (!this.getProvider()) {
|
|
43
|
+
throw new Error('EVMAdapter:sendTransaction - provider is undefined');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (!address) {
|
|
47
|
+
throw new Error('EVMAdapter:sendTransaction - address is undefined');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const txParams = {
|
|
51
|
+
from: address,
|
|
52
|
+
to: data.to,
|
|
53
|
+
value: NumberUtil.convertNumericToHexString(data.value),
|
|
54
|
+
gas: NumberUtil.convertNumericToHexString(data.gas),
|
|
55
|
+
gasPrice: NumberUtil.convertNumericToHexString(data.gasPrice),
|
|
56
|
+
data: data.data, // hex-encoded bytecode
|
|
57
|
+
type: '0x0' // optional: legacy transaction type
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const txHash = await this.getProvider().request({
|
|
61
|
+
method: 'eth_sendTransaction',
|
|
62
|
+
params: [txParams]
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
let receipt = null;
|
|
66
|
+
while (!receipt) {
|
|
67
|
+
receipt = (await this.getProvider().request({
|
|
68
|
+
method: 'eth_getTransactionReceipt',
|
|
69
|
+
params: [txHash]
|
|
70
|
+
})) as { blockHash?: `0x${string}` };
|
|
71
|
+
|
|
72
|
+
if (!receipt) {
|
|
73
|
+
await new Promise(r => setTimeout(r, 1000)); // wait 1s
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return receipt?.blockHash || null;
|
|
78
|
+
}
|
|
79
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -8,4 +8,7 @@ export { PresetsUtil } from './utils/PresetsUtil';
|
|
|
8
8
|
export { StringUtil } from './utils/StringUtil';
|
|
9
9
|
export { ErrorUtil } from './utils/ErrorUtil';
|
|
10
10
|
export { erc20ABI } from './contracts/erc20';
|
|
11
|
+
export { BlockchainAdapter } from './adapters/BlockchainAdapter';
|
|
12
|
+
export { EVMAdapter } from './adapters/EvmAdapter';
|
|
13
|
+
export { SolanaBaseAdapter } from './adapters/SolanaBaseAdapter';
|
|
11
14
|
export * from './utils/TypeUtil';
|
package/src/utils/NumberUtil.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as BigNumber from 'bignumber.js';
|
|
2
2
|
|
|
3
3
|
export const NumberUtil = {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a BigNumber instance from a given value.
|
|
6
|
+
* If the value is a string, commas are removed before conversion.
|
|
7
|
+
* @param value - The input value (string, number, or BigNumber) to convert to a BigNumber.
|
|
8
|
+
* @returns A BigNumber instance.
|
|
9
|
+
*/
|
|
4
10
|
bigNumber(value: BigNumber.BigNumber.Value) {
|
|
5
11
|
if (typeof value === 'string') {
|
|
6
12
|
return new BigNumber.BigNumber(value.replace(/,/g, ''));
|
|
@@ -10,10 +16,11 @@ export const NumberUtil = {
|
|
|
10
16
|
},
|
|
11
17
|
|
|
12
18
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @param
|
|
16
|
-
* @
|
|
19
|
+
* Multiplies two numbers using BigNumber for precision, especially with decimals.
|
|
20
|
+
* Handles undefined inputs by returning BigNumber(0).
|
|
21
|
+
* @param a - The first multiplicand (string, number, or BigNumber). Commas are removed if it's a string.
|
|
22
|
+
* @param b - The second multiplicand (string, number, or BigNumber). Commas are removed if it's a string.
|
|
23
|
+
* @returns The product as a BigNumber instance, or BigNumber(0) if either input is undefined.
|
|
17
24
|
*/
|
|
18
25
|
multiply(a: BigNumber.BigNumber.Value | undefined, b: BigNumber.BigNumber.Value | undefined) {
|
|
19
26
|
if (a === undefined || b === undefined) {
|
|
@@ -26,6 +33,13 @@ export const NumberUtil = {
|
|
|
26
33
|
return aBigNumber.multipliedBy(bBigNumber);
|
|
27
34
|
},
|
|
28
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Rounds a number to a specified number of decimal places if its string representation meets a certain length threshold.
|
|
38
|
+
* @param number - The number to potentially round.
|
|
39
|
+
* @param threshold - The minimum string length of the number to trigger rounding.
|
|
40
|
+
* @param fixed - The number of decimal places to round to.
|
|
41
|
+
* @returns The rounded number (as a string if rounded, otherwise the original number) or the original number.
|
|
42
|
+
*/
|
|
29
43
|
roundNumber(number: number, threshold: number, fixed: number) {
|
|
30
44
|
const roundedNumber =
|
|
31
45
|
number.toString().length >= threshold ? Number(number).toFixed(fixed) : number;
|
|
@@ -33,6 +47,12 @@ export const NumberUtil = {
|
|
|
33
47
|
return roundedNumber;
|
|
34
48
|
},
|
|
35
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Calculates the next multiple of ten greater than or equal to the given amount.
|
|
52
|
+
* Defaults to 10 if no amount is provided or if the calculated multiple is less than 10.
|
|
53
|
+
* @param amount - The number for which to find the next multiple of ten. Optional.
|
|
54
|
+
* @returns The next multiple of ten, at least 10.
|
|
55
|
+
*/
|
|
36
56
|
nextMultipleOfTen(amount?: number) {
|
|
37
57
|
if (!amount) return 10;
|
|
38
58
|
|
|
@@ -40,10 +60,10 @@ export const NumberUtil = {
|
|
|
40
60
|
},
|
|
41
61
|
|
|
42
62
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @param value - The value to format
|
|
45
|
-
* @param decimals - number of
|
|
46
|
-
* @returns
|
|
63
|
+
* Formats a number or string to a human-readable string with a specified number of decimal places, using US locale formatting.
|
|
64
|
+
* @param value - The value to format (string, number, or undefined). If undefined, returns '0.00'.
|
|
65
|
+
* @param decimals - The number of decimal places to display. Defaults to 2.
|
|
66
|
+
* @returns A locale-formatted string representation of the number.
|
|
47
67
|
*/
|
|
48
68
|
formatNumberToLocalString(value: string | number | undefined, decimals = 2) {
|
|
49
69
|
if (value === undefined) {
|
|
@@ -62,10 +82,11 @@ export const NumberUtil = {
|
|
|
62
82
|
minimumFractionDigits: decimals
|
|
63
83
|
});
|
|
64
84
|
},
|
|
85
|
+
|
|
65
86
|
/**
|
|
66
|
-
*
|
|
67
|
-
* @param value - The formatted string to parse
|
|
68
|
-
* @returns
|
|
87
|
+
* Parses a locale-formatted numeric string (e.g., with commas) back into a number.
|
|
88
|
+
* @param value - The formatted string to parse. If undefined, returns 0.
|
|
89
|
+
* @returns The parsed number, or 0 if the input is undefined.
|
|
69
90
|
*/
|
|
70
91
|
parseLocalStringToNumber(value: string | undefined) {
|
|
71
92
|
if (value === undefined) {
|
|
@@ -74,5 +95,27 @@ export const NumberUtil = {
|
|
|
74
95
|
|
|
75
96
|
// Remove any commas used as thousand separators and parse the float
|
|
76
97
|
return parseFloat(value.replace(/,/gu, ''));
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Converts a numeric value (BigInt, number, or string representation of a number) to a 0x-prefixed hexadecimal string.
|
|
102
|
+
* This is often required for Ethereum RPC parameters like value, gas, gasPrice.
|
|
103
|
+
* @param value - The value to convert. Can be BigInt, number, or a string (decimal or hex).
|
|
104
|
+
* @returns A 0x-prefixed hexadecimal string, or undefined if the input is undefined or null.
|
|
105
|
+
* @throws Error if the value cannot be converted to BigInt.
|
|
106
|
+
*/
|
|
107
|
+
convertNumericToHexString: (value: any): string | undefined => {
|
|
108
|
+
if (value === undefined || value === null) {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
// This handles BigInt, number, or string representation of a number (decimal or hex)
|
|
113
|
+
const bigIntValue = BigInt(value);
|
|
114
|
+
// Ethereum RPC spec requires "0x0" for zero, and other values to be 0x-prefixed hex.
|
|
115
|
+
|
|
116
|
+
return '0x' + bigIntValue.toString(16);
|
|
117
|
+
} catch (error) {
|
|
118
|
+
throw new Error(`NumberUtil: Invalid parameter, cannot convert to hex: ${value}`);
|
|
119
|
+
}
|
|
77
120
|
}
|
|
78
121
|
};
|
package/src/utils/PresetsUtil.ts
CHANGED
|
@@ -7,11 +7,11 @@ export const PresetsUtil = {
|
|
|
7
7
|
'fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa'
|
|
8
8
|
} as Record<string, string>,
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
NetworkImageIds: {
|
|
11
11
|
// Ethereum
|
|
12
12
|
1: 'ba0ba0cd-17c6-4806-ad93-f9d174f17900',
|
|
13
13
|
// Arbitrum
|
|
14
|
-
42161: '
|
|
14
|
+
42161: '3bff954d-5cb0-47a0-9a23-d20192e74600',
|
|
15
15
|
// Avalanche
|
|
16
16
|
43114: '30c46e53-e989-45fb-4549-be3bd4eb3b00',
|
|
17
17
|
// Binance Smart Chain
|
|
@@ -22,6 +22,20 @@ export const PresetsUtil = {
|
|
|
22
22
|
10: 'ab9c186a-c52f-464b-2906-ca59d760a400',
|
|
23
23
|
// Polygon
|
|
24
24
|
137: '41d04d42-da3b-4453-8506-668cc0727900',
|
|
25
|
+
// Mantle
|
|
26
|
+
5000: 'e86fae9b-b770-4eea-e520-150e12c81100',
|
|
27
|
+
// Hedera Mainnet
|
|
28
|
+
295: '6a97d510-cac8-4e58-c7ce-e8681b044c00',
|
|
29
|
+
// Sepolia
|
|
30
|
+
11_155_111: 'e909ea0a-f92a-4512-c8fc-748044ea6800',
|
|
31
|
+
// Base Sepolia
|
|
32
|
+
84532: 'a18a7ecd-e307-4360-4746-283182228e00',
|
|
33
|
+
// Unichain Sepolia
|
|
34
|
+
1301: '4eeea7ef-0014-4649-5d1d-07271a80f600',
|
|
35
|
+
// Unichain Mainnet
|
|
36
|
+
130: '2257980a-3463-48c6-cbac-a42d2a956e00',
|
|
37
|
+
// Monad Testnet
|
|
38
|
+
10_143: '0a728e83-bacb-46db-7844-948f05434900',
|
|
25
39
|
// Gnosis
|
|
26
40
|
100: '02b53f6a-e3d4-479e-1cb4-21178987d100',
|
|
27
41
|
// EVMos
|
|
@@ -45,7 +59,26 @@ export const PresetsUtil = {
|
|
|
45
59
|
// Base
|
|
46
60
|
8453: '7289c336-3981-4081-c5f4-efc26ac64a00',
|
|
47
61
|
// Aurora
|
|
48
|
-
1313161554: '3ff73439-a619-4894-9262-4470c773a100'
|
|
62
|
+
1313161554: '3ff73439-a619-4894-9262-4470c773a100',
|
|
63
|
+
// Ronin Mainnet
|
|
64
|
+
2020: 'b8101fc0-9c19-4b6f-ec65-f6dfff106e00',
|
|
65
|
+
// Saigon Testnet (a.k.a. Ronin)
|
|
66
|
+
2021: 'b8101fc0-9c19-4b6f-ec65-f6dfff106e00',
|
|
67
|
+
// Berachain Mainnet
|
|
68
|
+
80094: 'e329c2c9-59b0-4a02-83e4-212ff3779900',
|
|
69
|
+
// Abstract Mainnet
|
|
70
|
+
2741: 'fc2427d1-5af9-4a9c-8da5-6f94627cd900',
|
|
71
|
+
|
|
72
|
+
// Solana networks
|
|
73
|
+
/// Mainnet
|
|
74
|
+
'5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': 'a1b58899-f671-4276-6a5e-56ca5bd59700',
|
|
75
|
+
/// Testnet
|
|
76
|
+
'4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z': 'a1b58899-f671-4276-6a5e-56ca5bd59700',
|
|
77
|
+
|
|
78
|
+
// Bitcoin
|
|
79
|
+
'000000000019d6689c085ae165831e93': '0b4838db-0161-4ffe-022d-532bf03dba00',
|
|
80
|
+
// Bitcoin Testnet
|
|
81
|
+
'000000000933ea01ad0ee984209779ba': '39354064-d79b-420b-065d-f980c4b78200'
|
|
49
82
|
} as Record<string, string>,
|
|
50
83
|
|
|
51
84
|
ConnectorNamesMap: {
|