@solana/rpc-api 2.0.0-experimental.12ae1c6
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/LICENSE +20 -0
- package/README.md +17 -0
- package/dist/index.browser.cjs +199 -0
- package/dist/index.browser.cjs.map +1 -0
- package/dist/index.browser.js +197 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.native.js +197 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.node.cjs +199 -0
- package/dist/index.node.cjs.map +1 -0
- package/dist/index.node.js +197 -0
- package/dist/index.node.js.map +1 -0
- package/dist/types/common-transactions.d.ts +247 -0
- package/dist/types/common-transactions.d.ts.map +1 -0
- package/dist/types/common.d.ts +69 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/getAccountInfo.d.ts +35 -0
- package/dist/types/getAccountInfo.d.ts.map +1 -0
- package/dist/types/getBalance.d.ts +15 -0
- package/dist/types/getBalance.d.ts.map +1 -0
- package/dist/types/getBlock.d.ts +174 -0
- package/dist/types/getBlock.d.ts.map +1 -0
- package/dist/types/getBlockCommitment.d.ts +15 -0
- package/dist/types/getBlockCommitment.d.ts.map +1 -0
- package/dist/types/getBlockHeight.d.ts +14 -0
- package/dist/types/getBlockHeight.d.ts.map +1 -0
- package/dist/types/getBlockProduction.d.ts +39 -0
- package/dist/types/getBlockProduction.d.ts.map +1 -0
- package/dist/types/getBlockTime.d.ts +14 -0
- package/dist/types/getBlockTime.d.ts.map +1 -0
- package/dist/types/getBlocks.d.ts +13 -0
- package/dist/types/getBlocks.d.ts.map +1 -0
- package/dist/types/getBlocksWithLimit.d.ts +14 -0
- package/dist/types/getBlocksWithLimit.d.ts.map +1 -0
- package/dist/types/getClusterNodes.d.ts +34 -0
- package/dist/types/getClusterNodes.d.ts.map +1 -0
- package/dist/types/getEpochInfo.d.ts +27 -0
- package/dist/types/getEpochInfo.d.ts.map +1 -0
- package/dist/types/getEpochSchedule.d.ts +23 -0
- package/dist/types/getEpochSchedule.d.ts.map +1 -0
- package/dist/types/getFeeForMessage.d.ts +16 -0
- package/dist/types/getFeeForMessage.d.ts.map +1 -0
- package/dist/types/getFirstAvailableBlock.d.ts +12 -0
- package/dist/types/getFirstAvailableBlock.d.ts.map +1 -0
- package/dist/types/getGenesisHash.d.ts +11 -0
- package/dist/types/getGenesisHash.d.ts.map +1 -0
- package/dist/types/getHealth.d.ts +10 -0
- package/dist/types/getHealth.d.ts.map +1 -0
- package/dist/types/getHighestSnapshotSlot.d.ts +18 -0
- package/dist/types/getHighestSnapshotSlot.d.ts.map +1 -0
- package/dist/types/getIdentity.d.ts +13 -0
- package/dist/types/getIdentity.d.ts.map +1 -0
- package/dist/types/getInflationGovernor.d.ts +29 -0
- package/dist/types/getInflationGovernor.d.ts.map +1 -0
- package/dist/types/getInflationRate.d.ts +21 -0
- package/dist/types/getInflationRate.d.ts.map +1 -0
- package/dist/types/getInflationReward.d.ts +22 -0
- package/dist/types/getInflationReward.d.ts.map +1 -0
- package/dist/types/getLargestAccounts.d.ts +23 -0
- package/dist/types/getLargestAccounts.d.ts.map +1 -0
- package/dist/types/getLatestBlockhash.d.ts +19 -0
- package/dist/types/getLatestBlockhash.d.ts.map +1 -0
- package/dist/types/getLeaderSchedule.d.ts +51 -0
- package/dist/types/getLeaderSchedule.d.ts.map +1 -0
- package/dist/types/getMaxRetransmitSlot.d.ts +12 -0
- package/dist/types/getMaxRetransmitSlot.d.ts.map +1 -0
- package/dist/types/getMaxShredInsertSlot.d.ts +12 -0
- package/dist/types/getMaxShredInsertSlot.d.ts.map +1 -0
- package/dist/types/getMinimumBalanceForRentExemption.d.ts +13 -0
- package/dist/types/getMinimumBalanceForRentExemption.d.ts.map +1 -0
- package/dist/types/getMultipleAccounts.d.ts +45 -0
- package/dist/types/getMultipleAccounts.d.ts.map +1 -0
- package/dist/types/getProgramAccounts.d.ts +61 -0
- package/dist/types/getProgramAccounts.d.ts.map +1 -0
- package/dist/types/getRecentPerformanceSamples.d.ts +25 -0
- package/dist/types/getRecentPerformanceSamples.d.ts.map +1 -0
- package/dist/types/getRecentPrioritizationFees.d.ts +31 -0
- package/dist/types/getRecentPrioritizationFees.d.ts.map +1 -0
- package/dist/types/getSignatureStatuses.d.ts +58 -0
- package/dist/types/getSignatureStatuses.d.ts.map +1 -0
- package/dist/types/getSignaturesForAddress.d.ts +40 -0
- package/dist/types/getSignaturesForAddress.d.ts.map +1 -0
- package/dist/types/getSlot.d.ts +14 -0
- package/dist/types/getSlot.d.ts.map +1 -0
- package/dist/types/getSlotLeader.d.ts +13 -0
- package/dist/types/getSlotLeader.d.ts.map +1 -0
- package/dist/types/getSlotLeaders.d.ts +17 -0
- package/dist/types/getSlotLeaders.d.ts.map +1 -0
- package/dist/types/getStakeActivation.d.ts +24 -0
- package/dist/types/getStakeActivation.d.ts.map +1 -0
- package/dist/types/getStakeMinimumDelegation.d.ts +13 -0
- package/dist/types/getStakeMinimumDelegation.d.ts.map +1 -0
- package/dist/types/getSupply.d.ts +42 -0
- package/dist/types/getSupply.d.ts.map +1 -0
- package/dist/types/getTokenAccountBalance.d.ts +16 -0
- package/dist/types/getTokenAccountBalance.d.ts.map +1 -0
- package/dist/types/getTokenAccountsByDelegate.d.ts +55 -0
- package/dist/types/getTokenAccountsByDelegate.d.ts.map +1 -0
- package/dist/types/getTokenAccountsByOwner.d.ts +55 -0
- package/dist/types/getTokenAccountsByOwner.d.ts.map +1 -0
- package/dist/types/getTokenLargestAccounts.d.ts +16 -0
- package/dist/types/getTokenLargestAccounts.d.ts.map +1 -0
- package/dist/types/getTokenSupply.d.ts +16 -0
- package/dist/types/getTokenSupply.d.ts.map +1 -0
- package/dist/types/getTransaction.d.ts +166 -0
- package/dist/types/getTransaction.d.ts.map +1 -0
- package/dist/types/getTransactionCount.d.ts +14 -0
- package/dist/types/getTransactionCount.d.ts.map +1 -0
- package/dist/types/getVersion.d.ts +15 -0
- package/dist/types/getVersion.d.ts.map +1 -0
- package/dist/types/getVoteAccounts.d.ts +44 -0
- package/dist/types/getVoteAccounts.d.ts.map +1 -0
- package/dist/types/index.d.ts +64 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/isBlockhashValid.d.ts +18 -0
- package/dist/types/isBlockhashValid.d.ts.map +1 -0
- package/dist/types/minimumLedgerSlot.d.ts +12 -0
- package/dist/types/minimumLedgerSlot.d.ts.map +1 -0
- package/dist/types/requestAirdrop.d.ts +16 -0
- package/dist/types/requestAirdrop.d.ts.map +1 -0
- package/dist/types/sendTransaction.d.ts +49 -0
- package/dist/types/sendTransaction.d.ts.map +1 -0
- package/dist/types/simulateTransaction.d.ts +105 -0
- package/dist/types/simulateTransaction.d.ts.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minimumLedgerSlot.d.ts","sourceRoot":"","sources":["../../src/minimumLedgerSlot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,KAAK,4BAA4B,GAAG,IAAI,CAAC;AAEzC,MAAM,WAAW,oBAAqB,SAAQ,aAAa;IACvD;;;OAGG;IACH,iBAAiB,IAAI,4BAA4B,CAAC;CACrD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Address } from '@solana/addresses';
|
|
2
|
+
import type { Signature } from '@solana/keys';
|
|
3
|
+
import type { RpcApiMethods } from '@solana/rpc-spec';
|
|
4
|
+
import type { Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
|
|
5
|
+
type RequestAirdropConfig = Readonly<{
|
|
6
|
+
commitment?: Commitment;
|
|
7
|
+
}>;
|
|
8
|
+
type RequestAirdropResponse = Signature;
|
|
9
|
+
export interface RequestAirdropApi extends RpcApiMethods {
|
|
10
|
+
/**
|
|
11
|
+
* Requests an airdrop of lamports to a Pubkey
|
|
12
|
+
*/
|
|
13
|
+
requestAirdrop(recipientAccount: Address, lamports: LamportsUnsafeBeyond2Pow53Minus1, config?: RequestAirdropConfig): RequestAirdropResponse;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=requestAirdrop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestAirdrop.d.ts","sourceRoot":"","sources":["../../src/requestAirdrop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAEtF,KAAK,oBAAoB,GAAG,QAAQ,CAAC;IACjC,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC,CAAC;AAEH,KAAK,sBAAsB,GAAG,SAAS,CAAC;AAExC,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACpD;;OAEG;IACH,cAAc,CACV,gBAAgB,EAAE,OAAO,EACzB,QAAQ,EAAE,gCAAgC,EAC1C,MAAM,CAAC,EAAE,oBAAoB,GAC9B,sBAAsB,CAAC;CAC7B"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Signature } from '@solana/keys';
|
|
2
|
+
import type { RpcApiMethods } from '@solana/rpc-spec';
|
|
3
|
+
import type { Commitment, Slot } from '@solana/rpc-types';
|
|
4
|
+
import type { Base64EncodedWireTransaction } from '@solana/transactions';
|
|
5
|
+
type SendTransactionConfig = Readonly<{
|
|
6
|
+
skipPreflight?: boolean;
|
|
7
|
+
preflightCommitment?: Commitment;
|
|
8
|
+
maxRetries?: bigint;
|
|
9
|
+
minContextSlot?: Slot;
|
|
10
|
+
}>;
|
|
11
|
+
type SendTransactionResponse = Signature;
|
|
12
|
+
export interface SendTransactionApi extends RpcApiMethods {
|
|
13
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
14
|
+
sendTransaction(base64EncodedWireTransaction: Base64EncodedWireTransaction, config?: SendTransactionConfig & {
|
|
15
|
+
encoding?: 'base58';
|
|
16
|
+
}): SendTransactionResponse;
|
|
17
|
+
/**
|
|
18
|
+
* Submits a signed transaction to the cluster for processing.
|
|
19
|
+
*
|
|
20
|
+
* This method does not alter the transaction in any way; it relays the transaction created by
|
|
21
|
+
* clients to the node as-is.
|
|
22
|
+
*
|
|
23
|
+
* If the node's rpc service receives the transaction, this method immediately succeeds, without
|
|
24
|
+
* waiting for any confirmations. A successful response from this method does not guarantee the
|
|
25
|
+
* transaction is processed or confirmed by the cluster.
|
|
26
|
+
*
|
|
27
|
+
* While the rpc service will reasonably retry to submit it, the transaction could be rejected
|
|
28
|
+
* if transaction's `recent_blockhash` expires before it lands.
|
|
29
|
+
*
|
|
30
|
+
* Use `getSignatureStatuses` to ensure a transaction is processed and confirmed.
|
|
31
|
+
*
|
|
32
|
+
* Before submitting, the following preflight checks are performed:
|
|
33
|
+
*
|
|
34
|
+
* 1. The transaction signatures are verified
|
|
35
|
+
* 2. The transaction is simulated against the bank slot specified by the preflight
|
|
36
|
+
* commitment. On failure an error will be returned. Preflight checks may be disabled if
|
|
37
|
+
* desired. It is recommended to specify the same commitment and preflight commitment to
|
|
38
|
+
* avoid confusing behavior.
|
|
39
|
+
*
|
|
40
|
+
* The returned signature is the first signature in the transaction, which is used to identify
|
|
41
|
+
* the transaction. This identifier can be easily extracted from the transaction data before
|
|
42
|
+
* submission.
|
|
43
|
+
*/
|
|
44
|
+
sendTransaction(base64EncodedWireTransaction: Base64EncodedWireTransaction, config?: SendTransactionConfig & {
|
|
45
|
+
encoding: 'base64';
|
|
46
|
+
}): SendTransactionResponse;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=sendTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendTransaction.d.ts","sourceRoot":"","sources":["../../src/sendTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEzE,KAAK,qBAAqB,GAAG,QAAQ,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,IAAI,CAAC;CACzB,CAAC,CAAC;AAEH,KAAK,uBAAuB,GAAG,SAAS,CAAC;AAEzC,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACrD,wEAAwE;IACxE,eAAe,CACX,4BAA4B,EAAE,4BAA4B,EAC1D,MAAM,CAAC,EAAE,qBAAqB,GAAG;QAAE,QAAQ,CAAC,EAAE,QAAQ,CAAA;KAAE,GACzD,uBAAuB,CAAC;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,eAAe,CACX,4BAA4B,EAAE,4BAA4B,EAC1D,MAAM,CAAC,EAAE,qBAAqB,GAAG;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,GACxD,uBAAuB,CAAC;CAC9B"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { Address } from '@solana/addresses';
|
|
2
|
+
import type { RpcApiMethods } from '@solana/rpc-spec';
|
|
3
|
+
import type { Base58EncodedBytes, Base64EncodedDataResponse, Commitment, Slot, SolanaRpcResponse, TransactionError, U64UnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
|
|
4
|
+
import type { Base64EncodedWireTransaction } from '@solana/transactions';
|
|
5
|
+
import { AccountInfoBase, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData } from './common.js';
|
|
6
|
+
type SimulateTransactionConfigBase = Readonly<{
|
|
7
|
+
/**
|
|
8
|
+
* Commitment level to simulate the transaction at
|
|
9
|
+
* @defaultValue finalized
|
|
10
|
+
* */
|
|
11
|
+
commitment?: Commitment;
|
|
12
|
+
/** The minimum slot that the request can be evaluated at */
|
|
13
|
+
minContextSlot?: Slot;
|
|
14
|
+
}>;
|
|
15
|
+
type SigVerifyAndReplaceRecentBlockhashConfig = Readonly<{
|
|
16
|
+
/** if `true` the transaction signatures will be verified (conflicts with `replaceRecentBlockhash`) */
|
|
17
|
+
sigVerify: true;
|
|
18
|
+
/** if `true` the transaction recent blockhash will be replaced with the most recent blockhash. (conflicts with `sigVerify`) */
|
|
19
|
+
replaceRecentBlockhash?: false;
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
/** if `true` the transaction recent blockhash will be replaced with the most recent blockhash. (conflicts with `sigVerify`) */
|
|
22
|
+
replaceRecentBlockhash: true;
|
|
23
|
+
/** if `true` the transaction signatures will be verified (conflicts with `replaceRecentBlockhash`) */
|
|
24
|
+
sigVerify?: false;
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
/** if `true` the transaction signatures will be verified (conflicts with `replaceRecentBlockhash`) */
|
|
27
|
+
sigVerify?: false;
|
|
28
|
+
/** if `true` the transaction recent blockhash will be replaced with the most recent blockhash. (conflicts with `sigVerify`) */
|
|
29
|
+
replaceRecentBlockhash?: false;
|
|
30
|
+
}>;
|
|
31
|
+
type AccountsConfigWithBase64EncodingZstdCompression = Readonly<{
|
|
32
|
+
accounts: {
|
|
33
|
+
/** An `array` of accounts to return */
|
|
34
|
+
addresses: Address[];
|
|
35
|
+
/** Encoding for returned Account data */
|
|
36
|
+
encoding: 'base64+zstd';
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
type AccountsConfigWithJsonParsedEncoding = Readonly<{
|
|
40
|
+
accounts: {
|
|
41
|
+
/** An `array` of accounts to return */
|
|
42
|
+
addresses: Address[];
|
|
43
|
+
/** Encoding for returned Account data */
|
|
44
|
+
encoding: 'jsonParsed';
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
type AccountsConfigWithBase64Encoding = Readonly<{
|
|
48
|
+
accounts: {
|
|
49
|
+
/** An `array` of accounts to return */
|
|
50
|
+
addresses: Address[];
|
|
51
|
+
/** Encoding for returned Account data */
|
|
52
|
+
encoding?: 'base64';
|
|
53
|
+
};
|
|
54
|
+
}>;
|
|
55
|
+
type SimulateTransactionApiResponseBase = SolanaRpcResponse<{
|
|
56
|
+
/** Error if transaction failed, null if transaction succeeded. */
|
|
57
|
+
err: TransactionError | null;
|
|
58
|
+
/** Array of log messages the transaction instructions output during execution, null if simulation failed before the transaction was able to execute (for example due to an invalid blockhash or signature verification failure) */
|
|
59
|
+
logs: string[] | null;
|
|
60
|
+
/** The number of compute budget units consumed during the processing of this transaction */
|
|
61
|
+
unitsConsumed?: U64UnsafeBeyond2Pow53Minus1;
|
|
62
|
+
/** The most-recent return data generated by an instruction in the transaction */
|
|
63
|
+
returnData: Readonly<{
|
|
64
|
+
/** The program that generated the return data */
|
|
65
|
+
programId: Address;
|
|
66
|
+
/** The return data itself, as base-64 encoded binary data */
|
|
67
|
+
data: Base64EncodedDataResponse;
|
|
68
|
+
}> | null;
|
|
69
|
+
}>;
|
|
70
|
+
type SimulateTransactionApiResponseWithAccounts<T extends AccountInfoBase> = SolanaRpcResponse<{
|
|
71
|
+
/** Array of accounts with the same length as the `accounts.addresses` array in the request */
|
|
72
|
+
accounts: (T | null)[];
|
|
73
|
+
}>;
|
|
74
|
+
export interface SimulateTransactionApi extends RpcApiMethods {
|
|
75
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
76
|
+
simulateTransaction(base58EncodedWireTransaction: Base58EncodedBytes, config: SimulateTransactionConfigBase & SigVerifyAndReplaceRecentBlockhashConfig & AccountsConfigWithBase64Encoding): SimulateTransactionApiResponseBase & SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData>;
|
|
77
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
78
|
+
simulateTransaction(base58EncodedWireTransaction: Base58EncodedBytes, config: SimulateTransactionConfigBase & SigVerifyAndReplaceRecentBlockhashConfig & AccountsConfigWithBase64EncodingZstdCompression): SimulateTransactionApiResponseBase & SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>;
|
|
79
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
80
|
+
simulateTransaction(base58EncodedWireTransaction: Base58EncodedBytes, config: SimulateTransactionConfigBase & SigVerifyAndReplaceRecentBlockhashConfig & AccountsConfigWithJsonParsedEncoding): SimulateTransactionApiResponseBase & SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData>;
|
|
81
|
+
/** @deprecated Set `encoding` to `'base64'` when calling this method */
|
|
82
|
+
simulateTransaction(base58EncodedWireTransaction: Base58EncodedBytes, config?: SimulateTransactionConfigBase & SigVerifyAndReplaceRecentBlockhashConfig): SimulateTransactionApiResponseBase & {
|
|
83
|
+
accounts: null;
|
|
84
|
+
};
|
|
85
|
+
/** Simulate sending a transaction */
|
|
86
|
+
simulateTransaction(base64EncodedWireTransaction: Base64EncodedWireTransaction, config: SimulateTransactionConfigBase & {
|
|
87
|
+
encoding: 'base64';
|
|
88
|
+
} & SigVerifyAndReplaceRecentBlockhashConfig & AccountsConfigWithBase64Encoding): SimulateTransactionApiResponseBase & SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedData>;
|
|
89
|
+
/** Simulate sending a transaction */
|
|
90
|
+
simulateTransaction(base64EncodedWireTransaction: Base64EncodedWireTransaction, config: SimulateTransactionConfigBase & {
|
|
91
|
+
encoding: 'base64';
|
|
92
|
+
} & SigVerifyAndReplaceRecentBlockhashConfig & AccountsConfigWithBase64EncodingZstdCompression): SimulateTransactionApiResponseBase & SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>;
|
|
93
|
+
/** Simulate sending a transaction */
|
|
94
|
+
simulateTransaction(base64EncodedWireTransaction: Base64EncodedWireTransaction, config: SimulateTransactionConfigBase & {
|
|
95
|
+
encoding: 'base64';
|
|
96
|
+
} & SigVerifyAndReplaceRecentBlockhashConfig & AccountsConfigWithJsonParsedEncoding): SimulateTransactionApiResponseBase & SimulateTransactionApiResponseWithAccounts<AccountInfoBase & AccountInfoWithJsonData>;
|
|
97
|
+
/** Simulate sending a transaction */
|
|
98
|
+
simulateTransaction(base64EncodedWireTransaction: Base64EncodedWireTransaction, config: SimulateTransactionConfigBase & {
|
|
99
|
+
encoding: 'base64';
|
|
100
|
+
} & SigVerifyAndReplaceRecentBlockhashConfig): SimulateTransactionApiResponseBase & {
|
|
101
|
+
accounts: null;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export {};
|
|
105
|
+
//# sourceMappingURL=simulateTransaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simulateTransaction.d.ts","sourceRoot":"","sources":["../../src/simulateTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EACR,kBAAkB,EAClB,yBAAyB,EACzB,UAAU,EACV,IAAI,EACJ,iBAAiB,EACjB,gBAAgB,EAChB,2BAA2B,EAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EACH,eAAe,EACf,gCAAgC,EAChC,8CAA8C,EAC9C,uBAAuB,EAC1B,MAAM,UAAU,CAAC;AAElB,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rC,mBAAmB,CACf,4BAA4B,EAAE,4BAA4B,EAC1D,MAAM,EAAE,6BAA6B,GAAG;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,GAAG,wCAAwC,GACrG,gCAAgC,GACrC,kCAAkC,GACjC,0CAA0C,CAAC,eAAe,GAAG,gCAAgC,CAAC,CAAC;IAEnG,qCAAqC;IACrC,mBAAmB,CACf,4BAA4B,EAAE,4BAA4B,EAC1D,MAAM,EAAE,6BAA6B,GAAG;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,GAAG,wCAAwC,GACrG,+CAA+C,GACpD,kCAAkC,GACjC,0CAA0C,CAAC,eAAe,GAAG,8CAA8C,CAAC,CAAC;IAEjH,qCAAqC;IACrC,mBAAmB,CACf,4BAA4B,EAAE,4BAA4B,EAC1D,MAAM,EAAE,6BAA6B,GAAG;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,GAAG,wCAAwC,GACrG,oCAAoC,GACzC,kCAAkC,GACjC,0CAA0C,CAAC,eAAe,GAAG,uBAAuB,CAAC,CAAC;IAE1F,qCAAqC;IACrC,mBAAmB,CACf,4BAA4B,EAAE,4BAA4B,EAC1D,MAAM,EAAE,6BAA6B,GAAG;QAAE,QAAQ,EAAE,QAAQ,CAAA;KAAE,GAAG,wCAAwC,GAC1G,kCAAkC,GAAG;QAAE,QAAQ,EAAE,IAAI,CAAA;KAAE,CAAC;CAC9D"}
|
package/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solana/rpc-api",
|
|
3
|
+
"version": "2.0.0-experimental.12ae1c6",
|
|
4
|
+
"description": "Defines all default Solana RPC methods as types",
|
|
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
|
+
"main": "./dist/index.node.cjs",
|
|
22
|
+
"module": "./dist/index.node.js",
|
|
23
|
+
"react-native": "./dist/index.native.js",
|
|
24
|
+
"types": "./dist/types/index.d.ts",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"files": [
|
|
27
|
+
"./dist/"
|
|
28
|
+
],
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"keywords": [
|
|
31
|
+
"blockchain",
|
|
32
|
+
"solana",
|
|
33
|
+
"web3"
|
|
34
|
+
],
|
|
35
|
+
"author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/solana-labs/solana-web3.js"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "http://github.com/solana-labs/solana-web3.js/issues"
|
|
43
|
+
},
|
|
44
|
+
"browserslist": [
|
|
45
|
+
"supports bigint and not dead",
|
|
46
|
+
"maintained node versions"
|
|
47
|
+
],
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@solana/addresses": "2.0.0-development",
|
|
50
|
+
"@solana/codecs-core": "2.0.0-development",
|
|
51
|
+
"@solana/codecs-strings": "2.0.0-development",
|
|
52
|
+
"@solana/keys": "2.0.0-development",
|
|
53
|
+
"@solana/rpc-parsed-types": "2.0.0-development",
|
|
54
|
+
"@solana/rpc-spec": "2.0.0-development",
|
|
55
|
+
"@solana/rpc-transformers": "2.0.0-development",
|
|
56
|
+
"@solana/transactions": "2.0.0-development",
|
|
57
|
+
"@solana/rpc-types": "2.0.0-development"
|
|
58
|
+
},
|
|
59
|
+
"bundlewatch": {
|
|
60
|
+
"defaultCompression": "gzip",
|
|
61
|
+
"files": [
|
|
62
|
+
{
|
|
63
|
+
"path": "./dist/index*.js"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"compile:js": "tsup --config build-scripts/tsup.config.package.ts",
|
|
69
|
+
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/@solana/build-scripts/add-js-extension-to-types.mjs",
|
|
70
|
+
"dev": "jest -c node_modules/@solana/test-config/jest-dev.config.ts --globalSetup @solana/test-config/test-validator-setup.js --globalTeardown @solana/test-config/test-validator-teardown.js --rootDir . --watch",
|
|
71
|
+
"publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks",
|
|
72
|
+
"publish-packages": "pnpm prepublishOnly && pnpm publish-impl",
|
|
73
|
+
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
|
|
74
|
+
"test:lint": "jest -c node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
75
|
+
"test:prettier": "jest -c node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
76
|
+
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|
|
77
|
+
"test:treeshakability:native": "agadoo dist/index.native.js",
|
|
78
|
+
"test:treeshakability:node": "agadoo dist/index.node.js",
|
|
79
|
+
"test:typecheck": "tsc --noEmit",
|
|
80
|
+
"test:unit:browser": "jest -c node_modules/@solana/test-config/jest-unit.config.browser.ts --globalSetup @solana/test-config/test-validator-setup.js --globalTeardown @solana/test-config/test-validator-teardown.js --rootDir . --silent",
|
|
81
|
+
"test:unit:node": "jest -c node_modules/@solana/test-config/jest-unit.config.node.ts --globalSetup @solana/test-config/test-validator-setup.js --globalTeardown @solana/test-config/test-validator-teardown.js --rootDir . --silent"
|
|
82
|
+
}
|
|
83
|
+
}
|