@reown/appkit-utils 2.0.0-wagmi-3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/package.json +2 -1
- package/dist/esm/src/PresetsUtil.js +4 -6
- package/dist/esm/src/PresetsUtil.js.map +1 -1
- package/dist/esm/src/solana/SolanaConstantsUtil.js +5 -2
- package/dist/esm/src/solana/SolanaConstantsUtil.js.map +1 -1
- package/dist/esm/src/solana/SolanaTypesUtil.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/solana/SolanaConstantsUtil.d.ts +4 -2
- package/dist/types/src/solana/SolanaTypesUtil.d.ts +15 -4
- package/package.json +6 -5
|
@@ -30,6 +30,8 @@ export declare const SolConstantsUtil: {
|
|
|
30
30
|
};
|
|
31
31
|
export declare const SPL_COMPUTE_BUDGET_CONSTANTS: {
|
|
32
32
|
readonly UNIT_PRICE_MICRO_LAMPORTS: 20000000;
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
33
|
+
readonly SIMULATION_UNIT_LIMIT: 1400000;
|
|
34
|
+
readonly SIMULATION_MARGIN_MULTIPLIER: 1.3;
|
|
35
|
+
readonly FALLBACK_UNIT_LIMIT_TRANSFER_ONLY: 150000;
|
|
36
|
+
readonly FALLBACK_UNIT_LIMIT_WITH_ATA_CREATION: 200000;
|
|
35
37
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Address, Rpc as KitRpc, Transaction as SolanaKitTransaction, SolanaRpcApi, TransactionWithLifetime } from '@solana/kit';
|
|
1
2
|
import type { SendTransactionOptions } from '@solana/wallet-adapter-base';
|
|
2
3
|
import type { PublicKey, SendOptions, Connection as SolanaConnection, Transaction as SolanaWeb3Transaction, TransactionSignature, VersionedTransaction } from '@solana/web3.js';
|
|
3
4
|
import UniversalProvider from '@walletconnect/universal-provider';
|
|
@@ -6,6 +7,7 @@ import type { ConnectorType } from '@reown/appkit-controllers';
|
|
|
6
7
|
import type { Provider as CoreProvider } from '@reown/appkit-controllers';
|
|
7
8
|
import type { W3mFrameProvider, W3mFrameTypes } from '@reown/appkit-wallet';
|
|
8
9
|
export type Connection = SolanaConnection;
|
|
10
|
+
export type Rpc = KitRpc<SolanaRpcApi>;
|
|
9
11
|
export interface ISolConfig {
|
|
10
12
|
providers: ProviderType;
|
|
11
13
|
defaultChain?: number;
|
|
@@ -29,6 +31,7 @@ export interface Provider extends ProviderEventEmitterMethods, Omit<CoreProvider
|
|
|
29
31
|
type: ConnectorType;
|
|
30
32
|
chain: ChainNamespace;
|
|
31
33
|
publicKey?: PublicKey;
|
|
34
|
+
address?: Address;
|
|
32
35
|
provider: CoreProvider | W3mFrameProvider | UniversalProvider;
|
|
33
36
|
connect: (params?: {
|
|
34
37
|
chainId?: string;
|
|
@@ -37,10 +40,10 @@ export interface Provider extends ProviderEventEmitterMethods, Omit<CoreProvider
|
|
|
37
40
|
}) => Promise<string>;
|
|
38
41
|
disconnect: () => Promise<void>;
|
|
39
42
|
signMessage: (message: Uint8Array) => Promise<Uint8Array>;
|
|
40
|
-
signTransaction: <T extends AnyTransaction>(transaction: T) => Promise<T>;
|
|
41
|
-
signAndSendTransaction: (transaction: AnyTransaction, options?: SendOptions) => Promise<TransactionSignature>;
|
|
42
|
-
sendTransaction: (transaction: AnyTransaction, connection: Connection, options?: SendTransactionOptions) => Promise<TransactionSignature>;
|
|
43
|
-
signAllTransactions: <T extends AnyTransaction[]>(transactions: T) => Promise<T>;
|
|
43
|
+
signTransaction: <T extends AnyTransaction | AnySolanaKitTransaction>(transaction: T) => Promise<T>;
|
|
44
|
+
signAndSendTransaction: (transaction: AnyTransaction | AnySolanaKitTransaction, options?: SendOptions) => Promise<TransactionSignature>;
|
|
45
|
+
sendTransaction: (transaction: AnyTransaction | AnySolanaKitTransaction, connection: Connection, options?: SendTransactionOptions) => Promise<TransactionSignature>;
|
|
46
|
+
signAllTransactions: <T extends (AnyTransaction | AnySolanaKitTransaction)[]>(transactions: T) => Promise<T>;
|
|
44
47
|
getAccounts: () => Promise<{
|
|
45
48
|
namespace: 'solana';
|
|
46
49
|
address: string;
|
|
@@ -72,6 +75,7 @@ export type Metadata = {
|
|
|
72
75
|
icons: string[];
|
|
73
76
|
};
|
|
74
77
|
export type AnyTransaction = SolanaWeb3Transaction | VersionedTransaction;
|
|
78
|
+
export type AnySolanaKitTransaction = SolanaKitTransaction & TransactionWithLifetime;
|
|
75
79
|
export type GetActiveChain = () => CaipNetwork | undefined;
|
|
76
80
|
export type SPLTokenTransactionArgs = {
|
|
77
81
|
provider: Provider;
|
|
@@ -80,3 +84,10 @@ export type SPLTokenTransactionArgs = {
|
|
|
80
84
|
amount: number;
|
|
81
85
|
tokenMint: string;
|
|
82
86
|
};
|
|
87
|
+
export type SPLTokenTransactionKitArgs = {
|
|
88
|
+
provider: Provider;
|
|
89
|
+
connection: Connection;
|
|
90
|
+
to: Address;
|
|
91
|
+
amount: number;
|
|
92
|
+
tokenMint: Address;
|
|
93
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reown/appkit-utils",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/exports/index.js",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"@walletconnect/universal-provider": "2.23.7",
|
|
78
78
|
"valtio": "2.1.7",
|
|
79
79
|
"viem": ">=2.55.13",
|
|
80
|
-
"@reown/appkit-common": "2.0.0
|
|
81
|
-
"@reown/appkit-controllers": "2.0.0
|
|
82
|
-
"@reown/appkit-polyfills": "2.0.0
|
|
83
|
-
"@reown/appkit-wallet": "2.0.0
|
|
80
|
+
"@reown/appkit-common": "2.0.0",
|
|
81
|
+
"@reown/appkit-controllers": "2.0.0",
|
|
82
|
+
"@reown/appkit-polyfills": "2.0.0",
|
|
83
|
+
"@reown/appkit-wallet": "2.0.0"
|
|
84
84
|
},
|
|
85
85
|
"optionalDependencies": {
|
|
86
86
|
"@base-org/account": "2.4.0",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@walletconnect/types": "2.23.7",
|
|
97
97
|
"bs58": "6.0.0",
|
|
98
|
+
"@solana/kit": "8.3.0",
|
|
98
99
|
"@solana/web3.js": "1.98.4",
|
|
99
100
|
"@wallet-standard/features": "1.1.0",
|
|
100
101
|
"@wallet-standard/base": "1.1.0",
|