@reown/appkit-common-react-native 0.0.0-fix-approved-networks-20250822000414 → 0.0.0-fix-improvements-20250827190629
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 +94 -0
- package/lib/commonjs/adapters/BlockchainAdapter.js.map +1 -0
- package/lib/commonjs/adapters/EvmAdapter.js +193 -0
- package/lib/commonjs/adapters/EvmAdapter.js.map +1 -0
- package/lib/commonjs/adapters/SolanaBaseAdapter.js +10 -0
- package/lib/commonjs/adapters/SolanaBaseAdapter.js.map +1 -0
- package/lib/commonjs/contracts/erc20.js.map +1 -1
- package/lib/commonjs/contracts/usdt.js.map +1 -1
- package/lib/commonjs/index.js +66 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/networks/bitcoin.js +40 -0
- package/lib/commonjs/networks/bitcoin.js.map +1 -0
- package/lib/commonjs/networks/solana.js +78 -0
- package/lib/commonjs/networks/solana.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types/api/blockchain-api.js +15 -0
- package/lib/commonjs/types/api/blockchain-api.js.map +1 -0
- package/lib/commonjs/types/api/events.js +6 -0
- package/lib/commonjs/types/api/events.js.map +1 -0
- package/lib/commonjs/types/api/index.js +39 -0
- package/lib/commonjs/types/api/index.js.map +1 -0
- package/lib/commonjs/types/api/wallet-api.js +6 -0
- package/lib/commonjs/types/api/wallet-api.js.map +1 -0
- package/lib/commonjs/types/blockchain/adapter.js +6 -0
- package/lib/commonjs/types/blockchain/adapter.js.map +1 -0
- package/lib/commonjs/types/blockchain/balance.js +6 -0
- package/lib/commonjs/types/blockchain/balance.js.map +1 -0
- package/lib/commonjs/types/blockchain/index.js +50 -0
- package/lib/commonjs/types/blockchain/index.js.map +1 -0
- package/lib/commonjs/types/blockchain/network.js +6 -0
- package/lib/commonjs/types/blockchain/network.js.map +1 -0
- package/lib/commonjs/types/blockchain/transaction.js +2 -0
- package/lib/commonjs/types/blockchain/transaction.js.map +1 -0
- package/lib/commonjs/types/common.js +2 -0
- package/lib/commonjs/types/common.js.map +1 -0
- package/lib/commonjs/types/index.js +105 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/onramp/countries.js +2 -0
- package/lib/commonjs/types/onramp/countries.js.map +1 -0
- package/lib/commonjs/types/onramp/currencies.js +2 -0
- package/lib/commonjs/types/onramp/currencies.js.map +1 -0
- package/lib/commonjs/types/onramp/errors.js +22 -0
- package/lib/commonjs/types/onramp/errors.js.map +1 -0
- package/lib/commonjs/types/onramp/index.js +50 -0
- package/lib/commonjs/types/onramp/index.js.map +1 -0
- package/lib/commonjs/types/onramp/quotes.js +2 -0
- package/lib/commonjs/types/onramp/quotes.js.map +1 -0
- package/lib/commonjs/types/siwe/config.js +6 -0
- package/lib/commonjs/types/siwe/config.js.map +1 -0
- package/lib/commonjs/types/siwe/index.js +28 -0
- package/lib/commonjs/types/siwe/index.js.map +1 -0
- package/lib/commonjs/types/siwe/message.js +6 -0
- package/lib/commonjs/types/siwe/message.js.map +1 -0
- package/lib/commonjs/types/storage.js +2 -0
- package/lib/commonjs/types/storage.js.map +1 -0
- package/lib/commonjs/types/swap/index.js +17 -0
- package/lib/commonjs/types/swap/index.js.map +1 -0
- package/lib/commonjs/types/swap/tokens.js +6 -0
- package/lib/commonjs/types/swap/tokens.js.map +1 -0
- package/lib/commonjs/types/ui.js +6 -0
- package/lib/commonjs/{utils/TypeUtil.js.map → types/ui.js.map} +1 -1
- package/lib/commonjs/types/wallet/connection.js +6 -0
- package/lib/commonjs/types/wallet/connection.js.map +1 -0
- package/lib/commonjs/types/wallet/connector.js +30 -0
- package/lib/commonjs/types/wallet/connector.js.map +1 -0
- package/lib/commonjs/types/wallet/index.js +39 -0
- package/lib/commonjs/types/wallet/index.js.map +1 -0
- package/lib/commonjs/types/wallet/wallet-info.js +6 -0
- package/lib/commonjs/types/wallet/wallet-info.js.map +1 -0
- package/lib/commonjs/utils/ConstantsUtil.js +52 -6
- package/lib/commonjs/utils/ConstantsUtil.js.map +1 -1
- package/lib/commonjs/utils/ContractUtil.js.map +1 -1
- package/lib/commonjs/utils/DateUtil.js.map +1 -1
- package/lib/commonjs/utils/ErrorUtil.js.map +1 -1
- package/lib/commonjs/utils/NamesUtil.js.map +1 -1
- package/lib/commonjs/utils/NetworkUtil.js +3 -0
- package/lib/commonjs/utils/NetworkUtil.js.map +1 -1
- package/lib/commonjs/utils/NumberUtil.js +53 -13
- package/lib/commonjs/utils/NumberUtil.js.map +1 -1
- package/lib/commonjs/utils/PresetsUtil.js +34 -21
- package/lib/commonjs/utils/PresetsUtil.js.map +1 -1
- package/lib/commonjs/utils/StringUtil.js +7 -0
- package/lib/commonjs/utils/StringUtil.js.map +1 -1
- package/lib/module/adapters/BlockchainAdapter.js +89 -0
- package/lib/module/adapters/BlockchainAdapter.js.map +1 -0
- package/lib/module/adapters/EvmAdapter.js +189 -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/contracts/erc20.js +2 -0
- package/lib/module/contracts/erc20.js.map +1 -1
- package/lib/module/contracts/usdt.js +2 -0
- package/lib/module/contracts/usdt.js.map +1 -1
- package/lib/module/index.js +8 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/networks/bitcoin.js +36 -0
- package/lib/module/networks/bitcoin.js.map +1 -0
- package/lib/module/networks/solana.js +74 -0
- package/lib/module/networks/solana.js.map +1 -0
- package/lib/module/types/api/blockchain-api.js +10 -0
- package/lib/module/types/api/blockchain-api.js.map +1 -0
- package/lib/module/types/api/events.js +4 -0
- package/lib/module/types/api/events.js.map +1 -0
- package/lib/module/types/api/index.js +7 -0
- package/lib/module/types/api/index.js.map +1 -0
- package/lib/module/types/api/wallet-api.js +4 -0
- package/lib/module/types/api/wallet-api.js.map +1 -0
- package/lib/module/types/blockchain/adapter.js +4 -0
- package/lib/module/types/blockchain/adapter.js.map +1 -0
- package/lib/module/types/blockchain/balance.js +4 -0
- package/lib/module/types/blockchain/balance.js.map +1 -0
- package/lib/module/types/blockchain/index.js +8 -0
- package/lib/module/types/blockchain/index.js.map +1 -0
- package/lib/module/types/blockchain/network.js +4 -0
- package/lib/module/types/blockchain/network.js.map +1 -0
- package/lib/module/types/blockchain/transaction.js +2 -0
- package/lib/module/types/blockchain/transaction.js.map +1 -0
- package/lib/module/types/common.js +2 -0
- package/lib/module/types/common.js.map +1 -0
- package/lib/module/types/index.js +31 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/onramp/countries.js +2 -0
- package/lib/module/types/onramp/countries.js.map +1 -0
- package/lib/module/types/onramp/currencies.js +2 -0
- package/lib/module/types/onramp/currencies.js.map +1 -0
- package/lib/module/types/onramp/errors.js +18 -0
- package/lib/module/types/onramp/errors.js.map +1 -0
- package/lib/module/types/onramp/index.js +8 -0
- package/lib/module/types/onramp/index.js.map +1 -0
- package/lib/module/types/onramp/quotes.js +2 -0
- package/lib/module/types/onramp/quotes.js.map +1 -0
- package/lib/module/types/siwe/config.js +4 -0
- package/lib/module/types/siwe/config.js.map +1 -0
- package/lib/module/types/siwe/index.js +6 -0
- package/lib/module/types/siwe/index.js.map +1 -0
- package/lib/module/types/siwe/message.js +4 -0
- package/lib/module/types/siwe/message.js.map +1 -0
- package/lib/module/types/storage.js +2 -0
- package/lib/module/types/storage.js.map +1 -0
- package/lib/module/types/swap/index.js +5 -0
- package/lib/module/types/swap/index.js.map +1 -0
- package/lib/module/types/swap/tokens.js +4 -0
- package/lib/module/types/swap/tokens.js.map +1 -0
- package/lib/module/types/ui.js +4 -0
- package/lib/module/{utils/TypeUtil.js.map → types/ui.js.map} +1 -1
- package/lib/module/types/wallet/connection.js +4 -0
- package/lib/module/types/wallet/connection.js.map +1 -0
- package/lib/module/types/wallet/connector.js +25 -0
- package/lib/module/types/wallet/connector.js.map +1 -0
- package/lib/module/types/wallet/index.js +7 -0
- package/lib/module/types/wallet/index.js.map +1 -0
- package/lib/module/types/wallet/wallet-info.js +4 -0
- package/lib/module/types/wallet/wallet-info.js.map +1 -0
- package/lib/module/utils/ConstantsUtil.js +54 -6
- package/lib/module/utils/ConstantsUtil.js.map +1 -1
- package/lib/module/utils/ContractUtil.js +2 -0
- package/lib/module/utils/ContractUtil.js.map +1 -1
- package/lib/module/utils/DateUtil.js +2 -0
- package/lib/module/utils/DateUtil.js.map +1 -1
- package/lib/module/utils/ErrorUtil.js +2 -0
- package/lib/module/utils/ErrorUtil.js.map +1 -1
- package/lib/module/utils/NamesUtil.js +2 -0
- package/lib/module/utils/NamesUtil.js.map +1 -1
- package/lib/module/utils/NetworkUtil.js +5 -0
- package/lib/module/utils/NetworkUtil.js.map +1 -1
- package/lib/module/utils/NumberUtil.js +54 -11
- package/lib/module/utils/NumberUtil.js.map +1 -1
- package/lib/module/utils/PresetsUtil.js +36 -21
- package/lib/module/utils/PresetsUtil.js.map +1 -1
- package/lib/module/utils/StringUtil.js +9 -0
- package/lib/module/utils/StringUtil.js.map +1 -1
- package/lib/typescript/adapters/BlockchainAdapter.d.ts +26 -0
- package/lib/typescript/adapters/BlockchainAdapter.d.ts.map +1 -0
- package/lib/typescript/adapters/EvmAdapter.d.ts +26 -0
- package/lib/typescript/adapters/EvmAdapter.d.ts.map +1 -0
- package/lib/typescript/adapters/SolanaBaseAdapter.d.ts +6 -0
- package/lib/typescript/adapters/SolanaBaseAdapter.d.ts.map +1 -0
- package/lib/typescript/adapters/__tests__/EvmAdapter.test.d.ts +2 -0
- package/lib/typescript/adapters/__tests__/EvmAdapter.test.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +6 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/networks/bitcoin.d.ts +4 -0
- package/lib/typescript/networks/bitcoin.d.ts.map +1 -0
- package/lib/typescript/networks/solana.d.ts +5 -0
- package/lib/typescript/networks/solana.d.ts.map +1 -0
- package/lib/typescript/types/api/blockchain-api.d.ts +183 -0
- package/lib/typescript/types/api/blockchain-api.d.ts.map +1 -0
- package/lib/typescript/types/api/events.d.ts +304 -0
- package/lib/typescript/types/api/events.d.ts.map +1 -0
- package/lib/typescript/types/api/index.d.ts +4 -0
- package/lib/typescript/types/api/index.d.ts.map +1 -0
- package/lib/typescript/types/api/wallet-api.d.ts +50 -0
- package/lib/typescript/types/api/wallet-api.d.ts.map +1 -0
- package/lib/typescript/types/blockchain/adapter.d.ts +40 -0
- package/lib/typescript/types/blockchain/adapter.d.ts.map +1 -0
- package/lib/typescript/types/blockchain/balance.d.ts +28 -0
- package/lib/typescript/types/blockchain/balance.d.ts.map +1 -0
- package/lib/typescript/types/blockchain/index.d.ts +5 -0
- package/lib/typescript/types/blockchain/index.d.ts.map +1 -0
- package/lib/typescript/types/blockchain/network.d.ts +47 -0
- package/lib/typescript/types/blockchain/network.d.ts.map +1 -0
- package/lib/typescript/{utils/TypeUtil.d.ts → types/blockchain/transaction.d.ts} +1 -22
- package/lib/typescript/types/blockchain/transaction.d.ts.map +1 -0
- package/lib/typescript/types/common.d.ts +24 -0
- package/lib/typescript/types/common.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +10 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/lib/typescript/types/onramp/countries.d.ts +11 -0
- package/lib/typescript/types/onramp/countries.d.ts.map +1 -0
- package/lib/typescript/types/onramp/currencies.d.ts +30 -0
- package/lib/typescript/types/onramp/currencies.d.ts.map +1 -0
- package/lib/typescript/types/onramp/errors.d.ts +21 -0
- package/lib/typescript/types/onramp/errors.d.ts.map +1 -0
- package/lib/typescript/types/onramp/index.d.ts +5 -0
- package/lib/typescript/types/onramp/index.d.ts.map +1 -0
- package/lib/typescript/types/onramp/quotes.d.ts +45 -0
- package/lib/typescript/types/onramp/quotes.d.ts.map +1 -0
- package/lib/typescript/types/siwe/config.d.ts +31 -0
- package/lib/typescript/types/siwe/config.d.ts.map +1 -0
- package/lib/typescript/types/siwe/index.d.ts +3 -0
- package/lib/typescript/types/siwe/index.d.ts.map +1 -0
- package/lib/typescript/types/siwe/message.d.ts +57 -0
- package/lib/typescript/types/siwe/message.d.ts.map +1 -0
- package/lib/typescript/types/storage.d.ts +27 -0
- package/lib/typescript/types/storage.d.ts.map +1 -0
- package/lib/typescript/types/swap/index.d.ts +2 -0
- package/lib/typescript/types/swap/index.d.ts.map +1 -0
- package/lib/typescript/types/swap/tokens.d.ts +19 -0
- package/lib/typescript/types/swap/tokens.d.ts.map +1 -0
- package/lib/typescript/types/ui.d.ts +26 -0
- package/lib/typescript/types/ui.d.ts.map +1 -0
- package/lib/typescript/types/wallet/connection.d.ts +30 -0
- package/lib/typescript/types/wallet/connection.d.ts.map +1 -0
- package/lib/typescript/types/wallet/connector.d.ts +61 -0
- package/lib/typescript/types/wallet/connector.d.ts.map +1 -0
- package/lib/typescript/types/wallet/index.d.ts +4 -0
- package/lib/typescript/types/wallet/index.d.ts.map +1 -0
- package/lib/typescript/types/wallet/wallet-info.d.ts +36 -0
- package/lib/typescript/types/wallet/wallet-info.d.ts.map +1 -0
- package/lib/typescript/utils/ConstantsUtil.d.ts +48 -4
- package/lib/typescript/utils/ConstantsUtil.d.ts.map +1 -1
- package/lib/typescript/utils/NetworkUtil.d.ts +2 -0
- package/lib/typescript/utils/NetworkUtil.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 -6
- package/lib/typescript/utils/PresetsUtil.d.ts.map +1 -1
- package/lib/typescript/utils/StringUtil.d.ts +1 -0
- package/lib/typescript/utils/StringUtil.d.ts.map +1 -1
- package/package.json +6 -16
- package/src/adapters/BlockchainAdapter.ts +126 -0
- package/src/adapters/EvmAdapter.ts +247 -0
- package/src/adapters/SolanaBaseAdapter.ts +6 -0
- package/src/adapters/__tests__/EvmAdapter.test.ts +126 -0
- package/src/index.ts +7 -1
- package/src/networks/bitcoin.ts +32 -0
- package/src/networks/solana.ts +44 -0
- package/src/types/api/blockchain-api.ts +213 -0
- package/src/types/api/events.ts +394 -0
- package/src/types/api/index.ts +4 -0
- package/src/types/api/wallet-api.ts +70 -0
- package/src/types/blockchain/adapter.ts +52 -0
- package/src/types/blockchain/balance.ts +31 -0
- package/src/types/blockchain/index.ts +5 -0
- package/src/types/blockchain/network.ts +39 -0
- package/src/{utils/TypeUtil.ts → types/blockchain/transaction.ts} +0 -26
- package/src/types/common.ts +56 -0
- package/src/types/index.ts +28 -0
- package/src/types/onramp/countries.ts +11 -0
- package/src/types/onramp/currencies.ts +32 -0
- package/src/types/onramp/errors.ts +22 -0
- package/src/types/onramp/index.ts +5 -0
- package/src/types/onramp/quotes.ts +46 -0
- package/src/types/siwe/config.ts +44 -0
- package/src/types/siwe/index.ts +3 -0
- package/src/types/siwe/message.ts +62 -0
- package/src/types/storage.ts +30 -0
- package/src/types/swap/index.ts +2 -0
- package/src/types/swap/tokens.ts +21 -0
- package/src/types/ui.ts +26 -0
- package/src/types/wallet/connection.ts +33 -0
- package/src/types/wallet/connector.ts +85 -0
- package/src/types/wallet/index.ts +4 -0
- package/src/types/wallet/wallet-info.ts +41 -0
- package/src/utils/ConstantsUtil.ts +55 -8
- package/src/utils/NetworkUtil.ts +5 -0
- package/src/utils/NumberUtil.ts +54 -11
- package/src/utils/PresetsUtil.ts +34 -26
- package/src/utils/StringUtil.ts +7 -0
- package/lib/commonjs/utils/TypeUtil.js +0 -2
- package/lib/module/utils/TypeUtil.js +0 -2
- package/lib/typescript/utils/TypeUtil.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/blockchain/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ChainNamespace, CaipNetworkId } from '../common';
|
|
2
|
+
export type Network = {
|
|
3
|
+
id: number | string;
|
|
4
|
+
name: string;
|
|
5
|
+
nativeCurrency: {
|
|
6
|
+
name: string;
|
|
7
|
+
symbol: string;
|
|
8
|
+
decimals: number;
|
|
9
|
+
};
|
|
10
|
+
rpcUrls: {
|
|
11
|
+
default: {
|
|
12
|
+
http: readonly string[];
|
|
13
|
+
};
|
|
14
|
+
[key: string]: {
|
|
15
|
+
http: readonly string[];
|
|
16
|
+
} | undefined;
|
|
17
|
+
};
|
|
18
|
+
blockExplorers?: {
|
|
19
|
+
default: {
|
|
20
|
+
name: string;
|
|
21
|
+
url: string;
|
|
22
|
+
};
|
|
23
|
+
[key: string]: {
|
|
24
|
+
name: string;
|
|
25
|
+
url: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
};
|
|
28
|
+
chainNamespace?: ChainNamespace;
|
|
29
|
+
caipNetworkId?: CaipNetworkId;
|
|
30
|
+
testnet?: boolean;
|
|
31
|
+
deprecatedCaipNetworkId?: CaipNetworkId;
|
|
32
|
+
imageUrl?: string;
|
|
33
|
+
};
|
|
34
|
+
export type AppKitNetwork = Network & {
|
|
35
|
+
chainNamespace: ChainNamespace;
|
|
36
|
+
caipNetworkId: CaipNetworkId;
|
|
37
|
+
};
|
|
38
|
+
export interface CaipNetwork {
|
|
39
|
+
id: CaipNetworkId;
|
|
40
|
+
name?: string;
|
|
41
|
+
imageId?: string;
|
|
42
|
+
imageUrl?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface AppKitOpenOptions {
|
|
45
|
+
view: 'Account' | 'Connect' | 'Networks' | 'Swap' | 'OnRamp';
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../src/types/blockchain/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,E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ChC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;CAC9D"}
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
export interface Balance {
|
|
2
|
-
name: string;
|
|
3
|
-
symbol: string;
|
|
4
|
-
chainId: string;
|
|
5
|
-
address?: string;
|
|
6
|
-
value?: number;
|
|
7
|
-
price: number;
|
|
8
|
-
quantity: BalanceQuantity;
|
|
9
|
-
iconUrl: string;
|
|
10
|
-
}
|
|
11
|
-
type BalanceQuantity = {
|
|
12
|
-
decimals: string;
|
|
13
|
-
numeric: string;
|
|
14
|
-
};
|
|
15
1
|
export type TransactionStatus = 'confirmed' | 'failed' | 'pending';
|
|
16
2
|
export type TransactionDirection = 'in' | 'out' | 'self';
|
|
17
3
|
export type TransactionImage = {
|
|
@@ -74,11 +60,4 @@ export interface TransactionDetail {
|
|
|
74
60
|
export interface TransactionQuantity {
|
|
75
61
|
numeric: string;
|
|
76
62
|
}
|
|
77
|
-
|
|
78
|
-
export type ThemeMode = 'dark' | 'light';
|
|
79
|
-
export interface ThemeVariables {
|
|
80
|
-
accent?: string;
|
|
81
|
-
}
|
|
82
|
-
export type ConnectorType = 'WALLET_CONNECT' | 'COINBASE' | 'AUTH' | 'EXTERNAL';
|
|
83
|
-
export {};
|
|
84
|
-
//# sourceMappingURL=TypeUtil.d.ts.map
|
|
63
|
+
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../../src/types/blockchain/transaction.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AACnE,MAAM,MAAM,oBAAoB,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,UAAU,GAAG,KAAK,GAAG,SAAS,C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MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type CaipAddress = `${string}:${string}:${string}`;
|
|
2
|
+
export type CaipNetworkId = `${string}:${string}`;
|
|
3
|
+
export type ChainNamespace = 'eip155' | 'solana' | 'polkadot' | 'bip122';
|
|
4
|
+
export type AdapterType = 'solana' | 'wagmi' | 'ethers' | 'universal' | 'bip122';
|
|
5
|
+
export type AccountType = 'eoa' | 'smartAccount';
|
|
6
|
+
export type SocialProvider = 'google' | 'facebook' | 'github' | 'apple' | 'x' | 'discord' | 'email' | 'farcaster';
|
|
7
|
+
export type ThemeMode = 'dark' | 'light';
|
|
8
|
+
export interface ThemeVariables {
|
|
9
|
+
accent?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BaseError {
|
|
12
|
+
message?: string;
|
|
13
|
+
}
|
|
14
|
+
export type ProjectId = string;
|
|
15
|
+
export type Platform = 'mobile' | 'web' | 'qrcode' | 'email' | 'unsupported';
|
|
16
|
+
export type SdkType = 'appkit';
|
|
17
|
+
export type SdkVersion = `react-native-${string}-${string}`;
|
|
18
|
+
export type RequestCache = 'default' | 'force-cache' | 'no-cache' | 'no-store' | 'only-if-cached' | 'reload';
|
|
19
|
+
export type CaipNamespaces = Record<string, {
|
|
20
|
+
chains: CaipNetworkId[];
|
|
21
|
+
methods: string[];
|
|
22
|
+
events: string[];
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.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,MAAM,EAAE,CAAC;CAClB,CACF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './common';
|
|
2
|
+
export * from './blockchain';
|
|
3
|
+
export * from './wallet';
|
|
4
|
+
export * from './api';
|
|
5
|
+
export * from './swap';
|
|
6
|
+
export * from './onramp';
|
|
7
|
+
export * from './siwe';
|
|
8
|
+
export * from './storage';
|
|
9
|
+
export * from './ui';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAC;AAGzB,cAAc,cAAc,CAAC;AAG7B,cAAc,UAAU,CAAC;AAGzB,cAAc,OAAO,CAAC;AAGtB,cAAc,QAAQ,CAAC;AAGvB,cAAc,UAAU,CAAC;AAGzB,cAAc,QAAQ,CAAC;AAGvB,cAAc,WAAW,CAAC;AAG1B,cAAc,MAAM,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type OnRampCountry = {
|
|
2
|
+
countryCode: string;
|
|
3
|
+
flagImageUrl: string;
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
export type OnRampCountryDefaults = {
|
|
7
|
+
countryCode: string;
|
|
8
|
+
defaultCurrencyCode: string;
|
|
9
|
+
defaultPaymentMethods: string[];
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=countries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/countries.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type OnRampFiatCurrency = {
|
|
2
|
+
currencyCode: string;
|
|
3
|
+
name: string;
|
|
4
|
+
symbolImageUrl: string;
|
|
5
|
+
};
|
|
6
|
+
export type OnRampCryptoCurrency = {
|
|
7
|
+
currencyCode: string;
|
|
8
|
+
name: string;
|
|
9
|
+
chainCode: string;
|
|
10
|
+
chainName: string;
|
|
11
|
+
chainId: string;
|
|
12
|
+
contractAddress: string | null;
|
|
13
|
+
symbolImageUrl: string;
|
|
14
|
+
};
|
|
15
|
+
export type OnRampFiatLimit = {
|
|
16
|
+
currencyCode: string;
|
|
17
|
+
defaultAmount: number | null;
|
|
18
|
+
minimumAmount: number;
|
|
19
|
+
maximumAmount: number;
|
|
20
|
+
};
|
|
21
|
+
export type OnRampTransactionResult = {
|
|
22
|
+
purchaseCurrency: string | null;
|
|
23
|
+
purchaseAmount: string | null;
|
|
24
|
+
purchaseImageUrl: string | null;
|
|
25
|
+
paymentCurrency: string | null;
|
|
26
|
+
paymentAmount: string | null;
|
|
27
|
+
status: string | null;
|
|
28
|
+
network: string | null;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=currencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currencies.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/currencies.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const OnRampErrorType: {
|
|
2
|
+
readonly AMOUNT_TOO_LOW: "INVALID_AMOUNT_TOO_LOW";
|
|
3
|
+
readonly AMOUNT_TOO_HIGH: "INVALID_AMOUNT_TOO_HIGH";
|
|
4
|
+
readonly INVALID_AMOUNT: "INVALID_AMOUNT";
|
|
5
|
+
readonly INCOMPATIBLE_REQUEST: "INCOMPATIBLE_REQUEST";
|
|
6
|
+
readonly BAD_REQUEST: "BAD_REQUEST";
|
|
7
|
+
readonly NO_VALID_QUOTES: "NO_VALID_QUOTES";
|
|
8
|
+
readonly FAILED_TO_LOAD: "FAILED_TO_LOAD";
|
|
9
|
+
readonly FAILED_TO_LOAD_COUNTRIES: "FAILED_TO_LOAD_COUNTRIES";
|
|
10
|
+
readonly FAILED_TO_LOAD_PROVIDERS: "FAILED_TO_LOAD_PROVIDERS";
|
|
11
|
+
readonly FAILED_TO_LOAD_METHODS: "FAILED_TO_LOAD_METHODS";
|
|
12
|
+
readonly FAILED_TO_LOAD_CURRENCIES: "FAILED_TO_LOAD_CURRENCIES";
|
|
13
|
+
readonly FAILED_TO_LOAD_LIMITS: "FAILED_TO_LOAD_LIMITS";
|
|
14
|
+
readonly UNKNOWN: "UNKNOWN_ERROR";
|
|
15
|
+
};
|
|
16
|
+
export type OnRampErrorTypeValues = (typeof OnRampErrorType)[keyof typeof OnRampErrorType];
|
|
17
|
+
export interface OnRampError {
|
|
18
|
+
type: OnRampErrorTypeValues;
|
|
19
|
+
message: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;CAclB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAE3F,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export type OnRampPaymentMethod = {
|
|
2
|
+
logos: {
|
|
3
|
+
dark: string;
|
|
4
|
+
light: string;
|
|
5
|
+
};
|
|
6
|
+
name: string;
|
|
7
|
+
paymentMethod: string;
|
|
8
|
+
paymentType: string;
|
|
9
|
+
};
|
|
10
|
+
export type OnRampQuote = {
|
|
11
|
+
countryCode: string;
|
|
12
|
+
customerScore: number;
|
|
13
|
+
destinationAmount: number;
|
|
14
|
+
destinationAmountWithoutFees: number;
|
|
15
|
+
destinationCurrencyCode: string;
|
|
16
|
+
exchangeRate: number;
|
|
17
|
+
fiatAmountWithoutFees: number;
|
|
18
|
+
lowKyc: boolean;
|
|
19
|
+
networkFee: number;
|
|
20
|
+
paymentMethodType: string;
|
|
21
|
+
serviceProvider: string;
|
|
22
|
+
sourceAmount: number;
|
|
23
|
+
sourceAmountWithoutFees: number;
|
|
24
|
+
sourceCurrencyCode: string;
|
|
25
|
+
totalFee: number;
|
|
26
|
+
transactionFee: number;
|
|
27
|
+
transactionType: string;
|
|
28
|
+
};
|
|
29
|
+
export type OnRampServiceProvider = {
|
|
30
|
+
categories: string[];
|
|
31
|
+
categoryStatuses: {
|
|
32
|
+
additionalProp: string;
|
|
33
|
+
};
|
|
34
|
+
logos: {
|
|
35
|
+
dark: string;
|
|
36
|
+
darkShort: string;
|
|
37
|
+
light: string;
|
|
38
|
+
lightShort: string;
|
|
39
|
+
};
|
|
40
|
+
name: string;
|
|
41
|
+
serviceProvider: string;
|
|
42
|
+
status: string;
|
|
43
|
+
websiteUrl: string;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=quotes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../../../src/types/onramp/quotes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4BAA4B,EAAE,MAAM,CAAC;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,EAAE,MAAM,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,gBAAgB,EAAE;QAChB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { SIWESession, SIWECreateMessageArgs, SIWEMessageArgs, SIWEVerifyMessageArgs } from './message';
|
|
2
|
+
export interface SIWEClientMethods {
|
|
3
|
+
getNonce: (address?: string) => Promise<string>;
|
|
4
|
+
createMessage: (args: SIWECreateMessageArgs) => string;
|
|
5
|
+
verifyMessage: (args: SIWEVerifyMessageArgs) => Promise<boolean>;
|
|
6
|
+
getSession: () => Promise<SIWESession | null>;
|
|
7
|
+
signOut: () => Promise<boolean>;
|
|
8
|
+
getMessageParams?: () => Promise<SIWEMessageArgs>;
|
|
9
|
+
onSignIn?: (session?: SIWESession) => void;
|
|
10
|
+
onSignOut?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface SIWEConfig extends SIWEClientMethods {
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
nonceRefetchIntervalMs?: number;
|
|
15
|
+
sessionRefetchIntervalMs?: number;
|
|
16
|
+
signOutOnDisconnect?: boolean;
|
|
17
|
+
signOutOnAccountChange?: boolean;
|
|
18
|
+
signOutOnNetworkChange?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface AppKitSIWEClient extends SIWEClientMethods {
|
|
21
|
+
signIn: () => Promise<SIWESession | undefined>;
|
|
22
|
+
options: {
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
nonceRefetchIntervalMs: number;
|
|
25
|
+
sessionRefetchIntervalMs: number;
|
|
26
|
+
signOutOnDisconnect: boolean;
|
|
27
|
+
signOutOnAccountChange: boolean;
|
|
28
|
+
signOutOnNetworkChange: boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/types/siwe/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAChD,aAAa,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,MAAM,CAAC;IACvD,aAAa,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,UAAU,EAAE,MAAM,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC9C,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;IAClD,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IAEnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IACzD,MAAM,EAAE,MAAM,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAC/C,OAAO,EAAE;QACP,OAAO,EAAE,OAAO,CAAC;QACjB,sBAAsB,EAAE,MAAM,CAAC;QAC/B,wBAAwB,EAAE,MAAM,CAAC;QACjC,mBAAmB,EAAE,OAAO,CAAC;QAC7B,sBAAsB,EAAE,OAAO,CAAC;QAChC,sBAAsB,EAAE,OAAO,CAAC;KACjC,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/siwe/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { CaipAddress, CaipNetworkId } from '../common';
|
|
2
|
+
export interface SIWESession {
|
|
3
|
+
address: string;
|
|
4
|
+
chainId: number;
|
|
5
|
+
}
|
|
6
|
+
interface CacaoHeader {
|
|
7
|
+
t: 'caip122';
|
|
8
|
+
}
|
|
9
|
+
export interface SIWECreateMessageArgs {
|
|
10
|
+
domain: string;
|
|
11
|
+
nonce: string;
|
|
12
|
+
uri: string;
|
|
13
|
+
address: CaipAddress;
|
|
14
|
+
version: '1';
|
|
15
|
+
type?: CacaoHeader['t'];
|
|
16
|
+
nbf?: string;
|
|
17
|
+
exp?: string;
|
|
18
|
+
statement?: string;
|
|
19
|
+
requestId?: string;
|
|
20
|
+
resources?: string[];
|
|
21
|
+
expiry?: number;
|
|
22
|
+
iat?: string;
|
|
23
|
+
}
|
|
24
|
+
export type SIWEMessageArgs = {
|
|
25
|
+
chains: CaipNetworkId[];
|
|
26
|
+
methods?: string[];
|
|
27
|
+
} & Omit<SIWECreateMessageArgs, 'address' | 'nonce' | 'version'>;
|
|
28
|
+
interface CacaoPayload {
|
|
29
|
+
domain: string;
|
|
30
|
+
aud: string;
|
|
31
|
+
nonce: string;
|
|
32
|
+
iss: string;
|
|
33
|
+
version?: string;
|
|
34
|
+
iat?: string;
|
|
35
|
+
nbf?: string;
|
|
36
|
+
exp?: string;
|
|
37
|
+
statement?: string;
|
|
38
|
+
requestId?: string;
|
|
39
|
+
resources?: string[];
|
|
40
|
+
type?: string;
|
|
41
|
+
}
|
|
42
|
+
interface Cacao {
|
|
43
|
+
h: CacaoHeader;
|
|
44
|
+
p: CacaoPayload;
|
|
45
|
+
s: {
|
|
46
|
+
t: 'eip191' | 'eip1271';
|
|
47
|
+
s: string;
|
|
48
|
+
m?: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface SIWEVerifyMessageArgs {
|
|
52
|
+
message: string;
|
|
53
|
+
signature: string;
|
|
54
|
+
cacao?: Cacao;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/types/siwe/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC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EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb,CAAC,EAAE,WAAW,CAAC;IACf,CAAC,EAAE,YAAY,CAAC;IAChB,CAAC,EAAE;QACD,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;QACxB,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,CAAC,EAAE,MAAM,CAAC;KACZ,CAAC;CACH;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface Storage {
|
|
2
|
+
/**
|
|
3
|
+
* Returns all keys in storage.
|
|
4
|
+
*/
|
|
5
|
+
getKeys(): Promise<string[]>;
|
|
6
|
+
/**
|
|
7
|
+
* Returns all key-value entries in storage.
|
|
8
|
+
*/
|
|
9
|
+
getEntries<T = any>(): Promise<[string, T][]>;
|
|
10
|
+
/**
|
|
11
|
+
* Get an item from storage for a given key.
|
|
12
|
+
* @param key The key to retrieve.
|
|
13
|
+
*/
|
|
14
|
+
getItem<T = any>(key: string): Promise<T | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* Set an item in storage for a given key.
|
|
17
|
+
* @param key The key to set.
|
|
18
|
+
* @param value The value to set.
|
|
19
|
+
*/
|
|
20
|
+
setItem<T = any>(key: string, value: T): Promise<void>;
|
|
21
|
+
/**
|
|
22
|
+
* Remove an item from storage for a given key.
|
|
23
|
+
* @param key The key to remove.
|
|
24
|
+
*/
|
|
25
|
+
removeItem(key: string): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/types/storage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAE7B;;OAEG;IACH,UAAU,CAAC,CAAC,GAAG,GAAG,KAAK,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAE9C;;;OAGG;IACH,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAEtD;;;;OAIG;IACH,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvD;;;OAGG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/swap/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CaipAddress } from '../common';
|
|
2
|
+
export type SwapToken = {
|
|
3
|
+
name: string;
|
|
4
|
+
symbol: string;
|
|
5
|
+
address: CaipAddress;
|
|
6
|
+
decimals: number;
|
|
7
|
+
logoUri: string;
|
|
8
|
+
eip2612?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type SwapTokenWithBalance = SwapToken & {
|
|
11
|
+
quantity: {
|
|
12
|
+
decimals: string;
|
|
13
|
+
numeric: string;
|
|
14
|
+
};
|
|
15
|
+
price: number;
|
|
16
|
+
value: number;
|
|
17
|
+
};
|
|
18
|
+
export type SwapInputTarget = 'sourceToken' | 'toToken';
|
|
19
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../../src/types/swap/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG;IAC7C,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SocialProvider } from './common';
|
|
2
|
+
type EnabledSocials = SocialProvider;
|
|
3
|
+
export type Features = {
|
|
4
|
+
/**
|
|
5
|
+
* @description Enable or disable the swaps feature. Enabled by default.
|
|
6
|
+
* @type {boolean}
|
|
7
|
+
*/
|
|
8
|
+
swaps?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @description Enable or disable the onramp feature. Enabled by default.
|
|
11
|
+
* @type {boolean}
|
|
12
|
+
*/
|
|
13
|
+
onramp?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @description Show or hide the regular wallet options when socials are enabled. Enabled by default.
|
|
16
|
+
* @type {boolean}
|
|
17
|
+
*/
|
|
18
|
+
showWallets?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description Enable or disable the socials feature. Enabled by default.
|
|
21
|
+
* @type {EnabledSocials[]}
|
|
22
|
+
*/
|
|
23
|
+
socials?: EnabledSocials[] | false;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=ui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/types/ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,KAAK,cAAc,GAAG,cAAc,CAAC;AAErC,MAAM,MAAM,QAAQ,GAAG;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CaipAddress, CaipNetworkId, SocialProvider, AccountType } from '../common';
|
|
2
|
+
import type { Balance } from '../blockchain/balance';
|
|
3
|
+
import type { WalletInfo, Identity } from './wallet-info';
|
|
4
|
+
import type { BlockchainAdapter } from '../../adapters/BlockchainAdapter';
|
|
5
|
+
export interface Connection {
|
|
6
|
+
accounts: CaipAddress[];
|
|
7
|
+
balances: Map<CaipAddress, Balance[]>;
|
|
8
|
+
adapter: BlockchainAdapter;
|
|
9
|
+
caipNetwork: CaipNetworkId;
|
|
10
|
+
wallet?: WalletInfo;
|
|
11
|
+
properties?: ConnectionProperties;
|
|
12
|
+
type?: AccountType;
|
|
13
|
+
identities?: Map<CaipAddress, Identity>;
|
|
14
|
+
}
|
|
15
|
+
export interface ConnectionProperties {
|
|
16
|
+
email?: string;
|
|
17
|
+
username?: string;
|
|
18
|
+
smartAccounts?: CaipAddress[];
|
|
19
|
+
provider?: SocialProvider;
|
|
20
|
+
sessionTopic?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface LinkingRecord {
|
|
23
|
+
redirect: string;
|
|
24
|
+
href: string;
|
|
25
|
+
}
|
|
26
|
+
export interface WalletDeepLink {
|
|
27
|
+
href: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../src/types/wallet/connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC;IACtC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,WAAW,EAAE,aAAa,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,UAAU,CAAC,EAAE,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
import type { ChainNamespace, CaipAddress, CaipNetworkId } from '../common';
|
|
4
|
+
import type { AppKitNetwork } from '../blockchain/network';
|
|
5
|
+
import type { Provider } from '../blockchain/adapter';
|
|
6
|
+
import type { WalletInfo, Metadata } from './wallet-info';
|
|
7
|
+
import type { ConnectionProperties } from './connection';
|
|
8
|
+
import type { AppKitSIWEClient } from '../siwe';
|
|
9
|
+
import type { Storage } from '../storage';
|
|
10
|
+
import type { WcWallet } from '../api/wallet-api';
|
|
11
|
+
export type ConnectorType = 'walletconnect' | 'coinbase' | 'phantom' | 'solflare';
|
|
12
|
+
export interface BaseNamespace {
|
|
13
|
+
chains?: CaipNetworkId[];
|
|
14
|
+
accounts: CaipAddress[];
|
|
15
|
+
methods: string[];
|
|
16
|
+
events: string[];
|
|
17
|
+
}
|
|
18
|
+
type Namespace = BaseNamespace;
|
|
19
|
+
export type Namespaces = Record<string, Namespace>;
|
|
20
|
+
export type ProposalNamespaces = Record<string, Omit<Namespace, 'accounts'> & Required<Pick<Namespace, 'chains'>> & {
|
|
21
|
+
rpcMap: Record<string, string>;
|
|
22
|
+
}>;
|
|
23
|
+
export type ConnectOptions = {
|
|
24
|
+
namespaces?: ProposalNamespaces;
|
|
25
|
+
defaultNetwork?: AppKitNetwork;
|
|
26
|
+
universalLink?: string;
|
|
27
|
+
siweConfig?: AppKitSIWEClient;
|
|
28
|
+
};
|
|
29
|
+
export type ConnectorInitOptions = {
|
|
30
|
+
storage: Storage;
|
|
31
|
+
metadata: Metadata;
|
|
32
|
+
};
|
|
33
|
+
export declare abstract class WalletConnector extends EventEmitter {
|
|
34
|
+
type: ConnectorType;
|
|
35
|
+
protected provider?: Provider;
|
|
36
|
+
protected namespaces?: Namespaces;
|
|
37
|
+
protected wallet?: WalletInfo;
|
|
38
|
+
protected storage?: Storage;
|
|
39
|
+
protected metadata?: Metadata;
|
|
40
|
+
protected properties?: ConnectionProperties;
|
|
41
|
+
constructor({ type }: {
|
|
42
|
+
type: ConnectorType;
|
|
43
|
+
});
|
|
44
|
+
init(ops: ConnectorInitOptions): Promise<void>;
|
|
45
|
+
setProvider(provider: Provider): void;
|
|
46
|
+
disconnect(): Promise<void>;
|
|
47
|
+
abstract connect(opts: ConnectOptions): Promise<Namespaces | undefined>;
|
|
48
|
+
abstract getProvider(namespace?: ChainNamespace): Provider;
|
|
49
|
+
abstract getNamespaces(): Namespaces;
|
|
50
|
+
abstract getChainId(namespace: ChainNamespace): CaipNetworkId | undefined;
|
|
51
|
+
abstract getWalletInfo(): WalletInfo | undefined;
|
|
52
|
+
abstract getProperties(): ConnectionProperties | undefined;
|
|
53
|
+
abstract switchNetwork(network: AppKitNetwork): Promise<void>;
|
|
54
|
+
abstract restoreSession(): Promise<boolean>;
|
|
55
|
+
}
|
|
56
|
+
export type AppKitConnectOptions = {
|
|
57
|
+
walletId?: string;
|
|
58
|
+
wallet?: WcWallet;
|
|
59
|
+
};
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=connector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../../src/types/wallet/connector.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE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AC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC9B,SAAS,CAAC,UAAU,CAAC,EAAE,oBAAoB,CAAC;gBAEhC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,aAAa,CAAA;KAAE;IAKhC,IAAI,CAAC,GAAG,EAAE,oBAAoB;IAKpC,WAAW,CAAC,QAAQ,EAAE,QAAQ;IAIxB,UAAU;IAOvB,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IACvE,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,cAAc,GAAG,QAAQ;IAC1D,QAAQ,CAAC,aAAa,IAAI,UAAU;IACpC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,cAAc,GAAG,aAAa,GAAG,SAAS;IACzE,QAAQ,CAAC,aAAa,IAAI,UAAU,GAAG,SAAS;IAChD,QAAQ,CAAC,aAAa,IAAI,oBAAoB,GAAG,SAAS;IAC1D,QAAQ,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7D,QAAQ,CAAC,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;CAC5C;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/wallet/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { CaipNetworkId } from '../common';
|
|
2
|
+
export interface WalletInfo {
|
|
3
|
+
name?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
icons?: string[];
|
|
8
|
+
redirect?: {
|
|
9
|
+
native?: string;
|
|
10
|
+
universal?: string;
|
|
11
|
+
linkMode?: boolean;
|
|
12
|
+
};
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export type Metadata = {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
url: string;
|
|
19
|
+
icons: string[];
|
|
20
|
+
redirect?: {
|
|
21
|
+
native?: string;
|
|
22
|
+
universal?: string;
|
|
23
|
+
linkMode?: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export interface Token {
|
|
27
|
+
address: string;
|
|
28
|
+
image?: string;
|
|
29
|
+
}
|
|
30
|
+
export type Tokens = Record<CaipNetworkId, Token>;
|
|
31
|
+
export interface Identity {
|
|
32
|
+
name: string;
|
|
33
|
+
avatar?: string;
|
|
34
|
+
}
|
|
35
|
+
export type ConnectedWalletInfo = WalletInfo | undefined;
|
|
36
|
+
//# sourceMappingURL=wallet-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallet-info.d.ts","sourceRoot":"","sources":["../../../../src/types/wallet/wallet-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,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;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AAElD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,SAAS,CAAC"}
|