@solana/web3.js 1.87.3 → 2.0.0-experimental.0099b2a
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/README.md +56 -112
- package/dist/index.browser.cjs +927 -0
- package/dist/index.browser.cjs.map +1 -0
- package/dist/index.browser.js +876 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.development.js +4180 -0
- package/dist/index.development.js.map +1 -0
- package/dist/index.native.js +865 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.node.cjs +916 -0
- package/dist/index.node.cjs.map +1 -0
- package/dist/index.node.js +865 -0
- package/dist/index.node.js.map +1 -0
- package/dist/index.production.min.js +87 -0
- package/dist/types/airdrop-confirmer.d.ts +20 -0
- package/dist/types/airdrop.d.ts +23 -0
- package/dist/types/cached-abortable-iterable.d.ts +11 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/rpc-default-config.d.ts +3 -0
- package/dist/types/rpc-integer-overflow-error.d.ts +8 -0
- package/dist/types/rpc-request-coalescer.d.ts +5 -0
- package/dist/types/rpc-request-deduplication.d.ts +2 -0
- package/dist/types/rpc-subscription-coalescer.d.ts +10 -0
- package/dist/types/rpc-transport.d.ts +4 -0
- package/dist/types/rpc-websocket-autopinger.d.ts +8 -0
- package/dist/types/rpc-websocket-connection-sharding.d.ts +13 -0
- package/dist/types/rpc-websocket-transport.d.ts +13 -0
- package/dist/types/rpc.d.ts +7 -0
- package/dist/types/send-transaction.d.ts +37 -0
- package/dist/types/transaction-confirmation-strategy-blockheight.d.ts +10 -0
- package/dist/types/transaction-confirmation-strategy-nonce.d.ts +15 -0
- package/dist/types/transaction-confirmation-strategy-racer.d.ts +14 -0
- package/dist/types/transaction-confirmation-strategy-recent-signature.d.ts +13 -0
- package/dist/types/transaction-confirmation-strategy-timeout.d.ts +8 -0
- package/dist/types/transaction-confirmation.d.ts +37 -0
- package/package.json +85 -109
- package/lib/index.browser.cjs.js +0 -10296
- package/lib/index.browser.cjs.js.map +0 -1
- package/lib/index.browser.esm.js +0 -10193
- package/lib/index.browser.esm.js.map +0 -1
- package/lib/index.cjs.js +0 -12589
- package/lib/index.cjs.js.map +0 -1
- package/lib/index.d.ts +0 -3947
- package/lib/index.esm.js +0 -12480
- package/lib/index.esm.js.map +0 -1
- package/lib/index.iife.js +0 -26233
- package/lib/index.iife.js.map +0 -1
- package/lib/index.iife.min.js +0 -20
- package/lib/index.iife.min.js.map +0 -1
- package/lib/index.native.js +0 -10296
- package/lib/index.native.js.map +0 -1
- package/src/__forks__/browser/fetch-impl.ts +0 -4
- package/src/__forks__/browser/rpc-websocket-factory.ts +0 -1
- package/src/__forks__/react-native/fetch-impl.ts +0 -4
- package/src/__forks__/react-native/rpc-websocket-factory.ts +0 -1
- package/src/account-data.ts +0 -39
- package/src/account.ts +0 -55
- package/src/blockhash.ts +0 -4
- package/src/bpf-loader-deprecated.ts +0 -5
- package/src/bpf-loader.ts +0 -45
- package/src/connection.ts +0 -6796
- package/src/epoch-schedule.ts +0 -102
- package/src/errors.ts +0 -50
- package/src/fee-calculator.ts +0 -18
- package/src/fetch-impl.ts +0 -16
- package/src/index.ts +0 -24
- package/src/instruction.ts +0 -58
- package/src/keypair.ts +0 -102
- package/src/layout.ts +0 -188
- package/src/loader.ts +0 -267
- package/src/message/account-keys.ts +0 -79
- package/src/message/compiled-keys.ts +0 -165
- package/src/message/index.ts +0 -47
- package/src/message/legacy.ts +0 -326
- package/src/message/v0.ts +0 -496
- package/src/message/versioned.ts +0 -36
- package/src/nonce-account.ts +0 -82
- package/src/programs/address-lookup-table/index.ts +0 -435
- package/src/programs/address-lookup-table/state.ts +0 -84
- package/src/programs/compute-budget.ts +0 -281
- package/src/programs/ed25519.ts +0 -157
- package/src/programs/index.ts +0 -7
- package/src/programs/secp256k1.ts +0 -228
- package/src/programs/stake.ts +0 -935
- package/src/programs/system.ts +0 -1048
- package/src/programs/vote.ts +0 -543
- package/src/publickey.ts +0 -259
- package/src/rpc-websocket-factory.ts +0 -4
- package/src/rpc-websocket.ts +0 -79
- package/src/sysvar.ts +0 -37
- package/src/timing.ts +0 -23
- package/src/transaction/constants.ts +0 -12
- package/src/transaction/expiry-custom-errors.ts +0 -48
- package/src/transaction/index.ts +0 -5
- package/src/transaction/legacy.ts +0 -948
- package/src/transaction/message.ts +0 -140
- package/src/transaction/versioned.ts +0 -126
- package/src/utils/assert.ts +0 -8
- package/src/utils/bigint.ts +0 -43
- package/src/utils/borsh-schema.ts +0 -38
- package/src/utils/cluster.ts +0 -35
- package/src/utils/ed25519.ts +0 -43
- package/src/utils/index.ts +0 -5
- package/src/utils/makeWebsocketUrl.ts +0 -26
- package/src/utils/promise-timeout.ts +0 -14
- package/src/utils/secp256k1.ts +0 -11
- package/src/utils/send-and-confirm-raw-transaction.ts +0 -102
- package/src/utils/send-and-confirm-transaction.ts +0 -98
- package/src/utils/shortvec-encoding.ts +0 -28
- package/src/utils/sleep.ts +0 -4
- package/src/utils/to-buffer.ts +0 -11
- package/src/validator-info.ts +0 -104
- package/src/vote-account.ts +0 -236
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { SendTransactionApi } from '@solana/rpc-core/dist/types/rpc-methods/sendTransaction';
|
|
2
|
+
import { Rpc } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
3
|
+
import { Commitment } from '@solana/rpc-types';
|
|
4
|
+
import { BaseTransaction, IDurableNonceTransaction, IFullySignedTransaction, ITransactionWithBlockhashLifetime, ITransactionWithFeePayer, TransactionSignature } from '@solana/transactions';
|
|
5
|
+
import { createDefaultDurableNonceTransactionConfirmer, createDefaultRecentTransactionConfirmer } from './transaction-confirmation';
|
|
6
|
+
interface DurableNonceTransactionSenderFactoryConfig {
|
|
7
|
+
rpc: Rpc<SendTransactionApi> & Parameters<typeof createDefaultDurableNonceTransactionConfirmer>[0]['rpc'];
|
|
8
|
+
rpcSubscriptions: Parameters<typeof createDefaultDurableNonceTransactionConfirmer>[0]['rpcSubscriptions'];
|
|
9
|
+
}
|
|
10
|
+
interface TransactionWithBlockhashLifetimeSenderFactoryConfig {
|
|
11
|
+
rpc: Rpc<SendTransactionApi> & Parameters<typeof createDefaultRecentTransactionConfirmer>[0]['rpc'];
|
|
12
|
+
rpcSubscriptions: Parameters<typeof createDefaultRecentTransactionConfirmer>[0]['rpcSubscriptions'];
|
|
13
|
+
}
|
|
14
|
+
interface SendAndConfirmDurableNonceTransactionConfig extends SendTransactionInternalConfig, SendTransactionConfigWithoutEncoding {
|
|
15
|
+
confirmDurableNonceTransaction: ReturnType<typeof createDefaultDurableNonceTransactionConfirmer>;
|
|
16
|
+
transaction: SendableTransaction & IDurableNonceTransaction;
|
|
17
|
+
}
|
|
18
|
+
interface SendAndConfirmTransactionWithBlockhashLifetimeConfig extends SendTransactionInternalConfig, SendTransactionConfigWithoutEncoding {
|
|
19
|
+
confirmRecentTransaction: ReturnType<typeof createDefaultRecentTransactionConfirmer>;
|
|
20
|
+
transaction: SendableTransaction & ITransactionWithBlockhashLifetime;
|
|
21
|
+
}
|
|
22
|
+
interface SendTransactionInternalConfig extends SendTransactionConfigWithoutEncoding {
|
|
23
|
+
abortSignal?: AbortSignal;
|
|
24
|
+
commitment: Commitment;
|
|
25
|
+
rpc: Rpc<SendTransactionApi>;
|
|
26
|
+
transaction: SendableTransaction;
|
|
27
|
+
}
|
|
28
|
+
type SendableTransaction = BaseTransaction & (ITransactionWithBlockhashLifetime | IDurableNonceTransaction) & ITransactionWithFeePayer & IFullySignedTransaction;
|
|
29
|
+
type SendTransactionConfig = Parameters<SendTransactionApi['sendTransaction']>[1];
|
|
30
|
+
interface SendTransactionConfigWithoutEncoding extends Omit<NonNullable<SendTransactionConfig>, 'encoding'> {
|
|
31
|
+
}
|
|
32
|
+
export declare function createDefaultDurableNonceTransactionSender({ rpc, rpcSubscriptions, }: DurableNonceTransactionSenderFactoryConfig): (transaction: BaseTransaction & ITransactionWithFeePayer & IDurableNonceTransaction & IFullySignedTransaction, config: Omit<Parameters<typeof sendAndConfirmDurableNonceTransaction>[0], 'confirmDurableNonceTransaction' | 'rpc' | 'transaction'>) => Promise<void>;
|
|
33
|
+
export declare function createDefaultTransactionSender({ rpc, rpcSubscriptions, }: TransactionWithBlockhashLifetimeSenderFactoryConfig): (transaction: SendableTransaction & ITransactionWithBlockhashLifetime, config: Omit<Parameters<typeof sendAndConfirmTransaction>[0], 'confirmRecentTransaction' | 'rpc' | 'transaction'>) => Promise<void>;
|
|
34
|
+
export declare function sendAndConfirmDurableNonceTransaction({ abortSignal, commitment, confirmDurableNonceTransaction, rpc, transaction, ...sendTransactionConfig }: SendAndConfirmDurableNonceTransactionConfig): Promise<TransactionSignature>;
|
|
35
|
+
export declare function sendAndConfirmTransaction({ abortSignal, commitment, confirmRecentTransaction, rpc, transaction, ...sendTransactionConfig }: SendAndConfirmTransactionWithBlockhashLifetimeConfig): Promise<TransactionSignature>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=send-transaction.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Slot } from '@solana/rpc-core/dist/types/rpc-methods/common';
|
|
2
|
+
import type { SlotNotificationsApi } from '@solana/rpc-core/dist/types/rpc-subscriptions/slot-notifications';
|
|
3
|
+
import { RpcSubscriptions } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
4
|
+
type GetBlockHeightExceedencePromiseFn = (config: {
|
|
5
|
+
abortSignal: AbortSignal;
|
|
6
|
+
lastValidBlockHeight: Slot;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
export declare function createBlockHeightExceedencePromiseFactory(rpcSubscriptions: RpcSubscriptions<SlotNotificationsApi>): GetBlockHeightExceedencePromiseFn;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=transaction-confirmation-strategy-blockheight.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Base58EncodedAddress } from '@solana/addresses';
|
|
2
|
+
import { GetAccountInfoApi } from '@solana/rpc-core/dist/types/rpc-methods/getAccountInfo';
|
|
3
|
+
import { AccountNotificationsApi } from '@solana/rpc-core/dist/types/rpc-subscriptions/account-notifications';
|
|
4
|
+
import { Rpc, RpcSubscriptions } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
5
|
+
import { Commitment } from '@solana/rpc-types';
|
|
6
|
+
import { Nonce } from '@solana/transactions';
|
|
7
|
+
type GetNonceInvalidationPromiseFn = (config: {
|
|
8
|
+
abortSignal: AbortSignal;
|
|
9
|
+
commitment: Commitment;
|
|
10
|
+
currentNonceValue: Nonce;
|
|
11
|
+
nonceAccountAddress: Base58EncodedAddress;
|
|
12
|
+
}) => Promise<void>;
|
|
13
|
+
export declare function createNonceInvalidationPromiseFactory(rpc: Rpc<GetAccountInfoApi>, rpcSubscriptions: RpcSubscriptions<AccountNotificationsApi>): GetNonceInvalidationPromiseFn;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=transaction-confirmation-strategy-nonce.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Commitment } from '@solana/rpc-types';
|
|
2
|
+
import { TransactionSignature } from '@solana/transactions';
|
|
3
|
+
import { createRecentSignatureConfirmationPromiseFactory } from './transaction-confirmation-strategy-recent-signature';
|
|
4
|
+
export interface BaseTransactionConfirmationStrategyConfig {
|
|
5
|
+
abortSignal?: AbortSignal;
|
|
6
|
+
commitment: Commitment;
|
|
7
|
+
getRecentSignatureConfirmationPromise: ReturnType<typeof createRecentSignatureConfirmationPromiseFactory>;
|
|
8
|
+
}
|
|
9
|
+
type WithNonNullableAbortSignal<T> = Omit<T, 'abortSignal'> & Readonly<{
|
|
10
|
+
abortSignal: AbortSignal;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function raceStrategies<TConfig extends BaseTransactionConfirmationStrategyConfig>(signature: TransactionSignature, config: TConfig, getSpecificStrategiesForRace: (config: WithNonNullableAbortSignal<TConfig>) => readonly Promise<unknown>[]): Promise<unknown>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=transaction-confirmation-strategy-racer.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GetSignatureStatusesApi } from '@solana/rpc-core/dist/types/rpc-methods/getSignatureStatuses';
|
|
2
|
+
import { SignatureNotificationsApi } from '@solana/rpc-core/dist/types/rpc-subscriptions/signature-notifications';
|
|
3
|
+
import { Rpc, RpcSubscriptions } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
4
|
+
import { Commitment } from '@solana/rpc-types';
|
|
5
|
+
import { TransactionSignature } from '@solana/transactions';
|
|
6
|
+
type GetRecentSignatureConfirmationPromiseFn = (config: {
|
|
7
|
+
abortSignal: AbortSignal;
|
|
8
|
+
commitment: Commitment;
|
|
9
|
+
signature: TransactionSignature;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
export declare function createRecentSignatureConfirmationPromiseFactory(rpc: Rpc<GetSignatureStatusesApi>, rpcSubscriptions: RpcSubscriptions<SignatureNotificationsApi>): GetRecentSignatureConfirmationPromiseFn;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=transaction-confirmation-strategy-recent-signature.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Commitment } from '@solana/rpc-types';
|
|
2
|
+
type Config = Readonly<{
|
|
3
|
+
abortSignal: AbortSignal;
|
|
4
|
+
commitment: Commitment;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function getTimeoutPromise({ abortSignal: callerAbortSignal, commitment }: Config): Promise<unknown>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=transaction-confirmation-strategy-timeout.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Slot } from '@solana/rpc-core/dist/types/rpc-methods/common';
|
|
2
|
+
import type { GetAccountInfoApi } from '@solana/rpc-core/dist/types/rpc-methods/getAccountInfo';
|
|
3
|
+
import type { GetSignatureStatusesApi } from '@solana/rpc-core/dist/types/rpc-methods/getSignatureStatuses';
|
|
4
|
+
import type { AccountNotificationsApi } from '@solana/rpc-core/dist/types/rpc-subscriptions/account-notifications';
|
|
5
|
+
import type { SignatureNotificationsApi } from '@solana/rpc-core/dist/types/rpc-subscriptions/signature-notifications';
|
|
6
|
+
import type { SlotNotificationsApi } from '@solana/rpc-core/dist/types/rpc-subscriptions/slot-notifications';
|
|
7
|
+
import type { Rpc, RpcSubscriptions } from '@solana/rpc-transport/dist/types/json-rpc-types';
|
|
8
|
+
import { IDurableNonceTransaction, ITransactionWithFeePayer, ITransactionWithSignatures } from '@solana/transactions';
|
|
9
|
+
import { createBlockHeightExceedencePromiseFactory } from './transaction-confirmation-strategy-blockheight';
|
|
10
|
+
import { createNonceInvalidationPromiseFactory } from './transaction-confirmation-strategy-nonce';
|
|
11
|
+
import { BaseTransactionConfirmationStrategyConfig } from './transaction-confirmation-strategy-racer';
|
|
12
|
+
interface DefaultDurableNonceTransactionConfirmerConfig {
|
|
13
|
+
rpc: Rpc<GetSignatureStatusesApi & GetAccountInfoApi>;
|
|
14
|
+
rpcSubscriptions: RpcSubscriptions<AccountNotificationsApi & SignatureNotificationsApi>;
|
|
15
|
+
}
|
|
16
|
+
interface DefaultRecentTransactionConfirmerConfig {
|
|
17
|
+
rpc: Rpc<GetSignatureStatusesApi>;
|
|
18
|
+
rpcSubscriptions: RpcSubscriptions<SignatureNotificationsApi & SlotNotificationsApi>;
|
|
19
|
+
}
|
|
20
|
+
interface WaitForDurableNonceTransactionConfirmationConfig extends BaseTransactionConfirmationStrategyConfig {
|
|
21
|
+
getNonceInvalidationPromise: ReturnType<typeof createNonceInvalidationPromiseFactory>;
|
|
22
|
+
transaction: ITransactionWithFeePayer & ITransactionWithSignatures & IDurableNonceTransaction;
|
|
23
|
+
}
|
|
24
|
+
interface WaitForRecentTransactionWithBlockhashLifetimeConfirmationConfig extends BaseTransactionConfirmationStrategyConfig {
|
|
25
|
+
getBlockHeightExceedencePromise: ReturnType<typeof createBlockHeightExceedencePromiseFactory>;
|
|
26
|
+
transaction: ITransactionWithFeePayer & ITransactionWithSignatures & Readonly<{
|
|
27
|
+
lifetimeConstraint: {
|
|
28
|
+
lastValidBlockHeight: Slot;
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
export declare function createDefaultDurableNonceTransactionConfirmer({ rpc, rpcSubscriptions, }: DefaultDurableNonceTransactionConfirmerConfig): (config: Omit<Parameters<typeof waitForDurableNonceTransactionConfirmation>[0], 'getNonceInvalidationPromise' | 'getRecentSignatureConfirmationPromise'>) => Promise<void>;
|
|
33
|
+
export declare function createDefaultRecentTransactionConfirmer({ rpc, rpcSubscriptions, }: DefaultRecentTransactionConfirmerConfig): (config: Omit<Parameters<typeof waitForRecentTransactionConfirmation>[0], 'getBlockHeightExceedencePromise' | 'getRecentSignatureConfirmationPromise'>) => Promise<void>;
|
|
34
|
+
export declare function waitForDurableNonceTransactionConfirmation(config: WaitForDurableNonceTransactionConfirmationConfig): Promise<void>;
|
|
35
|
+
export declare function waitForRecentTransactionConfirmation(config: WaitForRecentTransactionWithBlockhashLifetimeConfirmationConfig): Promise<void>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=transaction-confirmation.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,132 +1,108 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/web3.js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-experimental.0099b2a",
|
|
4
4
|
"description": "Solana Javascript API",
|
|
5
|
+
"exports": {
|
|
6
|
+
"browser": {
|
|
7
|
+
"import": "./dist/index.browser.js",
|
|
8
|
+
"require": "./dist/index.browser.cjs"
|
|
9
|
+
},
|
|
10
|
+
"node": {
|
|
11
|
+
"import": "./dist/index.node.js",
|
|
12
|
+
"require": "./dist/index.node.cjs"
|
|
13
|
+
},
|
|
14
|
+
"react-native": "./dist/index.native.js",
|
|
15
|
+
"types": "./dist/types/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"browser": {
|
|
18
|
+
"./dist/index.node.cjs": "./dist/index.browser.cjs",
|
|
19
|
+
"./dist/index.node.js": "./dist/index.browser.js"
|
|
20
|
+
},
|
|
21
|
+
"jsdelivr": "./dist/index.production.min.js",
|
|
22
|
+
"umd": "./dist/index.production.min.js",
|
|
23
|
+
"unpkg": "./dist/index.production.min.js",
|
|
24
|
+
"main": "./dist/index.node.cjs",
|
|
25
|
+
"module": "./dist/index.node.js",
|
|
26
|
+
"react-native": "./dist/index.native.js",
|
|
27
|
+
"types": "./dist/types/index.d.ts",
|
|
28
|
+
"type": "module",
|
|
29
|
+
"files": [
|
|
30
|
+
"./dist/"
|
|
31
|
+
],
|
|
32
|
+
"sideEffects": false,
|
|
5
33
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
34
|
+
"blockchain",
|
|
35
|
+
"solana",
|
|
36
|
+
"web3"
|
|
8
37
|
],
|
|
9
|
-
"license": "MIT",
|
|
10
38
|
"author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
|
|
11
|
-
"
|
|
39
|
+
"license": "MIT",
|
|
12
40
|
"repository": {
|
|
13
41
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/solana-labs/solana-web3.js
|
|
42
|
+
"url": "https://github.com/solana-labs/solana-web3.js"
|
|
15
43
|
},
|
|
16
44
|
"bugs": {
|
|
17
|
-
"url": "http://github.com/solana-labs/solana-web3.js
|
|
18
|
-
},
|
|
19
|
-
"publishConfig": {
|
|
20
|
-
"access": "public"
|
|
21
|
-
},
|
|
22
|
-
"browser": {
|
|
23
|
-
"./lib/index.cjs.js": "./lib/index.browser.cjs.js",
|
|
24
|
-
"./lib/index.esm.js": "./lib/index.browser.esm.js"
|
|
45
|
+
"url": "http://github.com/solana-labs/solana-web3.js/issues"
|
|
25
46
|
},
|
|
26
|
-
"react-native": "lib/index.native.js",
|
|
27
|
-
"main": "lib/index.cjs.js",
|
|
28
|
-
"module": "lib/index.esm.js",
|
|
29
|
-
"types": "lib/index.d.ts",
|
|
30
47
|
"browserslist": [
|
|
31
|
-
"
|
|
32
|
-
"not IE 11",
|
|
48
|
+
"supports bigint and not dead",
|
|
33
49
|
"maintained node versions"
|
|
34
50
|
],
|
|
35
|
-
"files": [
|
|
36
|
-
"/lib",
|
|
37
|
-
"/src"
|
|
38
|
-
],
|
|
39
|
-
"scripts": {
|
|
40
|
-
"compile:docs": "typedoc --treatWarningsAsErrors",
|
|
41
|
-
"compile:js": "cross-env NODE_ENV=production rollup -c",
|
|
42
|
-
"compile:typedefs": "./scripts/typegen.sh",
|
|
43
|
-
"build:fixtures": "set -ex; ./test/fixtures/noop-program/build.sh",
|
|
44
|
-
"clean": "rimraf ./doc ./declarations ./lib",
|
|
45
|
-
"dev": "cross-env NODE_ENV=development rollup -c --watch",
|
|
46
|
-
"publish-packages": "semantic-release --repository-url git@github.com:solana-labs/solana-web3.js.git",
|
|
47
|
-
"test:lint": "eslint src/ test/ --ext .js,.ts",
|
|
48
|
-
"test:lint:fix": "eslint src/ test/ --fix --ext .js,.ts",
|
|
49
|
-
"test:live": "TEST_LIVE=1 pnpm run test:unit:node",
|
|
50
|
-
"test:live-with-test-validator": "start-server-and-test '../../scripts/start-shared-test-validator.sh' http://127.0.0.1:8899/health test:live",
|
|
51
|
-
"test:prettier": "prettier --check '{,{src,test}/**/}*.{j,t}s'",
|
|
52
|
-
"test:prettier:fix": "prettier --write '{,{src,test}/**/}*.{j,t}s'",
|
|
53
|
-
"test:typecheck": "tsc --noEmit",
|
|
54
|
-
"test:unit:node": "cross-env NODE_ENV=test TS_NODE_COMPILER_OPTIONS='{ \"module\": \"commonjs\", \"target\": \"es2019\" }' ts-mocha --require esm './test/**/*.test.ts'"
|
|
55
|
-
},
|
|
56
51
|
"dependencies": {
|
|
57
|
-
"@babel/runtime": "^7.23.2",
|
|
58
|
-
"@noble/curves": "^1.2.0",
|
|
59
|
-
"@noble/hashes": "^1.3.1",
|
|
60
|
-
"@solana/buffer-layout": "^4.0.0",
|
|
61
|
-
"agentkeepalive": "^4.3.0",
|
|
62
|
-
"bigint-buffer": "^1.1.5",
|
|
63
|
-
"bn.js": "^5.2.1",
|
|
64
|
-
"borsh": "^0.7.0",
|
|
65
|
-
"bs58": "^4.0.1",
|
|
66
|
-
"buffer": "6.0.3",
|
|
67
52
|
"fast-stable-stringify": "^1.0.0",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
53
|
+
"@solana/addresses": "2.0.0-experimental.0099b2a",
|
|
54
|
+
"@solana/codecs-strings": "2.0.0-experimental.0099b2a",
|
|
55
|
+
"@solana/functional": "2.0.0-experimental.0099b2a",
|
|
56
|
+
"@solana/instructions": "2.0.0-experimental.0099b2a",
|
|
57
|
+
"@solana/keys": "2.0.0-experimental.0099b2a",
|
|
58
|
+
"@solana/rpc-core": "2.0.0-experimental.0099b2a",
|
|
59
|
+
"@solana/rpc-transport": "2.0.0-experimental.0099b2a",
|
|
60
|
+
"@solana/rpc-types": "2.0.0-experimental.0099b2a",
|
|
61
|
+
"@solana/transactions": "2.0.0-experimental.0099b2a"
|
|
72
62
|
},
|
|
73
63
|
"devDependencies": {
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@babel/plugin-transform-private-property-in-object": "^7.22.11",
|
|
78
|
-
"@babel/plugin-transform-runtime": "^7.23.2",
|
|
79
|
-
"@babel/preset-env": "^7.23.2",
|
|
80
|
-
"@babel/preset-typescript": "^7.23.2",
|
|
81
|
-
"@rollup/plugin-alias": "^4.0.3",
|
|
82
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
83
|
-
"@rollup/plugin-commonjs": "^25.0.4",
|
|
84
|
-
"@rollup/plugin-json": "^6.0.0",
|
|
85
|
-
"@rollup/plugin-multi-entry": "^6.0.0",
|
|
86
|
-
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
87
|
-
"@rollup/plugin-replace": "^5.0.2",
|
|
88
|
-
"@rollup/plugin-terser": "^0.4.3",
|
|
89
|
-
"@solana/spl-token": "^0.3.8",
|
|
90
|
-
"@types/bn.js": "^5.1.1",
|
|
91
|
-
"@types/bs58": "^4.0.1",
|
|
92
|
-
"@types/chai": "^4.3.5",
|
|
93
|
-
"@types/chai-as-promised": "^7.1.3",
|
|
94
|
-
"@types/express-serve-static-core": "^4.17.35",
|
|
95
|
-
"@types/mocha": "^10.0.1",
|
|
96
|
-
"@types/mz": "^2.7.4",
|
|
97
|
-
"@types/node": "^20.6.0",
|
|
98
|
-
"@types/node-fetch": "2",
|
|
99
|
-
"@types/sinon": "^10.0.16",
|
|
100
|
-
"@types/sinon-chai": "^3.2.9",
|
|
64
|
+
"@solana/eslint-config-solana": "^1.0.2",
|
|
65
|
+
"@swc/jest": "^0.2.29",
|
|
66
|
+
"@types/jest": "^29.5.6",
|
|
101
67
|
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
102
68
|
"@typescript-eslint/parser": "^6.3.0",
|
|
103
|
-
"
|
|
104
|
-
"chai-as-promised": "^7.1.1",
|
|
105
|
-
"cross-env": "7.0.3",
|
|
69
|
+
"agadoo": "^3.0.0",
|
|
106
70
|
"eslint": "^8.45.0",
|
|
107
|
-
"eslint-
|
|
108
|
-
"eslint-plugin-
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"mockttp": "^3.9.2",
|
|
114
|
-
"mz": "^2.7.0",
|
|
115
|
-
"node-abort-controller": "^3.0.1",
|
|
71
|
+
"eslint-plugin-jest": "^27.4.2",
|
|
72
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
73
|
+
"jest": "^29.7.0",
|
|
74
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
75
|
+
"jest-runner-eslint": "^2.1.2",
|
|
76
|
+
"jest-runner-prettier": "^1.0.0",
|
|
116
77
|
"prettier": "^2.8",
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
78
|
+
"tsup": "7.2.0",
|
|
79
|
+
"typescript": "^5.2.2",
|
|
80
|
+
"version-from-git": "^1.1.1",
|
|
81
|
+
"build-scripts": "0.0.0",
|
|
82
|
+
"test-config": "0.0.0",
|
|
83
|
+
"tsconfig": "0.0.0"
|
|
84
|
+
},
|
|
85
|
+
"bundlewatch": {
|
|
86
|
+
"defaultCompression": "gzip",
|
|
87
|
+
"files": [
|
|
88
|
+
{
|
|
89
|
+
"path": "./dist/index*.js"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"scripts": {
|
|
94
|
+
"compile:js": "tsup --config build-scripts/tsup.config.library.ts",
|
|
95
|
+
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
96
|
+
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
97
|
+
"publish-packages": "sed -i 's/@solana\\/web3\\.js-experimental/@solana\\/web3\\.js/g' package.json && sed -i 's/@solana\\/web3\\.js/@solana\\/web3\\.js-bak/g' ../library-legacy/package.json && pnpm publish --tag experimental --access public --no-git-checks && git reset --hard",
|
|
98
|
+
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
|
|
99
|
+
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
100
|
+
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
101
|
+
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|
|
102
|
+
"test:treeshakability:native": "agadoo dist/index.native.js",
|
|
103
|
+
"test:treeshakability:node": "agadoo dist/index.node.js",
|
|
104
|
+
"test:typecheck": "tsc --noEmit",
|
|
105
|
+
"test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
|
|
106
|
+
"test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
|
|
131
107
|
}
|
|
132
|
-
}
|
|
108
|
+
}
|