@vue-solana/core 1.1.0 → 1.2.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/address.d.cts +6 -0
- package/dist/address.d.mts +6 -0
- package/dist/address.d.ts +6 -0
- package/dist/clusters.d.cts +2 -1
- package/dist/clusters.d.mts +2 -1
- package/dist/clusters.d.ts +2 -1
- package/dist/index.cjs +7 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +4 -1
- package/dist/ios-wallet.d.cts +2 -1
- package/dist/ios-wallet.d.mts +2 -1
- package/dist/ios-wallet.d.ts +2 -1
- package/dist/kit.cjs +21 -0
- package/dist/kit.d.cts +5 -0
- package/dist/kit.d.mts +5 -0
- package/dist/kit.d.ts +5 -0
- package/dist/kit.mjs +18 -0
- package/dist/mobile-wallet.d.cts +2 -1
- package/dist/mobile-wallet.d.mts +2 -1
- package/dist/mobile-wallet.d.ts +2 -1
- package/dist/rpc.cjs +5 -1
- package/dist/rpc.d.cts +7 -1
- package/dist/rpc.d.mts +7 -1
- package/dist/rpc.d.ts +7 -1
- package/dist/rpc.mjs +5 -1
- package/dist/shared/{core.BU9rgxEj.cjs → core.BQoh-5Wu.cjs} +3 -0
- package/dist/shared/core.DAUuCWrr.d.cts +98 -0
- package/dist/shared/core.DAUuCWrr.d.mts +98 -0
- package/dist/shared/core.DAUuCWrr.d.ts +98 -0
- package/dist/shared/{core.BBMCTQpw.mjs → core.DjbtrJWl.mjs} +3 -0
- package/dist/token-accounts.d.cts +18 -0
- package/dist/token-accounts.d.mts +18 -0
- package/dist/token-accounts.d.ts +18 -0
- package/dist/transaction.d.cts +15 -1
- package/dist/transaction.d.mts +15 -1
- package/dist/transaction.d.ts +15 -1
- package/dist/types.d.cts +3 -78
- package/dist/types.d.mts +3 -78
- package/dist/types.d.ts +3 -78
- package/dist/wallet-standard.cjs +1 -1
- package/dist/wallet-standard.d.cts +2 -1
- package/dist/wallet-standard.d.mts +2 -1
- package/dist/wallet-standard.d.ts +2 -1
- package/dist/wallet-standard.mjs +1 -1
- package/dist/wallet.d.cts +2 -1
- package/dist/wallet.d.mts +2 -1
- package/dist/wallet.d.ts +2 -1
- package/package.json +9 -2
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/// <reference path="../../types/web3-compat.d.ts" />
|
|
2
|
+
/// <reference path="../../types/buffer.d.ts" />
|
|
3
|
+
import { Commitment, SendOptions, Connection, Transaction, VersionedTransaction, PublicKey, TransactionSignature, RpcResponseAndContext, SignatureResult } from '@solana/web3-compat';
|
|
4
|
+
import * as _solana_kit from '@solana/kit';
|
|
5
|
+
import { Address } from '@solana/kit';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a @solana/kit client for the given Solana configuration.
|
|
9
|
+
*
|
|
10
|
+
* The returned client exposes read-only `rpc` and `rpcSubscriptions`; use
|
|
11
|
+
* `client.rpc.getSlot().send()` and friends instead of the legacy
|
|
12
|
+
* `connection` APIs.
|
|
13
|
+
*/
|
|
14
|
+
declare function createSolanaClient(config?: SolanaConfig): _solana_kit.Client<_solana_kit.ExtendedClient<object, {
|
|
15
|
+
rpc: _solana_kit.Rpc<_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetAgGenesisCertApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetTransactionsForAddressApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi>;
|
|
16
|
+
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
17
|
+
}>>;
|
|
18
|
+
type SolanaClient = ReturnType<typeof createSolanaClient>;
|
|
19
|
+
|
|
20
|
+
type SolanaCluster = "mainnet-beta" | "testnet" | "devnet" | "localnet";
|
|
21
|
+
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
22
|
+
interface SolanaConfig {
|
|
23
|
+
cluster?: SolanaCluster;
|
|
24
|
+
endpoint?: string;
|
|
25
|
+
wsEndpoint?: string;
|
|
26
|
+
commitment?: Commitment;
|
|
27
|
+
autoConnect?: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface SolanaContext {
|
|
30
|
+
cluster: SolanaCluster;
|
|
31
|
+
endpoint: string;
|
|
32
|
+
wsEndpoint: string;
|
|
33
|
+
connection: Connection;
|
|
34
|
+
client: SolanaClient;
|
|
35
|
+
}
|
|
36
|
+
type SolanaTransaction = Transaction | VersionedTransaction;
|
|
37
|
+
interface SolanaSignMessageResult {
|
|
38
|
+
signedMessage: Uint8Array;
|
|
39
|
+
signature: Uint8Array;
|
|
40
|
+
}
|
|
41
|
+
interface SolanaWallet {
|
|
42
|
+
publicKey: PublicKey | null;
|
|
43
|
+
address?: Address;
|
|
44
|
+
connected: boolean;
|
|
45
|
+
connecting?: boolean;
|
|
46
|
+
disconnecting?: boolean;
|
|
47
|
+
platform?: SolanaWalletInfo["platform"];
|
|
48
|
+
source?: SolanaWalletInfo["source"];
|
|
49
|
+
connect: () => Promise<void>;
|
|
50
|
+
disconnect: () => Promise<void>;
|
|
51
|
+
signMessage?: (message: Uint8Array) => Promise<SolanaSignMessageResult>;
|
|
52
|
+
signTransaction?: <T extends SolanaTransaction>(transaction: T) => Promise<T>;
|
|
53
|
+
signAllTransactions?: <T extends SolanaTransaction>(transactions: T[]) => Promise<T[]>;
|
|
54
|
+
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendOptions) => Promise<{
|
|
55
|
+
signature: TransactionSignature;
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
58
|
+
interface SolanaWalletInfo {
|
|
59
|
+
name: string;
|
|
60
|
+
icon: string;
|
|
61
|
+
chains: readonly string[];
|
|
62
|
+
platform?: "browser" | "mobile" | "desktop";
|
|
63
|
+
source?: "wallet-standard" | "mobile-wallet-adapter" | "deep-link" | "protocol-link";
|
|
64
|
+
appUrl?: string;
|
|
65
|
+
installUrl?: string;
|
|
66
|
+
callbackUrl?: string;
|
|
67
|
+
capabilities?: {
|
|
68
|
+
connect?: boolean;
|
|
69
|
+
disconnect?: boolean;
|
|
70
|
+
signMessage?: boolean;
|
|
71
|
+
signTransaction?: boolean;
|
|
72
|
+
signAllTransactions?: boolean;
|
|
73
|
+
signAndSendTransaction?: boolean;
|
|
74
|
+
};
|
|
75
|
+
accounts: readonly {
|
|
76
|
+
address: string;
|
|
77
|
+
publicKey: Uint8Array;
|
|
78
|
+
chains: readonly string[];
|
|
79
|
+
label?: string;
|
|
80
|
+
icon?: string;
|
|
81
|
+
}[];
|
|
82
|
+
wallet: unknown;
|
|
83
|
+
}
|
|
84
|
+
interface SendTransactionOptions extends SendOptions {
|
|
85
|
+
skipPreflight?: boolean;
|
|
86
|
+
}
|
|
87
|
+
interface ConfirmTransactionOptions {
|
|
88
|
+
commitment?: Commitment;
|
|
89
|
+
timeoutMs?: number;
|
|
90
|
+
}
|
|
91
|
+
interface TransactionConfirmation {
|
|
92
|
+
signature: TransactionSignature;
|
|
93
|
+
commitment: Commitment;
|
|
94
|
+
result: RpcResponseAndContext<SignatureResult>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { createSolanaClient as j };
|
|
98
|
+
export type { ConfirmTransactionOptions as C, SendTransactionOptions as S, TransactionConfirmation as T, SolanaChain as a, SolanaClient as b, SolanaCluster as c, SolanaConfig as d, SolanaContext as e, SolanaSignMessageResult as f, SolanaTransaction as g, SolanaWallet as h, SolanaWalletInfo as i };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/// <reference path="../../types/web3-compat.d.ts" />
|
|
2
|
+
/// <reference path="../../types/buffer.d.ts" />
|
|
3
|
+
import { Commitment, SendOptions, Connection, Transaction, VersionedTransaction, PublicKey, TransactionSignature, RpcResponseAndContext, SignatureResult } from '@solana/web3-compat';
|
|
4
|
+
import * as _solana_kit from '@solana/kit';
|
|
5
|
+
import { Address } from '@solana/kit';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create a @solana/kit client for the given Solana configuration.
|
|
9
|
+
*
|
|
10
|
+
* The returned client exposes read-only `rpc` and `rpcSubscriptions`; use
|
|
11
|
+
* `client.rpc.getSlot().send()` and friends instead of the legacy
|
|
12
|
+
* `connection` APIs.
|
|
13
|
+
*/
|
|
14
|
+
declare function createSolanaClient(config?: SolanaConfig): _solana_kit.Client<_solana_kit.ExtendedClient<object, {
|
|
15
|
+
rpc: _solana_kit.Rpc<_solana_kit.RequestAirdropApi & _solana_kit.GetAccountInfoApi & _solana_kit.GetAgGenesisCertApi & _solana_kit.GetBalanceApi & _solana_kit.GetBlockApi & _solana_kit.GetBlockCommitmentApi & _solana_kit.GetBlockHeightApi & _solana_kit.GetBlockProductionApi & _solana_kit.GetBlocksApi & _solana_kit.GetBlocksWithLimitApi & _solana_kit.GetBlockTimeApi & _solana_kit.GetClusterNodesApi & _solana_kit.GetEpochInfoApi & _solana_kit.GetEpochScheduleApi & _solana_kit.GetFeeForMessageApi & _solana_kit.GetFirstAvailableBlockApi & _solana_kit.GetGenesisHashApi & _solana_kit.GetHealthApi & _solana_kit.GetHighestSnapshotSlotApi & _solana_kit.GetIdentityApi & _solana_kit.GetInflationGovernorApi & _solana_kit.GetInflationRateApi & _solana_kit.GetInflationRewardApi & _solana_kit.GetLargestAccountsApi & _solana_kit.GetLatestBlockhashApi & _solana_kit.GetLeaderScheduleApi & _solana_kit.GetMaxRetransmitSlotApi & _solana_kit.GetMaxShredInsertSlotApi & _solana_kit.GetMinimumBalanceForRentExemptionApi & _solana_kit.GetMultipleAccountsApi & _solana_kit.GetProgramAccountsApi & _solana_kit.GetRecentPerformanceSamplesApi & _solana_kit.GetRecentPrioritizationFeesApi & _solana_kit.GetSignaturesForAddressApi & _solana_kit.GetSignatureStatusesApi & _solana_kit.GetSlotApi & _solana_kit.GetSlotLeaderApi & _solana_kit.GetSlotLeadersApi & _solana_kit.GetStakeMinimumDelegationApi & _solana_kit.GetSupplyApi & _solana_kit.GetTokenAccountBalanceApi & _solana_kit.GetTokenAccountsByDelegateApi & _solana_kit.GetTokenAccountsByOwnerApi & _solana_kit.GetTokenLargestAccountsApi & _solana_kit.GetTokenSupplyApi & _solana_kit.GetTransactionApi & _solana_kit.GetTransactionCountApi & _solana_kit.GetTransactionsForAddressApi & _solana_kit.GetVersionApi & _solana_kit.GetVoteAccountsApi & _solana_kit.IsBlockhashValidApi & _solana_kit.MinimumLedgerSlotApi & _solana_kit.SendTransactionApi & _solana_kit.SimulateTransactionApi>;
|
|
16
|
+
rpcSubscriptions: _solana_kit.RpcSubscriptions<_solana_kit.SolanaRpcSubscriptionsApi>;
|
|
17
|
+
}>>;
|
|
18
|
+
type SolanaClient = ReturnType<typeof createSolanaClient>;
|
|
19
|
+
|
|
20
|
+
type SolanaCluster = "mainnet-beta" | "testnet" | "devnet" | "localnet";
|
|
21
|
+
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
22
|
+
interface SolanaConfig {
|
|
23
|
+
cluster?: SolanaCluster;
|
|
24
|
+
endpoint?: string;
|
|
25
|
+
wsEndpoint?: string;
|
|
26
|
+
commitment?: Commitment;
|
|
27
|
+
autoConnect?: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface SolanaContext {
|
|
30
|
+
cluster: SolanaCluster;
|
|
31
|
+
endpoint: string;
|
|
32
|
+
wsEndpoint: string;
|
|
33
|
+
connection: Connection;
|
|
34
|
+
client: SolanaClient;
|
|
35
|
+
}
|
|
36
|
+
type SolanaTransaction = Transaction | VersionedTransaction;
|
|
37
|
+
interface SolanaSignMessageResult {
|
|
38
|
+
signedMessage: Uint8Array;
|
|
39
|
+
signature: Uint8Array;
|
|
40
|
+
}
|
|
41
|
+
interface SolanaWallet {
|
|
42
|
+
publicKey: PublicKey | null;
|
|
43
|
+
address?: Address;
|
|
44
|
+
connected: boolean;
|
|
45
|
+
connecting?: boolean;
|
|
46
|
+
disconnecting?: boolean;
|
|
47
|
+
platform?: SolanaWalletInfo["platform"];
|
|
48
|
+
source?: SolanaWalletInfo["source"];
|
|
49
|
+
connect: () => Promise<void>;
|
|
50
|
+
disconnect: () => Promise<void>;
|
|
51
|
+
signMessage?: (message: Uint8Array) => Promise<SolanaSignMessageResult>;
|
|
52
|
+
signTransaction?: <T extends SolanaTransaction>(transaction: T) => Promise<T>;
|
|
53
|
+
signAllTransactions?: <T extends SolanaTransaction>(transactions: T[]) => Promise<T[]>;
|
|
54
|
+
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendOptions) => Promise<{
|
|
55
|
+
signature: TransactionSignature;
|
|
56
|
+
}>;
|
|
57
|
+
}
|
|
58
|
+
interface SolanaWalletInfo {
|
|
59
|
+
name: string;
|
|
60
|
+
icon: string;
|
|
61
|
+
chains: readonly string[];
|
|
62
|
+
platform?: "browser" | "mobile" | "desktop";
|
|
63
|
+
source?: "wallet-standard" | "mobile-wallet-adapter" | "deep-link" | "protocol-link";
|
|
64
|
+
appUrl?: string;
|
|
65
|
+
installUrl?: string;
|
|
66
|
+
callbackUrl?: string;
|
|
67
|
+
capabilities?: {
|
|
68
|
+
connect?: boolean;
|
|
69
|
+
disconnect?: boolean;
|
|
70
|
+
signMessage?: boolean;
|
|
71
|
+
signTransaction?: boolean;
|
|
72
|
+
signAllTransactions?: boolean;
|
|
73
|
+
signAndSendTransaction?: boolean;
|
|
74
|
+
};
|
|
75
|
+
accounts: readonly {
|
|
76
|
+
address: string;
|
|
77
|
+
publicKey: Uint8Array;
|
|
78
|
+
chains: readonly string[];
|
|
79
|
+
label?: string;
|
|
80
|
+
icon?: string;
|
|
81
|
+
}[];
|
|
82
|
+
wallet: unknown;
|
|
83
|
+
}
|
|
84
|
+
interface SendTransactionOptions extends SendOptions {
|
|
85
|
+
skipPreflight?: boolean;
|
|
86
|
+
}
|
|
87
|
+
interface ConfirmTransactionOptions {
|
|
88
|
+
commitment?: Commitment;
|
|
89
|
+
timeoutMs?: number;
|
|
90
|
+
}
|
|
91
|
+
interface TransactionConfirmation {
|
|
92
|
+
signature: TransactionSignature;
|
|
93
|
+
commitment: Commitment;
|
|
94
|
+
result: RpcResponseAndContext<SignatureResult>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export { createSolanaClient as j };
|
|
98
|
+
export type { ConfirmTransactionOptions as C, SendTransactionOptions as S, TransactionConfirmation as T, SolanaChain as a, SolanaClient as b, SolanaCluster as c, SolanaConfig as d, SolanaContext as e, SolanaSignMessageResult as f, SolanaTransaction as g, SolanaWallet as h, SolanaWalletInfo as i };
|
|
@@ -63,6 +63,9 @@ function adaptSolanaStandardWallet(walletInfo, options = {}) {
|
|
|
63
63
|
get publicKey() {
|
|
64
64
|
return account ? new PublicKey(account.publicKey) : null;
|
|
65
65
|
},
|
|
66
|
+
get address() {
|
|
67
|
+
return account ? account.address : void 0;
|
|
68
|
+
},
|
|
66
69
|
get connected() {
|
|
67
70
|
return Boolean(account);
|
|
68
71
|
},
|
|
@@ -5,12 +5,30 @@ interface TokenAccountsByOwnerOptions {
|
|
|
5
5
|
commitment?: "processed" | "confirmed" | "finalized";
|
|
6
6
|
programId?: PublicKey;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Get all SPL token accounts for an owner using the legacy `Connection` API.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
12
|
+
* `@vue-solana/core/kit`.
|
|
13
|
+
*/
|
|
8
14
|
declare function getTokenAccountsByOwner(connection: Connection, owner: PublicKey, options?: TokenAccountsByOwnerOptions): Promise<Account[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Get a single token account using the legacy `Connection` API.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
19
|
+
* `@vue-solana/core/kit`.
|
|
20
|
+
*/
|
|
9
21
|
declare function getTokenAccount(connection: Connection, address: PublicKey): Promise<Account | null>;
|
|
10
22
|
interface TokenBalanceResult {
|
|
11
23
|
amount: bigint;
|
|
12
24
|
decimals: number;
|
|
13
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Read the token balance of the associated token account for an owner.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
30
|
+
* `@vue-solana/core/kit`.
|
|
31
|
+
*/
|
|
14
32
|
declare function getTokenBalance(connection: Connection, mint: PublicKey, owner: PublicKey): Promise<TokenBalanceResult | null>;
|
|
15
33
|
|
|
16
34
|
export { getTokenAccount, getTokenAccountsByOwner, getTokenBalance };
|
|
@@ -5,12 +5,30 @@ interface TokenAccountsByOwnerOptions {
|
|
|
5
5
|
commitment?: "processed" | "confirmed" | "finalized";
|
|
6
6
|
programId?: PublicKey;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Get all SPL token accounts for an owner using the legacy `Connection` API.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
12
|
+
* `@vue-solana/core/kit`.
|
|
13
|
+
*/
|
|
8
14
|
declare function getTokenAccountsByOwner(connection: Connection, owner: PublicKey, options?: TokenAccountsByOwnerOptions): Promise<Account[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Get a single token account using the legacy `Connection` API.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
19
|
+
* `@vue-solana/core/kit`.
|
|
20
|
+
*/
|
|
9
21
|
declare function getTokenAccount(connection: Connection, address: PublicKey): Promise<Account | null>;
|
|
10
22
|
interface TokenBalanceResult {
|
|
11
23
|
amount: bigint;
|
|
12
24
|
decimals: number;
|
|
13
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Read the token balance of the associated token account for an owner.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
30
|
+
* `@vue-solana/core/kit`.
|
|
31
|
+
*/
|
|
14
32
|
declare function getTokenBalance(connection: Connection, mint: PublicKey, owner: PublicKey): Promise<TokenBalanceResult | null>;
|
|
15
33
|
|
|
16
34
|
export { getTokenAccount, getTokenAccountsByOwner, getTokenBalance };
|
package/dist/token-accounts.d.ts
CHANGED
|
@@ -5,12 +5,30 @@ interface TokenAccountsByOwnerOptions {
|
|
|
5
5
|
commitment?: "processed" | "confirmed" | "finalized";
|
|
6
6
|
programId?: PublicKey;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Get all SPL token accounts for an owner using the legacy `Connection` API.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
12
|
+
* `@vue-solana/core/kit`.
|
|
13
|
+
*/
|
|
8
14
|
declare function getTokenAccountsByOwner(connection: Connection, owner: PublicKey, options?: TokenAccountsByOwnerOptions): Promise<Account[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Get a single token account using the legacy `Connection` API.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
19
|
+
* `@vue-solana/core/kit`.
|
|
20
|
+
*/
|
|
9
21
|
declare function getTokenAccount(connection: Connection, address: PublicKey): Promise<Account | null>;
|
|
10
22
|
interface TokenBalanceResult {
|
|
11
23
|
amount: bigint;
|
|
12
24
|
decimals: number;
|
|
13
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Read the token balance of the associated token account for an owner.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated Prefer `@solana-program/token` reads against `client.rpc` from
|
|
30
|
+
* `@vue-solana/core/kit`.
|
|
31
|
+
*/
|
|
14
32
|
declare function getTokenBalance(connection: Connection, mint: PublicKey, owner: PublicKey): Promise<TokenBalanceResult | null>;
|
|
15
33
|
|
|
16
34
|
export { getTokenAccount, getTokenAccountsByOwner, getTokenBalance };
|
package/dist/transaction.d.cts
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
/// <reference path="../types/web3-compat.d.ts" />
|
|
2
2
|
/// <reference path="../types/buffer.d.ts" />
|
|
3
3
|
import { Connection, TransactionSignature } from '@solana/web3-compat';
|
|
4
|
-
import { ConfirmTransactionOptions, TransactionConfirmation, SolanaWallet, SolanaTransaction, SendTransactionOptions } from './
|
|
4
|
+
import { C as ConfirmTransactionOptions, T as TransactionConfirmation, h as SolanaWallet, g as SolanaTransaction, S as SendTransactionOptions } from './shared/core.DAUuCWrr.cjs';
|
|
5
|
+
import '@solana/kit';
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Sign and send a transaction through a connected wallet using the legacy
|
|
9
|
+
* web3-compat `Connection` API.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Kit transactions are sent with `client.sendTransaction([...])`
|
|
12
|
+
* once the client has a payer; see `@vue-solana/core/kit`.
|
|
13
|
+
*/
|
|
6
14
|
declare function signAndSendTransaction(connection: Connection, wallet: SolanaWallet, transaction: SolanaTransaction, options?: SendTransactionOptions): Promise<TransactionSignature>;
|
|
15
|
+
/**
|
|
16
|
+
* Confirm a transaction signature using the legacy `Connection` API.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Use `client.rpc.getSignatureStatuses([...]).send()` from
|
|
19
|
+
* `@vue-solana/core/kit` instead.
|
|
20
|
+
*/
|
|
7
21
|
declare function confirmTransactionSignature(connection: Connection, signature: TransactionSignature, options?: ConfirmTransactionOptions): Promise<TransactionConfirmation>;
|
|
8
22
|
|
|
9
23
|
export { confirmTransactionSignature, signAndSendTransaction };
|
package/dist/transaction.d.mts
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
/// <reference path="../types/web3-compat.d.ts" />
|
|
2
2
|
/// <reference path="../types/buffer.d.ts" />
|
|
3
3
|
import { Connection, TransactionSignature } from '@solana/web3-compat';
|
|
4
|
-
import { ConfirmTransactionOptions, TransactionConfirmation, SolanaWallet, SolanaTransaction, SendTransactionOptions } from './
|
|
4
|
+
import { C as ConfirmTransactionOptions, T as TransactionConfirmation, h as SolanaWallet, g as SolanaTransaction, S as SendTransactionOptions } from './shared/core.DAUuCWrr.mjs';
|
|
5
|
+
import '@solana/kit';
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Sign and send a transaction through a connected wallet using the legacy
|
|
9
|
+
* web3-compat `Connection` API.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Kit transactions are sent with `client.sendTransaction([...])`
|
|
12
|
+
* once the client has a payer; see `@vue-solana/core/kit`.
|
|
13
|
+
*/
|
|
6
14
|
declare function signAndSendTransaction(connection: Connection, wallet: SolanaWallet, transaction: SolanaTransaction, options?: SendTransactionOptions): Promise<TransactionSignature>;
|
|
15
|
+
/**
|
|
16
|
+
* Confirm a transaction signature using the legacy `Connection` API.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Use `client.rpc.getSignatureStatuses([...]).send()` from
|
|
19
|
+
* `@vue-solana/core/kit` instead.
|
|
20
|
+
*/
|
|
7
21
|
declare function confirmTransactionSignature(connection: Connection, signature: TransactionSignature, options?: ConfirmTransactionOptions): Promise<TransactionConfirmation>;
|
|
8
22
|
|
|
9
23
|
export { confirmTransactionSignature, signAndSendTransaction };
|
package/dist/transaction.d.ts
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
/// <reference path="../types/web3-compat.d.ts" />
|
|
2
2
|
/// <reference path="../types/buffer.d.ts" />
|
|
3
3
|
import { Connection, TransactionSignature } from '@solana/web3-compat';
|
|
4
|
-
import { ConfirmTransactionOptions, TransactionConfirmation, SolanaWallet, SolanaTransaction, SendTransactionOptions } from './
|
|
4
|
+
import { C as ConfirmTransactionOptions, T as TransactionConfirmation, h as SolanaWallet, g as SolanaTransaction, S as SendTransactionOptions } from './shared/core.DAUuCWrr.js';
|
|
5
|
+
import '@solana/kit';
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Sign and send a transaction through a connected wallet using the legacy
|
|
9
|
+
* web3-compat `Connection` API.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Kit transactions are sent with `client.sendTransaction([...])`
|
|
12
|
+
* once the client has a payer; see `@vue-solana/core/kit`.
|
|
13
|
+
*/
|
|
6
14
|
declare function signAndSendTransaction(connection: Connection, wallet: SolanaWallet, transaction: SolanaTransaction, options?: SendTransactionOptions): Promise<TransactionSignature>;
|
|
15
|
+
/**
|
|
16
|
+
* Confirm a transaction signature using the legacy `Connection` API.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Use `client.rpc.getSignatureStatuses([...]).send()` from
|
|
19
|
+
* `@vue-solana/core/kit` instead.
|
|
20
|
+
*/
|
|
7
21
|
declare function confirmTransactionSignature(connection: Connection, signature: TransactionSignature, options?: ConfirmTransactionOptions): Promise<TransactionConfirmation>;
|
|
8
22
|
|
|
9
23
|
export { confirmTransactionSignature, signAndSendTransaction };
|
package/dist/types.d.cts
CHANGED
|
@@ -1,80 +1,5 @@
|
|
|
1
1
|
/// <reference path="../types/web3-compat.d.ts" />
|
|
2
2
|
/// <reference path="../types/buffer.d.ts" />
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
7
|
-
interface SolanaConfig {
|
|
8
|
-
cluster?: SolanaCluster;
|
|
9
|
-
endpoint?: string;
|
|
10
|
-
wsEndpoint?: string;
|
|
11
|
-
commitment?: Commitment;
|
|
12
|
-
autoConnect?: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface SolanaContext {
|
|
15
|
-
cluster: SolanaCluster;
|
|
16
|
-
endpoint: string;
|
|
17
|
-
wsEndpoint: string;
|
|
18
|
-
connection: Connection;
|
|
19
|
-
}
|
|
20
|
-
type SolanaTransaction = Transaction | VersionedTransaction;
|
|
21
|
-
interface SolanaSignMessageResult {
|
|
22
|
-
signedMessage: Uint8Array;
|
|
23
|
-
signature: Uint8Array;
|
|
24
|
-
}
|
|
25
|
-
interface SolanaWallet {
|
|
26
|
-
publicKey: PublicKey | null;
|
|
27
|
-
connected: boolean;
|
|
28
|
-
connecting?: boolean;
|
|
29
|
-
disconnecting?: boolean;
|
|
30
|
-
platform?: SolanaWalletInfo["platform"];
|
|
31
|
-
source?: SolanaWalletInfo["source"];
|
|
32
|
-
connect: () => Promise<void>;
|
|
33
|
-
disconnect: () => Promise<void>;
|
|
34
|
-
signMessage?: (message: Uint8Array) => Promise<SolanaSignMessageResult>;
|
|
35
|
-
signTransaction?: <T extends SolanaTransaction>(transaction: T) => Promise<T>;
|
|
36
|
-
signAllTransactions?: <T extends SolanaTransaction>(transactions: T[]) => Promise<T[]>;
|
|
37
|
-
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendOptions) => Promise<{
|
|
38
|
-
signature: TransactionSignature;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
41
|
-
interface SolanaWalletInfo {
|
|
42
|
-
name: string;
|
|
43
|
-
icon: string;
|
|
44
|
-
chains: readonly string[];
|
|
45
|
-
platform?: "browser" | "mobile" | "desktop";
|
|
46
|
-
source?: "wallet-standard" | "mobile-wallet-adapter" | "deep-link" | "protocol-link";
|
|
47
|
-
appUrl?: string;
|
|
48
|
-
installUrl?: string;
|
|
49
|
-
callbackUrl?: string;
|
|
50
|
-
capabilities?: {
|
|
51
|
-
connect?: boolean;
|
|
52
|
-
disconnect?: boolean;
|
|
53
|
-
signMessage?: boolean;
|
|
54
|
-
signTransaction?: boolean;
|
|
55
|
-
signAllTransactions?: boolean;
|
|
56
|
-
signAndSendTransaction?: boolean;
|
|
57
|
-
};
|
|
58
|
-
accounts: readonly {
|
|
59
|
-
address: string;
|
|
60
|
-
publicKey: Uint8Array;
|
|
61
|
-
chains: readonly string[];
|
|
62
|
-
label?: string;
|
|
63
|
-
icon?: string;
|
|
64
|
-
}[];
|
|
65
|
-
wallet: unknown;
|
|
66
|
-
}
|
|
67
|
-
interface SendTransactionOptions extends SendOptions {
|
|
68
|
-
skipPreflight?: boolean;
|
|
69
|
-
}
|
|
70
|
-
interface ConfirmTransactionOptions {
|
|
71
|
-
commitment?: Commitment;
|
|
72
|
-
timeoutMs?: number;
|
|
73
|
-
}
|
|
74
|
-
interface TransactionConfirmation {
|
|
75
|
-
signature: TransactionSignature;
|
|
76
|
-
commitment: Commitment;
|
|
77
|
-
result: RpcResponseAndContext<SignatureResult>;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export type { ConfirmTransactionOptions, SendTransactionOptions, SolanaChain, SolanaCluster, SolanaConfig, SolanaContext, SolanaSignMessageResult, SolanaTransaction, SolanaWallet, SolanaWalletInfo, TransactionConfirmation };
|
|
3
|
+
import '@solana/web3-compat';
|
|
4
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignMessageResult, g as SolanaTransaction, h as SolanaWallet, i as SolanaWalletInfo, T as TransactionConfirmation } from './shared/core.DAUuCWrr.cjs';
|
|
5
|
+
import '@solana/kit';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,80 +1,5 @@
|
|
|
1
1
|
/// <reference path="../types/web3-compat.d.ts" />
|
|
2
2
|
/// <reference path="../types/buffer.d.ts" />
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
7
|
-
interface SolanaConfig {
|
|
8
|
-
cluster?: SolanaCluster;
|
|
9
|
-
endpoint?: string;
|
|
10
|
-
wsEndpoint?: string;
|
|
11
|
-
commitment?: Commitment;
|
|
12
|
-
autoConnect?: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface SolanaContext {
|
|
15
|
-
cluster: SolanaCluster;
|
|
16
|
-
endpoint: string;
|
|
17
|
-
wsEndpoint: string;
|
|
18
|
-
connection: Connection;
|
|
19
|
-
}
|
|
20
|
-
type SolanaTransaction = Transaction | VersionedTransaction;
|
|
21
|
-
interface SolanaSignMessageResult {
|
|
22
|
-
signedMessage: Uint8Array;
|
|
23
|
-
signature: Uint8Array;
|
|
24
|
-
}
|
|
25
|
-
interface SolanaWallet {
|
|
26
|
-
publicKey: PublicKey | null;
|
|
27
|
-
connected: boolean;
|
|
28
|
-
connecting?: boolean;
|
|
29
|
-
disconnecting?: boolean;
|
|
30
|
-
platform?: SolanaWalletInfo["platform"];
|
|
31
|
-
source?: SolanaWalletInfo["source"];
|
|
32
|
-
connect: () => Promise<void>;
|
|
33
|
-
disconnect: () => Promise<void>;
|
|
34
|
-
signMessage?: (message: Uint8Array) => Promise<SolanaSignMessageResult>;
|
|
35
|
-
signTransaction?: <T extends SolanaTransaction>(transaction: T) => Promise<T>;
|
|
36
|
-
signAllTransactions?: <T extends SolanaTransaction>(transactions: T[]) => Promise<T[]>;
|
|
37
|
-
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendOptions) => Promise<{
|
|
38
|
-
signature: TransactionSignature;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
41
|
-
interface SolanaWalletInfo {
|
|
42
|
-
name: string;
|
|
43
|
-
icon: string;
|
|
44
|
-
chains: readonly string[];
|
|
45
|
-
platform?: "browser" | "mobile" | "desktop";
|
|
46
|
-
source?: "wallet-standard" | "mobile-wallet-adapter" | "deep-link" | "protocol-link";
|
|
47
|
-
appUrl?: string;
|
|
48
|
-
installUrl?: string;
|
|
49
|
-
callbackUrl?: string;
|
|
50
|
-
capabilities?: {
|
|
51
|
-
connect?: boolean;
|
|
52
|
-
disconnect?: boolean;
|
|
53
|
-
signMessage?: boolean;
|
|
54
|
-
signTransaction?: boolean;
|
|
55
|
-
signAllTransactions?: boolean;
|
|
56
|
-
signAndSendTransaction?: boolean;
|
|
57
|
-
};
|
|
58
|
-
accounts: readonly {
|
|
59
|
-
address: string;
|
|
60
|
-
publicKey: Uint8Array;
|
|
61
|
-
chains: readonly string[];
|
|
62
|
-
label?: string;
|
|
63
|
-
icon?: string;
|
|
64
|
-
}[];
|
|
65
|
-
wallet: unknown;
|
|
66
|
-
}
|
|
67
|
-
interface SendTransactionOptions extends SendOptions {
|
|
68
|
-
skipPreflight?: boolean;
|
|
69
|
-
}
|
|
70
|
-
interface ConfirmTransactionOptions {
|
|
71
|
-
commitment?: Commitment;
|
|
72
|
-
timeoutMs?: number;
|
|
73
|
-
}
|
|
74
|
-
interface TransactionConfirmation {
|
|
75
|
-
signature: TransactionSignature;
|
|
76
|
-
commitment: Commitment;
|
|
77
|
-
result: RpcResponseAndContext<SignatureResult>;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export type { ConfirmTransactionOptions, SendTransactionOptions, SolanaChain, SolanaCluster, SolanaConfig, SolanaContext, SolanaSignMessageResult, SolanaTransaction, SolanaWallet, SolanaWalletInfo, TransactionConfirmation };
|
|
3
|
+
import '@solana/web3-compat';
|
|
4
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignMessageResult, g as SolanaTransaction, h as SolanaWallet, i as SolanaWalletInfo, T as TransactionConfirmation } from './shared/core.DAUuCWrr.mjs';
|
|
5
|
+
import '@solana/kit';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,80 +1,5 @@
|
|
|
1
1
|
/// <reference path="../types/web3-compat.d.ts" />
|
|
2
2
|
/// <reference path="../types/buffer.d.ts" />
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type SolanaChain = "solana:mainnet" | "solana:testnet" | "solana:devnet" | "solana:localnet";
|
|
7
|
-
interface SolanaConfig {
|
|
8
|
-
cluster?: SolanaCluster;
|
|
9
|
-
endpoint?: string;
|
|
10
|
-
wsEndpoint?: string;
|
|
11
|
-
commitment?: Commitment;
|
|
12
|
-
autoConnect?: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface SolanaContext {
|
|
15
|
-
cluster: SolanaCluster;
|
|
16
|
-
endpoint: string;
|
|
17
|
-
wsEndpoint: string;
|
|
18
|
-
connection: Connection;
|
|
19
|
-
}
|
|
20
|
-
type SolanaTransaction = Transaction | VersionedTransaction;
|
|
21
|
-
interface SolanaSignMessageResult {
|
|
22
|
-
signedMessage: Uint8Array;
|
|
23
|
-
signature: Uint8Array;
|
|
24
|
-
}
|
|
25
|
-
interface SolanaWallet {
|
|
26
|
-
publicKey: PublicKey | null;
|
|
27
|
-
connected: boolean;
|
|
28
|
-
connecting?: boolean;
|
|
29
|
-
disconnecting?: boolean;
|
|
30
|
-
platform?: SolanaWalletInfo["platform"];
|
|
31
|
-
source?: SolanaWalletInfo["source"];
|
|
32
|
-
connect: () => Promise<void>;
|
|
33
|
-
disconnect: () => Promise<void>;
|
|
34
|
-
signMessage?: (message: Uint8Array) => Promise<SolanaSignMessageResult>;
|
|
35
|
-
signTransaction?: <T extends SolanaTransaction>(transaction: T) => Promise<T>;
|
|
36
|
-
signAllTransactions?: <T extends SolanaTransaction>(transactions: T[]) => Promise<T[]>;
|
|
37
|
-
signAndSendTransaction?: (transaction: SolanaTransaction, options?: SendOptions) => Promise<{
|
|
38
|
-
signature: TransactionSignature;
|
|
39
|
-
}>;
|
|
40
|
-
}
|
|
41
|
-
interface SolanaWalletInfo {
|
|
42
|
-
name: string;
|
|
43
|
-
icon: string;
|
|
44
|
-
chains: readonly string[];
|
|
45
|
-
platform?: "browser" | "mobile" | "desktop";
|
|
46
|
-
source?: "wallet-standard" | "mobile-wallet-adapter" | "deep-link" | "protocol-link";
|
|
47
|
-
appUrl?: string;
|
|
48
|
-
installUrl?: string;
|
|
49
|
-
callbackUrl?: string;
|
|
50
|
-
capabilities?: {
|
|
51
|
-
connect?: boolean;
|
|
52
|
-
disconnect?: boolean;
|
|
53
|
-
signMessage?: boolean;
|
|
54
|
-
signTransaction?: boolean;
|
|
55
|
-
signAllTransactions?: boolean;
|
|
56
|
-
signAndSendTransaction?: boolean;
|
|
57
|
-
};
|
|
58
|
-
accounts: readonly {
|
|
59
|
-
address: string;
|
|
60
|
-
publicKey: Uint8Array;
|
|
61
|
-
chains: readonly string[];
|
|
62
|
-
label?: string;
|
|
63
|
-
icon?: string;
|
|
64
|
-
}[];
|
|
65
|
-
wallet: unknown;
|
|
66
|
-
}
|
|
67
|
-
interface SendTransactionOptions extends SendOptions {
|
|
68
|
-
skipPreflight?: boolean;
|
|
69
|
-
}
|
|
70
|
-
interface ConfirmTransactionOptions {
|
|
71
|
-
commitment?: Commitment;
|
|
72
|
-
timeoutMs?: number;
|
|
73
|
-
}
|
|
74
|
-
interface TransactionConfirmation {
|
|
75
|
-
signature: TransactionSignature;
|
|
76
|
-
commitment: Commitment;
|
|
77
|
-
result: RpcResponseAndContext<SignatureResult>;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export type { ConfirmTransactionOptions, SendTransactionOptions, SolanaChain, SolanaCluster, SolanaConfig, SolanaContext, SolanaSignMessageResult, SolanaTransaction, SolanaWallet, SolanaWalletInfo, TransactionConfirmation };
|
|
3
|
+
import '@solana/web3-compat';
|
|
4
|
+
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignMessageResult, g as SolanaTransaction, h as SolanaWallet, i as SolanaWalletInfo, T as TransactionConfirmation } from './shared/core.DAUuCWrr.js';
|
|
5
|
+
import '@solana/kit';
|
package/dist/wallet-standard.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference path="../types/web3-compat.d.ts" />
|
|
2
2
|
/// <reference path="../types/buffer.d.ts" />
|
|
3
3
|
import { WalletAccount, Wallet } from '@wallet-standard/base';
|
|
4
|
-
import { SolanaChain, SolanaWalletInfo, SolanaWallet, SolanaCluster } from './
|
|
4
|
+
import { a as SolanaChain, i as SolanaWalletInfo, h as SolanaWallet, c as SolanaCluster } from './shared/core.DAUuCWrr.cjs';
|
|
5
5
|
import '@solana/web3-compat';
|
|
6
|
+
import '@solana/kit';
|
|
6
7
|
|
|
7
8
|
interface AdaptSolanaWalletOptions {
|
|
8
9
|
chain?: SolanaChain;
|