@vue-solana/core 0.1.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/index.cjs +94 -0
- package/dist/index.d.cts +51 -0
- package/dist/index.d.mts +51 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.mjs +83 -0
- package/package.json +44 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const web3Compat = require('@solana/web3-compat');
|
|
4
|
+
|
|
5
|
+
const DEFAULT_CLUSTER = "devnet";
|
|
6
|
+
const CLUSTER_ENDPOINTS = {
|
|
7
|
+
"mainnet-beta": "https://api.mainnet-beta.solana.com",
|
|
8
|
+
testnet: "https://api.testnet.solana.com",
|
|
9
|
+
devnet: "https://api.devnet.solana.com",
|
|
10
|
+
localnet: "http://127.0.0.1:8899"
|
|
11
|
+
};
|
|
12
|
+
const CLUSTER_WEBSOCKET_ENDPOINTS = {
|
|
13
|
+
"mainnet-beta": "wss://api.mainnet-beta.solana.com",
|
|
14
|
+
testnet: "wss://api.testnet.solana.com",
|
|
15
|
+
devnet: "wss://api.devnet.solana.com",
|
|
16
|
+
localnet: "ws://127.0.0.1:8900"
|
|
17
|
+
};
|
|
18
|
+
function getClusterEndpoint(cluster = DEFAULT_CLUSTER) {
|
|
19
|
+
return CLUSTER_ENDPOINTS[cluster];
|
|
20
|
+
}
|
|
21
|
+
function getClusterWebSocketEndpoint(cluster = DEFAULT_CLUSTER) {
|
|
22
|
+
return CLUSTER_WEBSOCKET_ENDPOINTS[cluster];
|
|
23
|
+
}
|
|
24
|
+
function getWebSocketEndpoint(endpoint) {
|
|
25
|
+
const url = new URL(endpoint);
|
|
26
|
+
if (url.protocol === "https:") {
|
|
27
|
+
url.protocol = "wss:";
|
|
28
|
+
} else if (url.protocol === "http:") {
|
|
29
|
+
url.protocol = "ws:";
|
|
30
|
+
}
|
|
31
|
+
return url.toString();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function createSolanaConnection(config = {}) {
|
|
35
|
+
const cluster = config.cluster ?? DEFAULT_CLUSTER;
|
|
36
|
+
const endpoint = config.endpoint ?? getClusterEndpoint(cluster);
|
|
37
|
+
const wsEndpoint = config.wsEndpoint ?? (config.endpoint ? getWebSocketEndpoint(endpoint) : getClusterWebSocketEndpoint(cluster));
|
|
38
|
+
return new web3Compat.Connection(endpoint, {
|
|
39
|
+
commitment: config.commitment,
|
|
40
|
+
wsEndpoint
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function createSolanaContext(config = {}) {
|
|
44
|
+
const cluster = config.cluster ?? DEFAULT_CLUSTER;
|
|
45
|
+
const endpoint = config.endpoint ?? getClusterEndpoint(cluster);
|
|
46
|
+
const wsEndpoint = config.wsEndpoint ?? (config.endpoint ? getWebSocketEndpoint(endpoint) : getClusterWebSocketEndpoint(cluster));
|
|
47
|
+
return {
|
|
48
|
+
cluster,
|
|
49
|
+
endpoint,
|
|
50
|
+
wsEndpoint,
|
|
51
|
+
connection: new web3Compat.Connection(endpoint, {
|
|
52
|
+
commitment: config.commitment,
|
|
53
|
+
wsEndpoint
|
|
54
|
+
})
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function isWalletConnected(wallet) {
|
|
59
|
+
return Boolean(wallet?.connected && wallet.publicKey);
|
|
60
|
+
}
|
|
61
|
+
function assertWalletConnected(wallet) {
|
|
62
|
+
if (!isWalletConnected(wallet)) {
|
|
63
|
+
throw new Error("Solana wallet is not connected");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function assertWalletCanSign(wallet) {
|
|
67
|
+
assertWalletConnected(wallet);
|
|
68
|
+
if (!wallet.signTransaction) {
|
|
69
|
+
throw new Error("Solana wallet does not support signTransaction");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async function signAndSendTransaction(connection, wallet, transaction, options) {
|
|
74
|
+
assertWalletConnected(wallet);
|
|
75
|
+
if (wallet.signAndSendTransaction) {
|
|
76
|
+
const result = await wallet.signAndSendTransaction(transaction, options);
|
|
77
|
+
return result.signature;
|
|
78
|
+
}
|
|
79
|
+
assertWalletCanSign(wallet);
|
|
80
|
+
const signedTransaction = await wallet.signTransaction(transaction);
|
|
81
|
+
const rawTransaction = signedTransaction.serialize();
|
|
82
|
+
return connection.sendRawTransaction(rawTransaction, options);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
exports.DEFAULT_CLUSTER = DEFAULT_CLUSTER;
|
|
86
|
+
exports.assertWalletCanSign = assertWalletCanSign;
|
|
87
|
+
exports.assertWalletConnected = assertWalletConnected;
|
|
88
|
+
exports.createSolanaConnection = createSolanaConnection;
|
|
89
|
+
exports.createSolanaContext = createSolanaContext;
|
|
90
|
+
exports.getClusterEndpoint = getClusterEndpoint;
|
|
91
|
+
exports.getClusterWebSocketEndpoint = getClusterWebSocketEndpoint;
|
|
92
|
+
exports.getWebSocketEndpoint = getWebSocketEndpoint;
|
|
93
|
+
exports.isWalletConnected = isWalletConnected;
|
|
94
|
+
exports.signAndSendTransaction = signAndSendTransaction;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SendOptions, Commitment, Connection, Transaction, VersionedTransaction, PublicKey, TransactionSignature } from '@solana/web3-compat';
|
|
2
|
+
|
|
3
|
+
type SolanaCluster = 'mainnet-beta' | 'testnet' | 'devnet' | 'localnet';
|
|
4
|
+
interface SolanaConfig {
|
|
5
|
+
cluster?: SolanaCluster;
|
|
6
|
+
endpoint?: string;
|
|
7
|
+
wsEndpoint?: string;
|
|
8
|
+
commitment?: Commitment;
|
|
9
|
+
autoConnect?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface SolanaContext {
|
|
12
|
+
cluster: SolanaCluster;
|
|
13
|
+
endpoint: string;
|
|
14
|
+
wsEndpoint: string;
|
|
15
|
+
connection: Connection;
|
|
16
|
+
}
|
|
17
|
+
type SolanaTransaction = Transaction | VersionedTransaction;
|
|
18
|
+
interface SolanaWallet {
|
|
19
|
+
publicKey: PublicKey | null;
|
|
20
|
+
connected: boolean;
|
|
21
|
+
connecting?: boolean;
|
|
22
|
+
connect: () => Promise<void>;
|
|
23
|
+
disconnect: () => Promise<void>;
|
|
24
|
+
signTransaction?: <T extends SolanaTransaction>(transaction: T) => Promise<T>;
|
|
25
|
+
signAllTransactions?: <T extends SolanaTransaction>(transactions: T[]) => Promise<T[]>;
|
|
26
|
+
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendOptions) => Promise<{
|
|
27
|
+
signature: TransactionSignature;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
interface SendTransactionOptions extends SendOptions {
|
|
31
|
+
skipPreflight?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare const DEFAULT_CLUSTER: SolanaCluster;
|
|
35
|
+
declare function getClusterEndpoint(cluster?: SolanaCluster): string;
|
|
36
|
+
declare function getClusterWebSocketEndpoint(cluster?: SolanaCluster): string;
|
|
37
|
+
declare function getWebSocketEndpoint(endpoint: string): string;
|
|
38
|
+
|
|
39
|
+
declare function createSolanaConnection(config?: SolanaConfig): Connection;
|
|
40
|
+
declare function createSolanaContext(config?: SolanaConfig): SolanaContext;
|
|
41
|
+
|
|
42
|
+
declare function signAndSendTransaction(connection: Connection, wallet: SolanaWallet, transaction: SolanaTransaction, options?: SendTransactionOptions): Promise<TransactionSignature>;
|
|
43
|
+
|
|
44
|
+
declare function isWalletConnected(wallet: Pick<SolanaWallet, 'connected' | 'publicKey'> | null | undefined): boolean;
|
|
45
|
+
declare function assertWalletConnected(wallet: SolanaWallet | null | undefined): asserts wallet is SolanaWallet & {
|
|
46
|
+
publicKey: NonNullable<SolanaWallet['publicKey']>;
|
|
47
|
+
};
|
|
48
|
+
declare function assertWalletCanSign(wallet: SolanaWallet | null | undefined): asserts wallet is SolanaWallet & Required<Pick<SolanaWallet, 'signTransaction'>>;
|
|
49
|
+
|
|
50
|
+
export { DEFAULT_CLUSTER, assertWalletCanSign, assertWalletConnected, createSolanaConnection, createSolanaContext, getClusterEndpoint, getClusterWebSocketEndpoint, getWebSocketEndpoint, isWalletConnected, signAndSendTransaction };
|
|
51
|
+
export type { SendTransactionOptions, SolanaCluster, SolanaConfig, SolanaContext, SolanaTransaction, SolanaWallet };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SendOptions, Commitment, Connection, Transaction, VersionedTransaction, PublicKey, TransactionSignature } from '@solana/web3-compat';
|
|
2
|
+
|
|
3
|
+
type SolanaCluster = 'mainnet-beta' | 'testnet' | 'devnet' | 'localnet';
|
|
4
|
+
interface SolanaConfig {
|
|
5
|
+
cluster?: SolanaCluster;
|
|
6
|
+
endpoint?: string;
|
|
7
|
+
wsEndpoint?: string;
|
|
8
|
+
commitment?: Commitment;
|
|
9
|
+
autoConnect?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface SolanaContext {
|
|
12
|
+
cluster: SolanaCluster;
|
|
13
|
+
endpoint: string;
|
|
14
|
+
wsEndpoint: string;
|
|
15
|
+
connection: Connection;
|
|
16
|
+
}
|
|
17
|
+
type SolanaTransaction = Transaction | VersionedTransaction;
|
|
18
|
+
interface SolanaWallet {
|
|
19
|
+
publicKey: PublicKey | null;
|
|
20
|
+
connected: boolean;
|
|
21
|
+
connecting?: boolean;
|
|
22
|
+
connect: () => Promise<void>;
|
|
23
|
+
disconnect: () => Promise<void>;
|
|
24
|
+
signTransaction?: <T extends SolanaTransaction>(transaction: T) => Promise<T>;
|
|
25
|
+
signAllTransactions?: <T extends SolanaTransaction>(transactions: T[]) => Promise<T[]>;
|
|
26
|
+
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendOptions) => Promise<{
|
|
27
|
+
signature: TransactionSignature;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
interface SendTransactionOptions extends SendOptions {
|
|
31
|
+
skipPreflight?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare const DEFAULT_CLUSTER: SolanaCluster;
|
|
35
|
+
declare function getClusterEndpoint(cluster?: SolanaCluster): string;
|
|
36
|
+
declare function getClusterWebSocketEndpoint(cluster?: SolanaCluster): string;
|
|
37
|
+
declare function getWebSocketEndpoint(endpoint: string): string;
|
|
38
|
+
|
|
39
|
+
declare function createSolanaConnection(config?: SolanaConfig): Connection;
|
|
40
|
+
declare function createSolanaContext(config?: SolanaConfig): SolanaContext;
|
|
41
|
+
|
|
42
|
+
declare function signAndSendTransaction(connection: Connection, wallet: SolanaWallet, transaction: SolanaTransaction, options?: SendTransactionOptions): Promise<TransactionSignature>;
|
|
43
|
+
|
|
44
|
+
declare function isWalletConnected(wallet: Pick<SolanaWallet, 'connected' | 'publicKey'> | null | undefined): boolean;
|
|
45
|
+
declare function assertWalletConnected(wallet: SolanaWallet | null | undefined): asserts wallet is SolanaWallet & {
|
|
46
|
+
publicKey: NonNullable<SolanaWallet['publicKey']>;
|
|
47
|
+
};
|
|
48
|
+
declare function assertWalletCanSign(wallet: SolanaWallet | null | undefined): asserts wallet is SolanaWallet & Required<Pick<SolanaWallet, 'signTransaction'>>;
|
|
49
|
+
|
|
50
|
+
export { DEFAULT_CLUSTER, assertWalletCanSign, assertWalletConnected, createSolanaConnection, createSolanaContext, getClusterEndpoint, getClusterWebSocketEndpoint, getWebSocketEndpoint, isWalletConnected, signAndSendTransaction };
|
|
51
|
+
export type { SendTransactionOptions, SolanaCluster, SolanaConfig, SolanaContext, SolanaTransaction, SolanaWallet };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { SendOptions, Commitment, Connection, Transaction, VersionedTransaction, PublicKey, TransactionSignature } from '@solana/web3-compat';
|
|
2
|
+
|
|
3
|
+
type SolanaCluster = 'mainnet-beta' | 'testnet' | 'devnet' | 'localnet';
|
|
4
|
+
interface SolanaConfig {
|
|
5
|
+
cluster?: SolanaCluster;
|
|
6
|
+
endpoint?: string;
|
|
7
|
+
wsEndpoint?: string;
|
|
8
|
+
commitment?: Commitment;
|
|
9
|
+
autoConnect?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface SolanaContext {
|
|
12
|
+
cluster: SolanaCluster;
|
|
13
|
+
endpoint: string;
|
|
14
|
+
wsEndpoint: string;
|
|
15
|
+
connection: Connection;
|
|
16
|
+
}
|
|
17
|
+
type SolanaTransaction = Transaction | VersionedTransaction;
|
|
18
|
+
interface SolanaWallet {
|
|
19
|
+
publicKey: PublicKey | null;
|
|
20
|
+
connected: boolean;
|
|
21
|
+
connecting?: boolean;
|
|
22
|
+
connect: () => Promise<void>;
|
|
23
|
+
disconnect: () => Promise<void>;
|
|
24
|
+
signTransaction?: <T extends SolanaTransaction>(transaction: T) => Promise<T>;
|
|
25
|
+
signAllTransactions?: <T extends SolanaTransaction>(transactions: T[]) => Promise<T[]>;
|
|
26
|
+
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendOptions) => Promise<{
|
|
27
|
+
signature: TransactionSignature;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
interface SendTransactionOptions extends SendOptions {
|
|
31
|
+
skipPreflight?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare const DEFAULT_CLUSTER: SolanaCluster;
|
|
35
|
+
declare function getClusterEndpoint(cluster?: SolanaCluster): string;
|
|
36
|
+
declare function getClusterWebSocketEndpoint(cluster?: SolanaCluster): string;
|
|
37
|
+
declare function getWebSocketEndpoint(endpoint: string): string;
|
|
38
|
+
|
|
39
|
+
declare function createSolanaConnection(config?: SolanaConfig): Connection;
|
|
40
|
+
declare function createSolanaContext(config?: SolanaConfig): SolanaContext;
|
|
41
|
+
|
|
42
|
+
declare function signAndSendTransaction(connection: Connection, wallet: SolanaWallet, transaction: SolanaTransaction, options?: SendTransactionOptions): Promise<TransactionSignature>;
|
|
43
|
+
|
|
44
|
+
declare function isWalletConnected(wallet: Pick<SolanaWallet, 'connected' | 'publicKey'> | null | undefined): boolean;
|
|
45
|
+
declare function assertWalletConnected(wallet: SolanaWallet | null | undefined): asserts wallet is SolanaWallet & {
|
|
46
|
+
publicKey: NonNullable<SolanaWallet['publicKey']>;
|
|
47
|
+
};
|
|
48
|
+
declare function assertWalletCanSign(wallet: SolanaWallet | null | undefined): asserts wallet is SolanaWallet & Required<Pick<SolanaWallet, 'signTransaction'>>;
|
|
49
|
+
|
|
50
|
+
export { DEFAULT_CLUSTER, assertWalletCanSign, assertWalletConnected, createSolanaConnection, createSolanaContext, getClusterEndpoint, getClusterWebSocketEndpoint, getWebSocketEndpoint, isWalletConnected, signAndSendTransaction };
|
|
51
|
+
export type { SendTransactionOptions, SolanaCluster, SolanaConfig, SolanaContext, SolanaTransaction, SolanaWallet };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Connection } from '@solana/web3-compat';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_CLUSTER = "devnet";
|
|
4
|
+
const CLUSTER_ENDPOINTS = {
|
|
5
|
+
"mainnet-beta": "https://api.mainnet-beta.solana.com",
|
|
6
|
+
testnet: "https://api.testnet.solana.com",
|
|
7
|
+
devnet: "https://api.devnet.solana.com",
|
|
8
|
+
localnet: "http://127.0.0.1:8899"
|
|
9
|
+
};
|
|
10
|
+
const CLUSTER_WEBSOCKET_ENDPOINTS = {
|
|
11
|
+
"mainnet-beta": "wss://api.mainnet-beta.solana.com",
|
|
12
|
+
testnet: "wss://api.testnet.solana.com",
|
|
13
|
+
devnet: "wss://api.devnet.solana.com",
|
|
14
|
+
localnet: "ws://127.0.0.1:8900"
|
|
15
|
+
};
|
|
16
|
+
function getClusterEndpoint(cluster = DEFAULT_CLUSTER) {
|
|
17
|
+
return CLUSTER_ENDPOINTS[cluster];
|
|
18
|
+
}
|
|
19
|
+
function getClusterWebSocketEndpoint(cluster = DEFAULT_CLUSTER) {
|
|
20
|
+
return CLUSTER_WEBSOCKET_ENDPOINTS[cluster];
|
|
21
|
+
}
|
|
22
|
+
function getWebSocketEndpoint(endpoint) {
|
|
23
|
+
const url = new URL(endpoint);
|
|
24
|
+
if (url.protocol === "https:") {
|
|
25
|
+
url.protocol = "wss:";
|
|
26
|
+
} else if (url.protocol === "http:") {
|
|
27
|
+
url.protocol = "ws:";
|
|
28
|
+
}
|
|
29
|
+
return url.toString();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function createSolanaConnection(config = {}) {
|
|
33
|
+
const cluster = config.cluster ?? DEFAULT_CLUSTER;
|
|
34
|
+
const endpoint = config.endpoint ?? getClusterEndpoint(cluster);
|
|
35
|
+
const wsEndpoint = config.wsEndpoint ?? (config.endpoint ? getWebSocketEndpoint(endpoint) : getClusterWebSocketEndpoint(cluster));
|
|
36
|
+
return new Connection(endpoint, {
|
|
37
|
+
commitment: config.commitment,
|
|
38
|
+
wsEndpoint
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function createSolanaContext(config = {}) {
|
|
42
|
+
const cluster = config.cluster ?? DEFAULT_CLUSTER;
|
|
43
|
+
const endpoint = config.endpoint ?? getClusterEndpoint(cluster);
|
|
44
|
+
const wsEndpoint = config.wsEndpoint ?? (config.endpoint ? getWebSocketEndpoint(endpoint) : getClusterWebSocketEndpoint(cluster));
|
|
45
|
+
return {
|
|
46
|
+
cluster,
|
|
47
|
+
endpoint,
|
|
48
|
+
wsEndpoint,
|
|
49
|
+
connection: new Connection(endpoint, {
|
|
50
|
+
commitment: config.commitment,
|
|
51
|
+
wsEndpoint
|
|
52
|
+
})
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function isWalletConnected(wallet) {
|
|
57
|
+
return Boolean(wallet?.connected && wallet.publicKey);
|
|
58
|
+
}
|
|
59
|
+
function assertWalletConnected(wallet) {
|
|
60
|
+
if (!isWalletConnected(wallet)) {
|
|
61
|
+
throw new Error("Solana wallet is not connected");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function assertWalletCanSign(wallet) {
|
|
65
|
+
assertWalletConnected(wallet);
|
|
66
|
+
if (!wallet.signTransaction) {
|
|
67
|
+
throw new Error("Solana wallet does not support signTransaction");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function signAndSendTransaction(connection, wallet, transaction, options) {
|
|
72
|
+
assertWalletConnected(wallet);
|
|
73
|
+
if (wallet.signAndSendTransaction) {
|
|
74
|
+
const result = await wallet.signAndSendTransaction(transaction, options);
|
|
75
|
+
return result.signature;
|
|
76
|
+
}
|
|
77
|
+
assertWalletCanSign(wallet);
|
|
78
|
+
const signedTransaction = await wallet.signTransaction(transaction);
|
|
79
|
+
const rawTransaction = signedTransaction.serialize();
|
|
80
|
+
return connection.sendRawTransaction(rawTransaction, options);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { DEFAULT_CLUSTER, assertWalletCanSign, assertWalletConnected, createSolanaConnection, createSolanaContext, getClusterEndpoint, getClusterWebSocketEndpoint, getWebSocketEndpoint, isWalletConnected, signAndSendTransaction };
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vue-solana/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Framework-agnostic primitives for Vue Solana libraries.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"homepage": "https://github.com/vue-solana/vue-solana#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/vue-solana/vue-solana.git",
|
|
11
|
+
"directory": "packages/core"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/vue-solana/vue-solana/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": ["solana", "vue", "wallet", "rpc", "web3"],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"main": "./dist/index.cjs",
|
|
21
|
+
"module": "./dist/index.mjs",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.mjs",
|
|
27
|
+
"require": "./dist/index.cjs"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": ["dist"],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "unbuild",
|
|
33
|
+
"dev": "unbuild --stub",
|
|
34
|
+
"typecheck": "tsc --noEmit",
|
|
35
|
+
"clean": "rm -rf dist"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@solana/web3-compat": "^0.0.21"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"typescript": "^5.8.3",
|
|
42
|
+
"unbuild": "^3.5.0"
|
|
43
|
+
}
|
|
44
|
+
}
|