@vue-solana/core 2.5.0 → 2.6.1
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/action.cjs +0 -2
- package/dist/action.mjs +0 -2
- package/dist/index.cjs +19 -19
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +4 -4
- package/dist/kit.cjs +22 -17
- package/dist/kit.mjs +23 -14
- package/dist/rpc.cjs +0 -1
- package/dist/rpc.mjs +0 -1
- package/package.json +2 -1
package/dist/action.cjs
CHANGED
package/dist/action.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,6 @@ const clusters = require('./clusters.cjs');
|
|
|
5
5
|
const address = require('./address.cjs');
|
|
6
6
|
const bufferPolyfill = require('./buffer-polyfill.cjs');
|
|
7
7
|
const errors = require('./errors.cjs');
|
|
8
|
-
const adapter = require('./shared/core.eIBHqmLq.cjs');
|
|
9
8
|
const kit$1 = require('./kit.cjs');
|
|
10
9
|
const mobileWallet = require('./mobile-wallet.cjs');
|
|
11
10
|
const rpc = require('./rpc.cjs');
|
|
@@ -13,16 +12,17 @@ const tokenAccounts = require('./token-accounts.cjs');
|
|
|
13
12
|
const transaction = require('./transaction.cjs');
|
|
14
13
|
const timeout = require('./timeout.cjs');
|
|
15
14
|
const wallet = require('./wallet.cjs');
|
|
16
|
-
const discovery = require('./shared/core.CasnoavM.cjs');
|
|
17
15
|
const kit = require('@solana/kit');
|
|
18
16
|
const _ = require('buffer/');
|
|
17
|
+
const discovery = require('./shared/core.CasnoavM.cjs');
|
|
18
|
+
const adapter = require('./shared/core.eIBHqmLq.cjs');
|
|
19
19
|
require('@solana/kit-plugin-rpc');
|
|
20
|
-
require('tweetnacl');
|
|
21
|
-
require('bs58');
|
|
22
20
|
require('@solana-mobile/wallet-standard-mobile');
|
|
23
21
|
require('@wallet-standard/features');
|
|
24
22
|
require('@solana/wallet-standard-features');
|
|
23
|
+
require('bs58');
|
|
25
24
|
require('@wallet-standard/app');
|
|
25
|
+
require('tweetnacl');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
@@ -38,14 +38,6 @@ exports.SolanaError = errors.SolanaError;
|
|
|
38
38
|
exports.createSolanaError = errors.createSolanaError;
|
|
39
39
|
exports.isSolanaError = errors.isSolanaError;
|
|
40
40
|
exports.normalizeSolanaError = errors.normalizeSolanaError;
|
|
41
|
-
exports.adaptSolanaIosWallet = adapter.adaptSolanaIosWallet;
|
|
42
|
-
exports.getDefaultIosWalletAppIdentity = adapter.getDefaultIosWalletAppIdentity;
|
|
43
|
-
exports.getDefaultIosWalletRedirectUrl = adapter.getDefaultIosWalletRedirectUrl;
|
|
44
|
-
exports.getSolanaIosWallets = adapter.getSolanaIosWallets;
|
|
45
|
-
exports.handleSolanaIosWalletCallback = adapter.handleSolanaIosWalletCallback;
|
|
46
|
-
exports.isIosBrowser = adapter.isIosBrowser;
|
|
47
|
-
exports.isSolanaIosBrowserWalletSupported = adapter.isSolanaIosBrowserWalletSupported;
|
|
48
|
-
exports.isSolanaIosWalletInfo = adapter.isSolanaIosWalletInfo;
|
|
49
41
|
exports.createSolanaClient = kit$1.createSolanaClient;
|
|
50
42
|
exports.getDefaultMobileWalletAppIdentity = mobileWallet.getDefaultMobileWalletAppIdentity;
|
|
51
43
|
exports.isSolanaMobileWalletSupported = mobileWallet.isSolanaMobileWalletSupported;
|
|
@@ -67,13 +59,6 @@ exports.assertWalletCanSignTransactions = wallet.assertWalletCanSignTransactions
|
|
|
67
59
|
exports.assertWalletConnected = wallet.assertWalletConnected;
|
|
68
60
|
exports.createNoWalletSelectedError = wallet.createNoWalletSelectedError;
|
|
69
61
|
exports.isWalletConnected = wallet.isWalletConnected;
|
|
70
|
-
exports.SOLANA_CHAINS = discovery.SOLANA_CHAINS;
|
|
71
|
-
exports.SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME = discovery.SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME;
|
|
72
|
-
exports.adaptSolanaStandardWallet = discovery.adaptSolanaStandardWallet;
|
|
73
|
-
exports.getRegisteredSolanaWallets = discovery.getRegisteredSolanaWallets;
|
|
74
|
-
exports.getSolanaChain = discovery.getSolanaChain;
|
|
75
|
-
exports.isSolanaStandardWallet = discovery.isSolanaStandardWallet;
|
|
76
|
-
exports.subscribeSolanaWallets = discovery.subscribeSolanaWallets;
|
|
77
62
|
exports.AccountRole = kit.AccountRole;
|
|
78
63
|
exports.address = kit.address;
|
|
79
64
|
exports.appendTransactionMessageInstruction = kit.appendTransactionMessageInstruction;
|
|
@@ -92,3 +77,18 @@ exports.setTransactionMessageFeePayer = kit.setTransactionMessageFeePayer;
|
|
|
92
77
|
exports.setTransactionMessageLifetimeUsingBlockhash = kit.setTransactionMessageLifetimeUsingBlockhash;
|
|
93
78
|
exports.summarizeTransactionPlanResult = kit.summarizeTransactionPlanResult;
|
|
94
79
|
exports.Buffer = _.Buffer;
|
|
80
|
+
exports.SOLANA_CHAINS = discovery.SOLANA_CHAINS;
|
|
81
|
+
exports.SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME = discovery.SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME;
|
|
82
|
+
exports.adaptSolanaStandardWallet = discovery.adaptSolanaStandardWallet;
|
|
83
|
+
exports.getRegisteredSolanaWallets = discovery.getRegisteredSolanaWallets;
|
|
84
|
+
exports.getSolanaChain = discovery.getSolanaChain;
|
|
85
|
+
exports.isSolanaStandardWallet = discovery.isSolanaStandardWallet;
|
|
86
|
+
exports.subscribeSolanaWallets = discovery.subscribeSolanaWallets;
|
|
87
|
+
exports.adaptSolanaIosWallet = adapter.adaptSolanaIosWallet;
|
|
88
|
+
exports.getDefaultIosWalletAppIdentity = adapter.getDefaultIosWalletAppIdentity;
|
|
89
|
+
exports.getDefaultIosWalletRedirectUrl = adapter.getDefaultIosWalletRedirectUrl;
|
|
90
|
+
exports.getSolanaIosWallets = adapter.getSolanaIosWallets;
|
|
91
|
+
exports.handleSolanaIosWalletCallback = adapter.handleSolanaIosWalletCallback;
|
|
92
|
+
exports.isIosBrowser = adapter.isIosBrowser;
|
|
93
|
+
exports.isSolanaIosBrowserWalletSupported = adapter.isSolanaIosBrowserWalletSupported;
|
|
94
|
+
exports.isSolanaIosWalletInfo = adapter.isSolanaIosWalletInfo;
|
package/dist/index.d.cts
CHANGED
|
@@ -4,7 +4,6 @@ export { DEFAULT_CLUSTER, getClusterEndpoint, getClusterWebSocketEndpoint, getWe
|
|
|
4
4
|
export { AddressInput, MaybeAddressInput, parseAddress } from './address.cjs';
|
|
5
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.cjs';
|
|
6
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.cjs';
|
|
7
|
-
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.cjs';
|
|
8
7
|
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignInAccount, g as SolanaSignInInput, h as SolanaSignInResult, i as SolanaSignMessageResult, j as SolanaTransaction, k as SolanaWallet, l as SolanaWalletInfo, T as TransactionConfirmation, m as TransactionStatus, n as createSolanaClient } from './shared/core.C9vxHRXl.cjs';
|
|
9
8
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.cjs';
|
|
10
9
|
export { createSolanaContext } from './rpc.cjs';
|
|
@@ -12,8 +11,9 @@ export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getT
|
|
|
12
11
|
export { confirmTransactionSignature, signAndSendTransaction } from './transaction.cjs';
|
|
13
12
|
export { withSolanaTimeout, withTimeout } from './timeout.cjs';
|
|
14
13
|
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.cjs';
|
|
15
|
-
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.cjs';
|
|
16
14
|
export { AccountRole, Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, Instruction, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, appendTransactionMessageInstruction, compileTransaction, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, createTransactionMessage, extendClient, generateKeyPairSigner, getAbortablePromise, getTransactionEncoder, isAbortError, isAddress, lamports, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, summarizeTransactionPlanResult } from '@solana/kit';
|
|
15
|
+
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.cjs';
|
|
16
|
+
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.cjs';
|
|
17
17
|
export { Buffer } from 'buffer/';
|
|
18
18
|
import '@solana/kit-plugin-rpc';
|
|
19
19
|
import '@wallet-standard/base';
|
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,6 @@ export { DEFAULT_CLUSTER, getClusterEndpoint, getClusterWebSocketEndpoint, getWe
|
|
|
4
4
|
export { AddressInput, MaybeAddressInput, parseAddress } from './address.mjs';
|
|
5
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.mjs';
|
|
6
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.mjs';
|
|
7
|
-
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.mjs';
|
|
8
7
|
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignInAccount, g as SolanaSignInInput, h as SolanaSignInResult, i as SolanaSignMessageResult, j as SolanaTransaction, k as SolanaWallet, l as SolanaWalletInfo, T as TransactionConfirmation, m as TransactionStatus, n as createSolanaClient } from './shared/core.C9vxHRXl.mjs';
|
|
9
8
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.mjs';
|
|
10
9
|
export { createSolanaContext } from './rpc.mjs';
|
|
@@ -12,8 +11,9 @@ export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getT
|
|
|
12
11
|
export { confirmTransactionSignature, signAndSendTransaction } from './transaction.mjs';
|
|
13
12
|
export { withSolanaTimeout, withTimeout } from './timeout.mjs';
|
|
14
13
|
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.mjs';
|
|
15
|
-
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.mjs';
|
|
16
14
|
export { AccountRole, Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, Instruction, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, appendTransactionMessageInstruction, compileTransaction, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, createTransactionMessage, extendClient, generateKeyPairSigner, getAbortablePromise, getTransactionEncoder, isAbortError, isAddress, lamports, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, summarizeTransactionPlanResult } from '@solana/kit';
|
|
15
|
+
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.mjs';
|
|
16
|
+
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.mjs';
|
|
17
17
|
export { Buffer } from 'buffer/';
|
|
18
18
|
import '@solana/kit-plugin-rpc';
|
|
19
19
|
import '@wallet-standard/base';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export { DEFAULT_CLUSTER, getClusterEndpoint, getClusterWebSocketEndpoint, getWe
|
|
|
4
4
|
export { AddressInput, MaybeAddressInput, parseAddress } from './address.js';
|
|
5
5
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.js';
|
|
6
6
|
export { SolanaError, SolanaErrorCode, SolanaErrorOptions, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.js';
|
|
7
|
-
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.js';
|
|
8
7
|
export { C as ConfirmTransactionOptions, S as SendTransactionOptions, a as SolanaChain, b as SolanaClient, c as SolanaCluster, d as SolanaConfig, e as SolanaContext, f as SolanaSignInAccount, g as SolanaSignInInput, h as SolanaSignInResult, i as SolanaSignMessageResult, j as SolanaTransaction, k as SolanaWallet, l as SolanaWalletInfo, T as TransactionConfirmation, m as TransactionStatus, n as createSolanaClient } from './shared/core.C9vxHRXl.js';
|
|
9
8
|
export { RegisterSolanaMobileWalletOptions, SolanaMobileWalletAppIdentity, getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.js';
|
|
10
9
|
export { createSolanaContext } from './rpc.js';
|
|
@@ -12,8 +11,9 @@ export { TokenAccountInfo, TokenAccountsByOwnerOptions, TokenBalanceResult, getT
|
|
|
12
11
|
export { confirmTransactionSignature, signAndSendTransaction } from './transaction.js';
|
|
13
12
|
export { withSolanaTimeout, withTimeout } from './timeout.js';
|
|
14
13
|
export { SolanaWalletError, SolanaWalletErrorCode, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.js';
|
|
15
|
-
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.js';
|
|
16
14
|
export { AccountRole, Address, ClientWithIdentity, ClientWithPayer, ClientWithSubscribeToIdentity, ClientWithSubscribeToPayer, ClientWithTransactionPlanning, ClientWithTransactionSending, Commitment, CreateReactiveStoreWithInitialValueAndSlotTrackingConfig, Instruction, InstructionPlanInput, Lamports, ReactiveActionSource, ReactiveActionState, ReactiveActionStatus, ReactiveActionStore, ReactiveState, ReactiveStreamSource, ReactiveStreamStore, Rpc, Signature, SingleTransactionPlan, SolanaRpcApi, SolanaRpcResponse, SuccessfulSingleTransactionPlanResult, TransactionMessage, TransactionPlan, TransactionPlanInput, TransactionPlanResult, TransactionSigner, address, appendTransactionMessageInstruction, compileTransaction, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, createTransactionMessage, extendClient, generateKeyPairSigner, getAbortablePromise, getTransactionEncoder, isAbortError, isAddress, lamports, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, summarizeTransactionPlanResult } from '@solana/kit';
|
|
15
|
+
export { AdaptSolanaIosWalletOptions, GetSolanaIosWalletsOptions, IosWalletCallbackResult, IosWalletInfo, IosWalletMethod, SolanaIosWalletAppIdentity, adaptSolanaIosWallet, getDefaultIosWalletAppIdentity, getDefaultIosWalletRedirectUrl, getSolanaIosWallets, handleSolanaIosWalletCallback, isIosBrowser, isSolanaIosBrowserWalletSupported, isSolanaIosWalletInfo } from './ios-wallet.js';
|
|
16
|
+
export { AdaptSolanaWalletOptions, SOLANA_CHAINS, SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, adaptSolanaStandardWallet, getRegisteredSolanaWallets, getSolanaChain, isSolanaStandardWallet, subscribeSolanaWallets } from './wallet-standard.js';
|
|
17
17
|
export { Buffer } from 'buffer/';
|
|
18
18
|
import '@solana/kit-plugin-rpc';
|
|
19
19
|
import '@wallet-standard/base';
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,6 @@ export { DEFAULT_CLUSTER, getClusterEndpoint, getClusterWebSocketEndpoint, getWe
|
|
|
3
3
|
export { parseAddress } from './address.mjs';
|
|
4
4
|
export { installSolanaBufferPolyfill } from './buffer-polyfill.mjs';
|
|
5
5
|
export { SolanaError, createSolanaError, isSolanaError, normalizeSolanaError } from './errors.mjs';
|
|
6
|
-
export { a as adaptSolanaIosWallet, g as getDefaultIosWalletAppIdentity, b as getDefaultIosWalletRedirectUrl, c as getSolanaIosWallets, h as handleSolanaIosWalletCallback, i as isIosBrowser, d as isSolanaIosBrowserWalletSupported, e as isSolanaIosWalletInfo } from './shared/core.CDVW-ApZ.mjs';
|
|
7
6
|
export { createSolanaClient } from './kit.mjs';
|
|
8
7
|
export { getDefaultMobileWalletAppIdentity, isSolanaMobileWalletSupported, registerSolanaMobileWallet } from './mobile-wallet.mjs';
|
|
9
8
|
export { createSolanaContext } from './rpc.mjs';
|
|
@@ -11,13 +10,14 @@ export { getTokenAccount, getTokenAccountsByOwner, getTokenBalance } from './tok
|
|
|
11
10
|
export { confirmTransactionSignature, signAndSendTransaction } from './transaction.mjs';
|
|
12
11
|
export { withSolanaTimeout, withTimeout } from './timeout.mjs';
|
|
13
12
|
export { SolanaWalletError, assertWalletCanSign, assertWalletCanSignAndSendTransactions, assertWalletCanSignIn, assertWalletCanSignMessage, assertWalletCanSignTransactions, assertWalletConnected, createNoWalletSelectedError, isWalletConnected } from './wallet.mjs';
|
|
14
|
-
export { S as SOLANA_CHAINS, a as SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, b as adaptSolanaStandardWallet, g as getRegisteredSolanaWallets, c as getSolanaChain, i as isSolanaStandardWallet, s as subscribeSolanaWallets } from './shared/core.TqudP0hB.mjs';
|
|
15
13
|
export { AccountRole, address, appendTransactionMessageInstruction, compileTransaction, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, createTransactionMessage, extendClient, generateKeyPairSigner, getAbortablePromise, getTransactionEncoder, isAbortError, isAddress, lamports, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, summarizeTransactionPlanResult } from '@solana/kit';
|
|
16
14
|
export { Buffer } from 'buffer/';
|
|
15
|
+
export { S as SOLANA_CHAINS, a as SOLANA_MOBILE_WALLET_ADAPTER_WALLET_NAME, b as adaptSolanaStandardWallet, g as getRegisteredSolanaWallets, c as getSolanaChain, i as isSolanaStandardWallet, s as subscribeSolanaWallets } from './shared/core.TqudP0hB.mjs';
|
|
16
|
+
export { a as adaptSolanaIosWallet, g as getDefaultIosWalletAppIdentity, b as getDefaultIosWalletRedirectUrl, c as getSolanaIosWallets, h as handleSolanaIosWalletCallback, i as isIosBrowser, d as isSolanaIosBrowserWalletSupported, e as isSolanaIosWalletInfo } from './shared/core.CDVW-ApZ.mjs';
|
|
17
17
|
import '@solana/kit-plugin-rpc';
|
|
18
|
-
import 'tweetnacl';
|
|
19
|
-
import 'bs58';
|
|
20
18
|
import '@solana-mobile/wallet-standard-mobile';
|
|
21
19
|
import '@wallet-standard/features';
|
|
22
20
|
import '@solana/wallet-standard-features';
|
|
21
|
+
import 'bs58';
|
|
23
22
|
import '@wallet-standard/app';
|
|
23
|
+
import 'tweetnacl';
|
package/dist/kit.cjs
CHANGED
|
@@ -2,13 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const kit = require('@solana/kit');
|
|
4
4
|
const kitPluginRpc = require('@solana/kit-plugin-rpc');
|
|
5
|
-
const naclModule = require('tweetnacl');
|
|
6
5
|
const clusters = require('./clusters.cjs');
|
|
7
6
|
|
|
8
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
9
|
-
|
|
10
|
-
const naclModule__default = /*#__PURE__*/_interopDefaultCompat(naclModule);
|
|
11
|
-
|
|
12
7
|
function buildSolanaClient(endpoint, wsEndpoint, payer) {
|
|
13
8
|
const client = kit.createClient().use(
|
|
14
9
|
(current) => kit.extendClient(current, payer ? { payer } : {})
|
|
@@ -43,22 +38,32 @@ function resolvePayerFromSecretKey(payerSecretKey) {
|
|
|
43
38
|
if (keyPairBytes.length !== 64) {
|
|
44
39
|
throw invalidError();
|
|
45
40
|
}
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
const address2 = kit.getBase58Decoder().decode(keyPairBytes.slice(32));
|
|
42
|
+
let privateKey;
|
|
43
|
+
const getPrivateKey = () => privateKey ??= (async () => {
|
|
44
|
+
if (!globalThis.crypto?.subtle) {
|
|
45
|
+
throw new Error(
|
|
46
|
+
"`payerSecretKey` signing needs WebCrypto, which browsers only expose in a secure context (https, or http on localhost)."
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return (await kit.createKeyPairFromBytes(keyPairBytes)).privateKey;
|
|
50
|
+
})().catch((cause) => {
|
|
51
|
+
if (kit.isSolanaError(cause, kit.SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY)) {
|
|
52
|
+
throw invalidError();
|
|
53
|
+
}
|
|
54
|
+
throw cause;
|
|
55
|
+
});
|
|
52
56
|
return {
|
|
53
57
|
address: address2,
|
|
54
58
|
async signTransactions(transactions, config) {
|
|
55
59
|
config?.abortSignal?.throwIfAborted();
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
const key = await getPrivateKey();
|
|
61
|
+
config?.abortSignal?.throwIfAborted();
|
|
62
|
+
return Promise.all(
|
|
63
|
+
transactions.map(async (transaction) => ({
|
|
64
|
+
[address2]: await kit.signBytes(key, transaction.messageBytes)
|
|
65
|
+
}))
|
|
66
|
+
);
|
|
62
67
|
}
|
|
63
68
|
};
|
|
64
69
|
}
|
package/dist/kit.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { getBase64Encoder, getBase58Decoder, createClient, extendClient } from '@solana/kit';
|
|
1
|
+
import { getBase64Encoder, getBase58Decoder, signBytes, createClient, extendClient, createKeyPairFromBytes, isSolanaError, SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY } from '@solana/kit';
|
|
2
2
|
export { AccountRole, address, appendTransactionMessageInstruction, compileTransaction, createReactiveActionStore, createReactiveStoreWithInitialValueAndSlotTracking, createTransactionMessage, extendClient, generateKeyPairSigner, getAbortablePromise, getTransactionEncoder, isAbortError, isAddress, lamports, setTransactionMessageFeePayer, setTransactionMessageLifetimeUsingBlockhash, summarizeTransactionPlanResult } from '@solana/kit';
|
|
3
3
|
import { solanaRpc, rpcAirdrop } from '@solana/kit-plugin-rpc';
|
|
4
|
-
import naclModule__default from 'tweetnacl';
|
|
5
4
|
import { DEFAULT_CLUSTER, getClusterEndpoint, getWebSocketEndpoint, getClusterWebSocketEndpoint } from './clusters.mjs';
|
|
6
5
|
|
|
7
6
|
function buildSolanaClient(endpoint, wsEndpoint, payer) {
|
|
@@ -38,22 +37,32 @@ function resolvePayerFromSecretKey(payerSecretKey) {
|
|
|
38
37
|
if (keyPairBytes.length !== 64) {
|
|
39
38
|
throw invalidError();
|
|
40
39
|
}
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
const address2 = getBase58Decoder().decode(keyPairBytes.slice(32));
|
|
41
|
+
let privateKey;
|
|
42
|
+
const getPrivateKey = () => privateKey ??= (async () => {
|
|
43
|
+
if (!globalThis.crypto?.subtle) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
"`payerSecretKey` signing needs WebCrypto, which browsers only expose in a secure context (https, or http on localhost)."
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return (await createKeyPairFromBytes(keyPairBytes)).privateKey;
|
|
49
|
+
})().catch((cause) => {
|
|
50
|
+
if (isSolanaError(cause, SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY)) {
|
|
51
|
+
throw invalidError();
|
|
52
|
+
}
|
|
53
|
+
throw cause;
|
|
54
|
+
});
|
|
47
55
|
return {
|
|
48
56
|
address: address2,
|
|
49
57
|
async signTransactions(transactions, config) {
|
|
50
58
|
config?.abortSignal?.throwIfAborted();
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
const key = await getPrivateKey();
|
|
60
|
+
config?.abortSignal?.throwIfAborted();
|
|
61
|
+
return Promise.all(
|
|
62
|
+
transactions.map(async (transaction) => ({
|
|
63
|
+
[address2]: await signBytes(key, transaction.messageBytes)
|
|
64
|
+
}))
|
|
65
|
+
);
|
|
57
66
|
}
|
|
58
67
|
};
|
|
59
68
|
}
|
package/dist/rpc.cjs
CHANGED
|
@@ -4,7 +4,6 @@ const clusters = require('./clusters.cjs');
|
|
|
4
4
|
const kit = require('./kit.cjs');
|
|
5
5
|
require('@solana/kit');
|
|
6
6
|
require('@solana/kit-plugin-rpc');
|
|
7
|
-
require('tweetnacl');
|
|
8
7
|
|
|
9
8
|
function createSolanaContext(config = {}) {
|
|
10
9
|
const cluster = config.cluster ?? clusters.DEFAULT_CLUSTER;
|
package/dist/rpc.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { DEFAULT_CLUSTER, getClusterEndpoint, getWebSocketEndpoint, getClusterWe
|
|
|
2
2
|
import { createSolanaClient } from './kit.mjs';
|
|
3
3
|
import '@solana/kit';
|
|
4
4
|
import '@solana/kit-plugin-rpc';
|
|
5
|
-
import 'tweetnacl';
|
|
6
5
|
|
|
7
6
|
function createSolanaContext(config = {}) {
|
|
8
7
|
const cluster = config.cluster ?? DEFAULT_CLUSTER;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-solana/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"description": "Framework-agnostic primitives for Vue Solana libraries.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"directory": "packages/core"
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
|
+
"sideEffects": false,
|
|
24
25
|
"main": "./dist/index.cjs",
|
|
25
26
|
"module": "./dist/index.mjs",
|
|
26
27
|
"types": "./dist/index.d.ts",
|