Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@solana/rpc-core

Package Overview
Dependencies
Maintainers
14
Versions
456
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/rpc-core - npm Package Compare versions

Comparing version 2.0.0-experimental.a27face to 2.0.0-experimental.a293578

dist/types/rpc-methods/common-transactions.d.ts

433

dist/index.browser.js

@@ -1,3 +0,1 @@

import { base58 } from '@metaplex-foundation/umi-serializers';
// src/params-patcher.ts

@@ -34,59 +32,302 @@ function visitNode(value, keyPath, onIntegerOverflow) {

// src/response-patcher-allowed-numeric-values.ts
var memoizedKeypaths;
function getAllowedNumericKeypaths() {
if (!memoizedKeypaths) {
const jsonParsedTokenAccountsConfigs = [
// parsed Token/Token22 token account
["data", "parsed", "info", "tokenAmount", "decimals"],
["data", "parsed", "info", "tokenAmount", "uiAmount"],
["data", "parsed", "info", "rentExemptReserve", "decimals"],
["data", "parsed", "info", "rentExemptReserve", "uiAmount"],
["data", "parsed", "info", "delegatedAmount", "decimals"],
["data", "parsed", "info", "delegatedAmount", "uiAmount"],
[
"data",
"parsed",
"info",
"extensions",
KEYPATH_WILDCARD,
"state",
"olderTransferFee",
"transferFeeBasisPoints"
var jsonParsedTokenAccountsConfigs = [
// parsed Token/Token22 token account
["data", "parsed", "info", "tokenAmount", "decimals"],
["data", "parsed", "info", "tokenAmount", "uiAmount"],
["data", "parsed", "info", "rentExemptReserve", "decimals"],
["data", "parsed", "info", "rentExemptReserve", "uiAmount"],
["data", "parsed", "info", "delegatedAmount", "decimals"],
["data", "parsed", "info", "delegatedAmount", "uiAmount"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "olderTransferFee", "transferFeeBasisPoints"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "newerTransferFee", "transferFeeBasisPoints"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "preUpdateAverageRate"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "currentRate"]
];
var jsonParsedAccountsConfigs = [
...jsonParsedTokenAccountsConfigs,
// parsed AddressTableLookup account
["data", "parsed", "info", "lastExtendedSlotStartIndex"],
// parsed Config account
["data", "parsed", "info", "slashPenalty"],
["data", "parsed", "info", "warmupCooldownRate"],
// parsed Token/Token22 mint account
["data", "parsed", "info", "decimals"],
// parsed Token/Token22 multisig account
["data", "parsed", "info", "numRequiredSigners"],
["data", "parsed", "info", "numValidSigners"],
// parsed Stake account
["data", "parsed", "info", "stake", "delegation", "warmupCooldownRate"],
// parsed Sysvar rent account
["data", "parsed", "info", "exemptionThreshold"],
["data", "parsed", "info", "burnPercent"],
// parsed Vote account
["data", "parsed", "info", "commission"],
["data", "parsed", "info", "votes", KEYPATH_WILDCARD, "confirmationCount"]
];
var memoizedNotificationKeypaths;
var memoizedResponseKeypaths;
function getAllowedNumericKeypathsForNotification() {
if (!memoizedNotificationKeypaths) {
memoizedNotificationKeypaths = {
accountNotifications: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
blockNotifications: [
["value", "block", "blockTime"],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"accountIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"accountIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["value", "block", "transactions", KEYPATH_WILDCARD, "meta", "rewards", KEYPATH_WILDCARD, "commission"],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"index"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"writableIndexes",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"readonlyIndexes",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numReadonlySignedAccounts"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numReadonlyUnsignedAccounts"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numRequiredSignatures"
],
["value", "block", "rewards", KEYPATH_WILDCARD, "commission"]
],
[
"data",
"parsed",
"info",
"extensions",
KEYPATH_WILDCARD,
"state",
"newerTransferFee",
"transferFeeBasisPoints"
programNotifications: jsonParsedAccountsConfigs.flatMap((c) => [
["value", KEYPATH_WILDCARD, "account", ...c],
[KEYPATH_WILDCARD, "account", ...c]
])
};
}
return memoizedNotificationKeypaths;
}
function getAllowedNumericKeypathsForResponse() {
if (!memoizedResponseKeypaths) {
memoizedResponseKeypaths = {
getAccountInfo: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
getBlock: [
["blockTime"],
["transactions", KEYPATH_WILDCARD, "meta", "preTokenBalances", KEYPATH_WILDCARD, "accountIndex"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["transactions", KEYPATH_WILDCARD, "meta", "postTokenBalances", KEYPATH_WILDCARD, "accountIndex"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["transactions", KEYPATH_WILDCARD, "meta", "rewards", KEYPATH_WILDCARD, "commission"],
["transactions", KEYPATH_WILDCARD, "meta", "innerInstructions", KEYPATH_WILDCARD, "index"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"writableIndexes",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"readonlyIndexes",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numReadonlySignedAccounts"],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numReadonlyUnsignedAccounts"],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numRequiredSignatures"],
["rewards", KEYPATH_WILDCARD, "commission"]
],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "preUpdateAverageRate"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "currentRate"]
];
const jsonParsedAccountsConfigs = [
...jsonParsedTokenAccountsConfigs,
// parsed AddressTableLookup account
["data", "parsed", "info", "lastExtendedSlotStartIndex"],
// parsed Config account
["data", "parsed", "info", "slashPenalty"],
["data", "parsed", "info", "warmupCooldownRate"],
// parsed Token/Token22 mint account
["data", "parsed", "info", "decimals"],
// parsed Token/Token22 multisig account
["data", "parsed", "info", "numRequiredSigners"],
["data", "parsed", "info", "numValidSigners"],
// parsed Stake account
["data", "parsed", "info", "stake", "delegation", "warmupCooldownRate"],
// parsed Sysvar rent account
["data", "parsed", "info", "exemptionThreshold"],
["data", "parsed", "info", "burnPercent"],
// parsed Vote account
["data", "parsed", "info", "commission"],
["data", "parsed", "info", "votes", KEYPATH_WILDCARD, "confirmationCount"]
];
memoizedKeypaths = {
getAccountInfo: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
getBlockTime: [[]],

@@ -177,3 +418,3 @@ getClusterNodes: [

}
return memoizedKeypaths;
return memoizedResponseKeypaths;
}

@@ -208,5 +449,9 @@

function patchResponseForSolanaLabsRpc(rawResponse, methodName) {
const allowedKeypaths = methodName ? getAllowedNumericKeypaths()[methodName] : void 0;
const allowedKeypaths = methodName ? getAllowedNumericKeypathsForResponse()[methodName] : void 0;
return visitNode2(rawResponse, allowedKeypaths ?? []);
}
function patchResponseForSolanaLabsRpcSubscriptions(rawResponse, methodName) {
const allowedKeypaths = methodName ? getAllowedNumericKeypathsForNotification()[methodName] : void 0;
return visitNode2(rawResponse, allowedKeypaths ?? []);
}

@@ -241,48 +486,36 @@ // src/rpc-methods/index.ts

// src/stringified-bigint.ts
function assertIsStringifiedBigInt(putativeBigInt) {
try {
BigInt(putativeBigInt);
} catch (e) {
throw new Error(`\`${putativeBigInt}\` cannot be parsed as a BigInt`, {
cause: e
});
}
}
function assertIsTransactionSignature(putativeTransactionSignature) {
try {
if (
// Lowest value (64 bytes of zeroes)
putativeTransactionSignature.length < 64 || // Highest value (64 bytes of 255)
putativeTransactionSignature.length > 88
) {
throw new Error("Expected input string to decode to a byte array of length 64.");
// src/rpc-subscriptions/index.ts
function createSolanaRpcSubscriptionsApi(config) {
return new Proxy({}, {
defineProperty() {
return false;
},
deleteProperty() {
return false;
},
get(...args) {
const [_, p] = args;
const notificationName = p.toString();
return function(...rawParams) {
const handleIntegerOverflow = config?.onIntegerOverflow;
const params = patchParamsForSolanaLabsRpc(
rawParams,
handleIntegerOverflow ? (keyPath, value) => handleIntegerOverflow(notificationName, keyPath, value) : void 0
);
return {
params,
responseProcessor: (rawResponse) => patchResponseForSolanaLabsRpcSubscriptions(rawResponse, notificationName),
subscribeMethodName: notificationName.replace(/Notifications$/, "Subscribe"),
unsubscribeMethodName: notificationName.replace(/Notifications$/, "Unsubscribe")
};
};
}
const bytes = base58.serialize(putativeTransactionSignature);
const numBytes = bytes.byteLength;
if (numBytes !== 64) {
throw new Error(`Expected input string to decode to a byte array of length 64. Actual length: ${numBytes}`);
}
} catch (e) {
throw new Error(`\`${putativeTransactionSignature}\` is not a transaction signature`, {
cause: e
});
}
});
}
// src/unix-timestamp.ts
function assertIsUnixTimestamp(putativeTimestamp) {
try {
if (putativeTimestamp > 864e13 || putativeTimestamp < -864e13) {
throw new Error("Expected input number to be in the range [-8.64e15, 8.64e15]");
}
} catch (e) {
throw new Error(`\`${putativeTimestamp}\` is not a timestamp`, {
cause: e
});
}
function createSolanaRpcSubscriptionsApi_UNSTABLE(config) {
return createSolanaRpcSubscriptionsApi(config);
}
export { assertIsStringifiedBigInt, assertIsTransactionSignature, assertIsUnixTimestamp, createSolanaRpcApi };
export { createSolanaRpcApi, createSolanaRpcSubscriptionsApi, createSolanaRpcSubscriptionsApi_UNSTABLE };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.browser.js.map

@@ -1,3 +0,1 @@

import { base58 } from '@metaplex-foundation/umi-serializers';
// src/params-patcher.ts

@@ -34,59 +32,302 @@ function visitNode(value, keyPath, onIntegerOverflow) {

// src/response-patcher-allowed-numeric-values.ts
var memoizedKeypaths;
function getAllowedNumericKeypaths() {
if (!memoizedKeypaths) {
const jsonParsedTokenAccountsConfigs = [
// parsed Token/Token22 token account
["data", "parsed", "info", "tokenAmount", "decimals"],
["data", "parsed", "info", "tokenAmount", "uiAmount"],
["data", "parsed", "info", "rentExemptReserve", "decimals"],
["data", "parsed", "info", "rentExemptReserve", "uiAmount"],
["data", "parsed", "info", "delegatedAmount", "decimals"],
["data", "parsed", "info", "delegatedAmount", "uiAmount"],
[
"data",
"parsed",
"info",
"extensions",
KEYPATH_WILDCARD,
"state",
"olderTransferFee",
"transferFeeBasisPoints"
var jsonParsedTokenAccountsConfigs = [
// parsed Token/Token22 token account
["data", "parsed", "info", "tokenAmount", "decimals"],
["data", "parsed", "info", "tokenAmount", "uiAmount"],
["data", "parsed", "info", "rentExemptReserve", "decimals"],
["data", "parsed", "info", "rentExemptReserve", "uiAmount"],
["data", "parsed", "info", "delegatedAmount", "decimals"],
["data", "parsed", "info", "delegatedAmount", "uiAmount"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "olderTransferFee", "transferFeeBasisPoints"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "newerTransferFee", "transferFeeBasisPoints"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "preUpdateAverageRate"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "currentRate"]
];
var jsonParsedAccountsConfigs = [
...jsonParsedTokenAccountsConfigs,
// parsed AddressTableLookup account
["data", "parsed", "info", "lastExtendedSlotStartIndex"],
// parsed Config account
["data", "parsed", "info", "slashPenalty"],
["data", "parsed", "info", "warmupCooldownRate"],
// parsed Token/Token22 mint account
["data", "parsed", "info", "decimals"],
// parsed Token/Token22 multisig account
["data", "parsed", "info", "numRequiredSigners"],
["data", "parsed", "info", "numValidSigners"],
// parsed Stake account
["data", "parsed", "info", "stake", "delegation", "warmupCooldownRate"],
// parsed Sysvar rent account
["data", "parsed", "info", "exemptionThreshold"],
["data", "parsed", "info", "burnPercent"],
// parsed Vote account
["data", "parsed", "info", "commission"],
["data", "parsed", "info", "votes", KEYPATH_WILDCARD, "confirmationCount"]
];
var memoizedNotificationKeypaths;
var memoizedResponseKeypaths;
function getAllowedNumericKeypathsForNotification() {
if (!memoizedNotificationKeypaths) {
memoizedNotificationKeypaths = {
accountNotifications: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
blockNotifications: [
["value", "block", "blockTime"],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"accountIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"accountIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["value", "block", "transactions", KEYPATH_WILDCARD, "meta", "rewards", KEYPATH_WILDCARD, "commission"],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"index"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"writableIndexes",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"readonlyIndexes",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numReadonlySignedAccounts"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numReadonlyUnsignedAccounts"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numRequiredSignatures"
],
["value", "block", "rewards", KEYPATH_WILDCARD, "commission"]
],
[
"data",
"parsed",
"info",
"extensions",
KEYPATH_WILDCARD,
"state",
"newerTransferFee",
"transferFeeBasisPoints"
programNotifications: jsonParsedAccountsConfigs.flatMap((c) => [
["value", KEYPATH_WILDCARD, "account", ...c],
[KEYPATH_WILDCARD, "account", ...c]
])
};
}
return memoizedNotificationKeypaths;
}
function getAllowedNumericKeypathsForResponse() {
if (!memoizedResponseKeypaths) {
memoizedResponseKeypaths = {
getAccountInfo: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
getBlock: [
["blockTime"],
["transactions", KEYPATH_WILDCARD, "meta", "preTokenBalances", KEYPATH_WILDCARD, "accountIndex"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["transactions", KEYPATH_WILDCARD, "meta", "postTokenBalances", KEYPATH_WILDCARD, "accountIndex"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["transactions", KEYPATH_WILDCARD, "meta", "rewards", KEYPATH_WILDCARD, "commission"],
["transactions", KEYPATH_WILDCARD, "meta", "innerInstructions", KEYPATH_WILDCARD, "index"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"writableIndexes",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"readonlyIndexes",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numReadonlySignedAccounts"],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numReadonlyUnsignedAccounts"],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numRequiredSignatures"],
["rewards", KEYPATH_WILDCARD, "commission"]
],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "preUpdateAverageRate"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "currentRate"]
];
const jsonParsedAccountsConfigs = [
...jsonParsedTokenAccountsConfigs,
// parsed AddressTableLookup account
["data", "parsed", "info", "lastExtendedSlotStartIndex"],
// parsed Config account
["data", "parsed", "info", "slashPenalty"],
["data", "parsed", "info", "warmupCooldownRate"],
// parsed Token/Token22 mint account
["data", "parsed", "info", "decimals"],
// parsed Token/Token22 multisig account
["data", "parsed", "info", "numRequiredSigners"],
["data", "parsed", "info", "numValidSigners"],
// parsed Stake account
["data", "parsed", "info", "stake", "delegation", "warmupCooldownRate"],
// parsed Sysvar rent account
["data", "parsed", "info", "exemptionThreshold"],
["data", "parsed", "info", "burnPercent"],
// parsed Vote account
["data", "parsed", "info", "commission"],
["data", "parsed", "info", "votes", KEYPATH_WILDCARD, "confirmationCount"]
];
memoizedKeypaths = {
getAccountInfo: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
getBlockTime: [[]],

@@ -177,3 +418,3 @@ getClusterNodes: [

}
return memoizedKeypaths;
return memoizedResponseKeypaths;
}

@@ -208,5 +449,9 @@

function patchResponseForSolanaLabsRpc(rawResponse, methodName) {
const allowedKeypaths = methodName ? getAllowedNumericKeypaths()[methodName] : void 0;
const allowedKeypaths = methodName ? getAllowedNumericKeypathsForResponse()[methodName] : void 0;
return visitNode2(rawResponse, allowedKeypaths ?? []);
}
function patchResponseForSolanaLabsRpcSubscriptions(rawResponse, methodName) {
const allowedKeypaths = methodName ? getAllowedNumericKeypathsForNotification()[methodName] : void 0;
return visitNode2(rawResponse, allowedKeypaths ?? []);
}

@@ -241,48 +486,36 @@ // src/rpc-methods/index.ts

// src/stringified-bigint.ts
function assertIsStringifiedBigInt(putativeBigInt) {
try {
BigInt(putativeBigInt);
} catch (e) {
throw new Error(`\`${putativeBigInt}\` cannot be parsed as a BigInt`, {
cause: e
});
}
}
function assertIsTransactionSignature(putativeTransactionSignature) {
try {
if (
// Lowest value (64 bytes of zeroes)
putativeTransactionSignature.length < 64 || // Highest value (64 bytes of 255)
putativeTransactionSignature.length > 88
) {
throw new Error("Expected input string to decode to a byte array of length 64.");
// src/rpc-subscriptions/index.ts
function createSolanaRpcSubscriptionsApi(config) {
return new Proxy({}, {
defineProperty() {
return false;
},
deleteProperty() {
return false;
},
get(...args) {
const [_, p] = args;
const notificationName = p.toString();
return function(...rawParams) {
const handleIntegerOverflow = config?.onIntegerOverflow;
const params = patchParamsForSolanaLabsRpc(
rawParams,
handleIntegerOverflow ? (keyPath, value) => handleIntegerOverflow(notificationName, keyPath, value) : void 0
);
return {
params,
responseProcessor: (rawResponse) => patchResponseForSolanaLabsRpcSubscriptions(rawResponse, notificationName),
subscribeMethodName: notificationName.replace(/Notifications$/, "Subscribe"),
unsubscribeMethodName: notificationName.replace(/Notifications$/, "Unsubscribe")
};
};
}
const bytes = base58.serialize(putativeTransactionSignature);
const numBytes = bytes.byteLength;
if (numBytes !== 64) {
throw new Error(`Expected input string to decode to a byte array of length 64. Actual length: ${numBytes}`);
}
} catch (e) {
throw new Error(`\`${putativeTransactionSignature}\` is not a transaction signature`, {
cause: e
});
}
});
}
// src/unix-timestamp.ts
function assertIsUnixTimestamp(putativeTimestamp) {
try {
if (putativeTimestamp > 864e13 || putativeTimestamp < -864e13) {
throw new Error("Expected input number to be in the range [-8.64e15, 8.64e15]");
}
} catch (e) {
throw new Error(`\`${putativeTimestamp}\` is not a timestamp`, {
cause: e
});
}
function createSolanaRpcSubscriptionsApi_UNSTABLE(config) {
return createSolanaRpcSubscriptionsApi(config);
}
export { assertIsStringifiedBigInt, assertIsTransactionSignature, assertIsUnixTimestamp, createSolanaRpcApi };
export { createSolanaRpcApi, createSolanaRpcSubscriptionsApi, createSolanaRpcSubscriptionsApi_UNSTABLE };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.native.js.map

@@ -1,3 +0,1 @@

import { base58 } from '@metaplex-foundation/umi-serializers';
// src/params-patcher.ts

@@ -34,59 +32,302 @@ function visitNode(value, keyPath, onIntegerOverflow) {

// src/response-patcher-allowed-numeric-values.ts
var memoizedKeypaths;
function getAllowedNumericKeypaths() {
if (!memoizedKeypaths) {
const jsonParsedTokenAccountsConfigs = [
// parsed Token/Token22 token account
["data", "parsed", "info", "tokenAmount", "decimals"],
["data", "parsed", "info", "tokenAmount", "uiAmount"],
["data", "parsed", "info", "rentExemptReserve", "decimals"],
["data", "parsed", "info", "rentExemptReserve", "uiAmount"],
["data", "parsed", "info", "delegatedAmount", "decimals"],
["data", "parsed", "info", "delegatedAmount", "uiAmount"],
[
"data",
"parsed",
"info",
"extensions",
KEYPATH_WILDCARD,
"state",
"olderTransferFee",
"transferFeeBasisPoints"
var jsonParsedTokenAccountsConfigs = [
// parsed Token/Token22 token account
["data", "parsed", "info", "tokenAmount", "decimals"],
["data", "parsed", "info", "tokenAmount", "uiAmount"],
["data", "parsed", "info", "rentExemptReserve", "decimals"],
["data", "parsed", "info", "rentExemptReserve", "uiAmount"],
["data", "parsed", "info", "delegatedAmount", "decimals"],
["data", "parsed", "info", "delegatedAmount", "uiAmount"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "olderTransferFee", "transferFeeBasisPoints"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "newerTransferFee", "transferFeeBasisPoints"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "preUpdateAverageRate"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "currentRate"]
];
var jsonParsedAccountsConfigs = [
...jsonParsedTokenAccountsConfigs,
// parsed AddressTableLookup account
["data", "parsed", "info", "lastExtendedSlotStartIndex"],
// parsed Config account
["data", "parsed", "info", "slashPenalty"],
["data", "parsed", "info", "warmupCooldownRate"],
// parsed Token/Token22 mint account
["data", "parsed", "info", "decimals"],
// parsed Token/Token22 multisig account
["data", "parsed", "info", "numRequiredSigners"],
["data", "parsed", "info", "numValidSigners"],
// parsed Stake account
["data", "parsed", "info", "stake", "delegation", "warmupCooldownRate"],
// parsed Sysvar rent account
["data", "parsed", "info", "exemptionThreshold"],
["data", "parsed", "info", "burnPercent"],
// parsed Vote account
["data", "parsed", "info", "commission"],
["data", "parsed", "info", "votes", KEYPATH_WILDCARD, "confirmationCount"]
];
var memoizedNotificationKeypaths;
var memoizedResponseKeypaths;
function getAllowedNumericKeypathsForNotification() {
if (!memoizedNotificationKeypaths) {
memoizedNotificationKeypaths = {
accountNotifications: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
blockNotifications: [
["value", "block", "blockTime"],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"accountIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"accountIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["value", "block", "transactions", KEYPATH_WILDCARD, "meta", "rewards", KEYPATH_WILDCARD, "commission"],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"index"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"writableIndexes",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"readonlyIndexes",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numReadonlySignedAccounts"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numReadonlyUnsignedAccounts"
],
[
"value",
"block",
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"header",
"numRequiredSignatures"
],
["value", "block", "rewards", KEYPATH_WILDCARD, "commission"]
],
[
"data",
"parsed",
"info",
"extensions",
KEYPATH_WILDCARD,
"state",
"newerTransferFee",
"transferFeeBasisPoints"
programNotifications: jsonParsedAccountsConfigs.flatMap((c) => [
["value", KEYPATH_WILDCARD, "account", ...c],
[KEYPATH_WILDCARD, "account", ...c]
])
};
}
return memoizedNotificationKeypaths;
}
function getAllowedNumericKeypathsForResponse() {
if (!memoizedResponseKeypaths) {
memoizedResponseKeypaths = {
getAccountInfo: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
getBlock: [
["blockTime"],
["transactions", KEYPATH_WILDCARD, "meta", "preTokenBalances", KEYPATH_WILDCARD, "accountIndex"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"preTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["transactions", KEYPATH_WILDCARD, "meta", "postTokenBalances", KEYPATH_WILDCARD, "accountIndex"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"postTokenBalances",
KEYPATH_WILDCARD,
"uiTokenAmount",
"decimals"
],
["transactions", KEYPATH_WILDCARD, "meta", "rewards", KEYPATH_WILDCARD, "commission"],
["transactions", KEYPATH_WILDCARD, "meta", "innerInstructions", KEYPATH_WILDCARD, "index"],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"transactions",
KEYPATH_WILDCARD,
"meta",
"innerInstructions",
KEYPATH_WILDCARD,
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"writableIndexes",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"addressTableLookups",
KEYPATH_WILDCARD,
"readonlyIndexes",
KEYPATH_WILDCARD
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"programIdIndex"
],
[
"transactions",
KEYPATH_WILDCARD,
"transaction",
"message",
"instructions",
KEYPATH_WILDCARD,
"accounts",
KEYPATH_WILDCARD
],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numReadonlySignedAccounts"],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numReadonlyUnsignedAccounts"],
["transactions", KEYPATH_WILDCARD, "transaction", "message", "header", "numRequiredSignatures"],
["rewards", KEYPATH_WILDCARD, "commission"]
],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "preUpdateAverageRate"],
["data", "parsed", "info", "extensions", KEYPATH_WILDCARD, "state", "currentRate"]
];
const jsonParsedAccountsConfigs = [
...jsonParsedTokenAccountsConfigs,
// parsed AddressTableLookup account
["data", "parsed", "info", "lastExtendedSlotStartIndex"],
// parsed Config account
["data", "parsed", "info", "slashPenalty"],
["data", "parsed", "info", "warmupCooldownRate"],
// parsed Token/Token22 mint account
["data", "parsed", "info", "decimals"],
// parsed Token/Token22 multisig account
["data", "parsed", "info", "numRequiredSigners"],
["data", "parsed", "info", "numValidSigners"],
// parsed Stake account
["data", "parsed", "info", "stake", "delegation", "warmupCooldownRate"],
// parsed Sysvar rent account
["data", "parsed", "info", "exemptionThreshold"],
["data", "parsed", "info", "burnPercent"],
// parsed Vote account
["data", "parsed", "info", "commission"],
["data", "parsed", "info", "votes", KEYPATH_WILDCARD, "confirmationCount"]
];
memoizedKeypaths = {
getAccountInfo: jsonParsedAccountsConfigs.map((c) => ["value", ...c]),
getBlockTime: [[]],

@@ -177,3 +418,3 @@ getClusterNodes: [

}
return memoizedKeypaths;
return memoizedResponseKeypaths;
}

@@ -208,5 +449,9 @@

function patchResponseForSolanaLabsRpc(rawResponse, methodName) {
const allowedKeypaths = methodName ? getAllowedNumericKeypaths()[methodName] : void 0;
const allowedKeypaths = methodName ? getAllowedNumericKeypathsForResponse()[methodName] : void 0;
return visitNode2(rawResponse, allowedKeypaths ?? []);
}
function patchResponseForSolanaLabsRpcSubscriptions(rawResponse, methodName) {
const allowedKeypaths = methodName ? getAllowedNumericKeypathsForNotification()[methodName] : void 0;
return visitNode2(rawResponse, allowedKeypaths ?? []);
}

@@ -241,48 +486,36 @@ // src/rpc-methods/index.ts

// src/stringified-bigint.ts
function assertIsStringifiedBigInt(putativeBigInt) {
try {
BigInt(putativeBigInt);
} catch (e) {
throw new Error(`\`${putativeBigInt}\` cannot be parsed as a BigInt`, {
cause: e
});
}
}
function assertIsTransactionSignature(putativeTransactionSignature) {
try {
if (
// Lowest value (64 bytes of zeroes)
putativeTransactionSignature.length < 64 || // Highest value (64 bytes of 255)
putativeTransactionSignature.length > 88
) {
throw new Error("Expected input string to decode to a byte array of length 64.");
// src/rpc-subscriptions/index.ts
function createSolanaRpcSubscriptionsApi(config) {
return new Proxy({}, {
defineProperty() {
return false;
},
deleteProperty() {
return false;
},
get(...args) {
const [_, p] = args;
const notificationName = p.toString();
return function(...rawParams) {
const handleIntegerOverflow = config?.onIntegerOverflow;
const params = patchParamsForSolanaLabsRpc(
rawParams,
handleIntegerOverflow ? (keyPath, value) => handleIntegerOverflow(notificationName, keyPath, value) : void 0
);
return {
params,
responseProcessor: (rawResponse) => patchResponseForSolanaLabsRpcSubscriptions(rawResponse, notificationName),
subscribeMethodName: notificationName.replace(/Notifications$/, "Subscribe"),
unsubscribeMethodName: notificationName.replace(/Notifications$/, "Unsubscribe")
};
};
}
const bytes = base58.serialize(putativeTransactionSignature);
const numBytes = bytes.byteLength;
if (numBytes !== 64) {
throw new Error(`Expected input string to decode to a byte array of length 64. Actual length: ${numBytes}`);
}
} catch (e) {
throw new Error(`\`${putativeTransactionSignature}\` is not a transaction signature`, {
cause: e
});
}
});
}
// src/unix-timestamp.ts
function assertIsUnixTimestamp(putativeTimestamp) {
try {
if (putativeTimestamp > 864e13 || putativeTimestamp < -864e13) {
throw new Error("Expected input number to be in the range [-8.64e15, 8.64e15]");
}
} catch (e) {
throw new Error(`\`${putativeTimestamp}\` is not a timestamp`, {
cause: e
});
}
function createSolanaRpcSubscriptionsApi_UNSTABLE(config) {
return createSolanaRpcSubscriptionsApi(config);
}
export { assertIsStringifiedBigInt, assertIsTransactionSignature, assertIsUnixTimestamp, createSolanaRpcApi };
export { createSolanaRpcApi, createSolanaRpcSubscriptionsApi, createSolanaRpcSubscriptionsApi_UNSTABLE };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.node.js.map
export * from './rpc-methods';
export * from './stringified-bigint';
export * from './transaction-signature';
export * from './unix-timestamp';
export * from './rpc-subscriptions';
//# sourceMappingURL=index.d.ts.map

@@ -0,4 +1,6 @@

import { IRpcSubscriptionsApi } from '@solana/rpc-transport/dist/types/json-rpc-types';
import { KeyPath } from './response-patcher';
import { createSolanaRpcApi } from './rpc-methods';
type AllowedNumericKeypaths = Partial<Record<keyof ReturnType<typeof createSolanaRpcApi>, readonly KeyPath[]>>;
import { SolanaRpcSubscriptions, SolanaRpcSubscriptionsUnstable } from './rpc-subscriptions';
type AllowedNumericKeypaths<TApi> = Partial<Record<keyof TApi, readonly KeyPath[]>>;
/**

@@ -8,4 +10,9 @@ * These are keypaths at the end of which you will find a numeric value that should *not* be upcast

*/
export declare function getAllowedNumericKeypaths(): AllowedNumericKeypaths;
export declare function getAllowedNumericKeypathsForNotification(): AllowedNumericKeypaths<IRpcSubscriptionsApi<SolanaRpcSubscriptions & SolanaRpcSubscriptionsUnstable>>;
/**
* These are keypaths at the end of which you will find a numeric value that should *not* be upcast
* to a `bigint`. These are values that are legitimately defined as `u8` or `usize` on the backend.
*/
export declare function getAllowedNumericKeypathsForResponse(): AllowedNumericKeypaths<ReturnType<typeof createSolanaRpcApi>>;
export {};
//# sourceMappingURL=response-patcher-allowed-numeric-values.d.ts.map
import { KeyPathWildcard } from './response-patcher-types';
import { createSolanaRpcApi } from './rpc-methods';
import { createSolanaRpcSubscriptionsApi } from './rpc-subscriptions';
export type KeyPath = ReadonlyArray<KeyPathWildcard | number | string | KeyPath>;
export declare function patchResponseForSolanaLabsRpc<T>(rawResponse: unknown, methodName?: keyof ReturnType<typeof createSolanaRpcApi>): T;
export declare function patchResponseForSolanaLabsRpcSubscriptions<T>(rawResponse: unknown, methodName?: keyof ReturnType<typeof createSolanaRpcSubscriptionsApi>): T;
//# sourceMappingURL=response-patcher.d.ts.map

@@ -1,5 +0,3 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { StringifiedBigInt } from '../stringified-bigint';
import { StringifiedNumber } from '../stringified-number';
export type Commitment = 'confirmed' | 'finalized' | 'processed';
import { Address } from '@solana/addresses';
import { LamportsUnsafeBeyond2Pow53Minus1, StringifiedBigInt, StringifiedNumber } from '@solana/rpc-types';
export type DataSlice = Readonly<{

@@ -9,5 +7,2 @@ offset: number;

}>;
export type LamportsUnsafeBeyond2Pow53Minus1 = bigint & {
readonly __brand: unique symbol;
};
export type MicroLamportsUnsafeBeyond2Pow53Minus1 = bigint & {

@@ -18,2 +13,3 @@ readonly __brand: unique symbol;

export type U64UnsafeBeyond2Pow53Minus1 = bigint;
export type SignedLamportsAsI64Unsafe = bigint;
export type F64UnsafeSeeDocumentation = number;

@@ -38,5 +34,2 @@ export type RpcResponse<TValue> = Readonly<{

export type Base64EncodedZStdCompressedDataResponse = [Base64EncodedZStdCompressedBytes, 'base64+zstd'];
export type Base58EncodedTransactionSignature = string & {
readonly __brand: unique symbol;
};
export type AccountInfoBase = Readonly<{

@@ -48,3 +41,3 @@ /** indicates if the account contains a program (and is strictly read-only) */

/** pubkey of the program this account has been assigned to */
owner: Base58EncodedAddress;
owner: Address;
/** the epoch at which this account will next owe rent */

@@ -76,3 +69,3 @@ rentEpoch: U64UnsafeBeyond2Pow53Minus1;

account: TAccount;
pubkey: Base58EncodedAddress;
pubkey: Address;
}>;

@@ -85,8 +78,19 @@ export type TokenAmount = Readonly<{

}>;
export type TokenBalance = Readonly<{
/** Index of the account in which the token balance is provided for. */
accountIndex: number;
/** Pubkey of the token's mint. */
mint: Address;
/** Pubkey of token balance's owner. */
owner?: Address;
/** Pubkey of the Token program that owns the account. */
programId?: Address;
uiTokenAmount: TokenAmount;
}>;
type TokenAccountState = 'initialized' | 'uninitialized' | 'frozen';
export type TokenAccount = Readonly<{
mint: Base58EncodedAddress;
owner: Base58EncodedAddress;
mint: Address;
owner: Address;
tokenAmount: TokenAmount;
delegate?: Base58EncodedAddress;
delegate?: Address;
state: TokenAccountState;

@@ -96,6 +100,14 @@ isNative: boolean;

delegatedAmount?: TokenAmount;
closeAuthority?: Base58EncodedAddress;
closeAuthority?: Address;
extensions?: unknown[];
}>;
export type GetProgramAccountsMemcmpFilter = Readonly<{
offset: U64UnsafeBeyond2Pow53Minus1;
bytes: string;
encoding: 'base58' | 'base64';
}>;
export type GetProgramAccountsDatasizeFilter = Readonly<{
dataSize: U64UnsafeBeyond2Pow53Minus1;
}>;
export {};
//# sourceMappingURL=common.d.ts.map

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, Commitment, DataSlice, RpcResponse, Slot } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, DataSlice, RpcResponse, Slot } from './common';
type GetAccountInfoApiResponseBase = RpcResponse<AccountInfoBase | null>;

@@ -18,17 +19,17 @@ type NestInRpcResponseOrNull<T> = Readonly<{

*/
getAccountInfo(address: Base58EncodedAddress, config: GetAccountInfoApiCommonConfig & GetAccountInfoApiSliceableCommonConfig & Readonly<{
getAccountInfo(address: Address, config: GetAccountInfoApiCommonConfig & GetAccountInfoApiSliceableCommonConfig & Readonly<{
encoding: 'base64';
}>): GetAccountInfoApiResponseBase & NestInRpcResponseOrNull<AccountInfoWithBase64EncodedData>;
getAccountInfo(address: Base58EncodedAddress, config: GetAccountInfoApiCommonConfig & GetAccountInfoApiSliceableCommonConfig & Readonly<{
getAccountInfo(address: Address, config: GetAccountInfoApiCommonConfig & GetAccountInfoApiSliceableCommonConfig & Readonly<{
encoding: 'base64+zstd';
}>): GetAccountInfoApiResponseBase & NestInRpcResponseOrNull<AccountInfoWithBase64EncodedZStdCompressedData>;
getAccountInfo(address: Base58EncodedAddress, config: GetAccountInfoApiCommonConfig & Readonly<{
getAccountInfo(address: Address, config: GetAccountInfoApiCommonConfig & Readonly<{
encoding: 'jsonParsed';
}>): GetAccountInfoApiResponseBase & NestInRpcResponseOrNull<AccountInfoWithJsonData>;
getAccountInfo(address: Base58EncodedAddress, config: GetAccountInfoApiCommonConfig & GetAccountInfoApiSliceableCommonConfig & Readonly<{
getAccountInfo(address: Address, config: GetAccountInfoApiCommonConfig & GetAccountInfoApiSliceableCommonConfig & Readonly<{
encoding: 'base58';
}>): GetAccountInfoApiResponseBase & NestInRpcResponseOrNull<AccountInfoWithBase58EncodedData>;
getAccountInfo(address: Base58EncodedAddress, config?: GetAccountInfoApiCommonConfig): GetAccountInfoApiResponseBase & NestInRpcResponseOrNull<AccountInfoWithBase58Bytes>;
getAccountInfo(address: Address, config?: GetAccountInfoApiCommonConfig): GetAccountInfoApiResponseBase & NestInRpcResponseOrNull<AccountInfoWithBase58Bytes>;
}
export {};
//# sourceMappingURL=getAccountInfo.d.ts.map

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1, RpcResponse, Slot } from './common';
import { Address } from '@solana/addresses';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
import { RpcResponse, Slot } from './common';
type GetBalanceApiResponse = RpcResponse<LamportsUnsafeBeyond2Pow53Minus1>;

@@ -8,3 +9,3 @@ export interface GetBalanceApi {

*/
getBalance(address: Base58EncodedAddress, config?: Readonly<{
getBalance(address: Address, config?: Readonly<{
commitment?: Commitment;

@@ -11,0 +12,0 @@ minContextSlot?: Slot;

@@ -1,2 +0,3 @@

import { LamportsUnsafeBeyond2Pow53Minus1, Slot } from './common';
import { LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
import { Slot } from './common';
type GetBlockCommitmentApiResponse = Readonly<{

@@ -3,0 +4,0 @@ commitment: LamportsUnsafeBeyond2Pow53Minus1[] | null;

@@ -1,2 +0,3 @@

import { Commitment, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Commitment } from '@solana/rpc-types';
import { Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type GetBlockHeightApiResponse = U64UnsafeBeyond2Pow53Minus1;

@@ -3,0 +4,0 @@ export interface GetBlockHeightApi {

@@ -1,8 +0,9 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, RpcResponse, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type NumberOfLeaderSlots = U64UnsafeBeyond2Pow53Minus1;
type NumberOfBlocksProduced = U64UnsafeBeyond2Pow53Minus1;
type SlotRange = Readonly<{
firstSlot: U64UnsafeBeyond2Pow53Minus1;
lastSlot: U64UnsafeBeyond2Pow53Minus1;
firstSlot: Slot;
lastSlot: Slot;
}>;

@@ -18,3 +19,3 @@ type GetBlockProductionApiConfigBase = Readonly<{

value: Readonly<{
byIdentity: Record<Base58EncodedAddress, [NumberOfLeaderSlots, NumberOfBlocksProduced]>;
byIdentity: Record<Address, [NumberOfLeaderSlots, NumberOfBlocksProduced]>;
}>;

@@ -33,3 +34,3 @@ }>;

*/
getBlockProduction<TIdentity extends Base58EncodedAddress>(config: GetBlockProductionApiConfigBase & Readonly<{
getBlockProduction<TIdentity extends Address>(config: GetBlockProductionApiConfigBase & Readonly<{
identity: TIdentity;

@@ -36,0 +37,0 @@ }>): GetBlockProductionApiResponseBase & GetBlockProductionApiResponseWithSingleIdentity<TIdentity>;

@@ -1,2 +0,3 @@

import { Commitment, Slot } from './common';
import { Commitment } from '@solana/rpc-types';
import { Slot } from './common';
type GetBlocksApiResponse = Slot[];

@@ -3,0 +4,0 @@ export interface GetBlocksApi {

@@ -1,2 +0,3 @@

import { Commitment, Slot } from './common';
import { Commitment } from '@solana/rpc-types';
import { Slot } from './common';
type GetBlocksWithLimitApiResponse = Slot[];

@@ -3,0 +4,0 @@ export interface GetBlocksWithLimitApi {

@@ -1,2 +0,2 @@

import { UnixTimestamp } from '../unix-timestamp';
import { UnixTimestamp } from '@solana/rpc-types';
import { Slot } from './common';

@@ -3,0 +3,0 @@ /** Estimated production time, as Unix timestamp (seconds since the Unix epoch) */

@@ -1,2 +0,2 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Address } from '@solana/addresses';
type GetClusterNodesNode = Readonly<{

@@ -8,3 +8,3 @@ /** The unique identifier of the node's feature set */

/** Node public key, as base-58 encoded string */
pubkey: Base58EncodedAddress;
pubkey: Address;
/**

@@ -11,0 +11,0 @@ * JSON RPC network address for the node,

@@ -1,2 +0,3 @@

import { Commitment, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Commitment } from '@solana/rpc-types';
import { Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type GetEpochInfoApiResponse = Readonly<{

@@ -3,0 +4,0 @@ /** the current slot */

@@ -1,2 +0,4 @@

import { Base64EncodedBytes, Commitment, RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Commitment } from '@solana/rpc-types';
import { SerializedMessageBytesBase64 } from '@solana/transactions';
import { RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
/** Fee corresponding to the message at the specified blockhash */

@@ -8,5 +10,3 @@ type GetFeeForMessageApiResponse = RpcResponse<U64UnsafeBeyond2Pow53Minus1 | null>;

*/
getFeeForMessage(
/** Base-64 encoded message */
message: Base64EncodedBytes, config?: Readonly<{
getFeeForMessage(message: SerializedMessageBytesBase64, config?: Readonly<{
commitment?: Commitment;

@@ -13,0 +13,0 @@ minContextSlot?: Slot;

@@ -1,4 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Address } from '@solana/addresses';
type GetIdentityApiResponse = Readonly<{
identity: Base58EncodedAddress;
identity: Address;
}>;

@@ -5,0 +5,0 @@ export interface GetIdentityApi {

@@ -1,2 +0,3 @@

import { Commitment, F64UnsafeSeeDocumentation } from './common';
import { Commitment } from '@solana/rpc-types';
import { F64UnsafeSeeDocumentation } from './common';
type GetInflationGovernorApiResponse = Readonly<{

@@ -3,0 +4,0 @@ /** The initial inflation percentage from time 0 */

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Address } from '@solana/addresses';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
import { Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type GetInflationRewardApiResponse = Readonly<{

@@ -14,3 +15,3 @@ amount: LamportsUnsafeBeyond2Pow53Minus1;

*/
getInflationReward(addresses: Base58EncodedAddress[], config?: Readonly<{
getInflationReward(addresses: Address[], config?: Readonly<{
commitment?: Commitment;

@@ -17,0 +18,0 @@ epoch?: U64UnsafeBeyond2Pow53Minus1;

@@ -1,6 +0,7 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1, RpcResponse } from './common';
import { Address } from '@solana/addresses';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
import { RpcResponse } from './common';
type GetLargestAccountsResponseItem = Readonly<{
/** Base-58 encoded address of the account */
address: Base58EncodedAddress;
address: Address;
/** Number of lamports in the account */

@@ -7,0 +8,0 @@ lamports: LamportsUnsafeBeyond2Pow53Minus1;

@@ -0,3 +1,4 @@

import { Commitment } from '@solana/rpc-types';
import { Blockhash } from '@solana/transactions';
import { Commitment, RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type GetLatestBlockhashApiResponse = RpcResponse<{

@@ -4,0 +5,0 @@ /** a Hash as base-58 encoded string */

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, Slot } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { Slot } from './common';
/**

@@ -20,3 +21,3 @@ * This return type is a dictionary of validator identities, as base-58 encoded

type GetLeaderScheduleApiResponseBase = Readonly<{
[key: Base58EncodedAddress]: Slot[];
[key: Address]: Slot[];
}>;

@@ -35,3 +36,3 @@ export interface GetLeaderScheduleApi {

/** Only return results for this validator identity (base58 encoded address) */
identity?: Base58EncodedAddress;
identity?: Address;
}>): GetLeaderScheduleApiResponseBase | null;

@@ -41,3 +42,3 @@ getLeaderSchedule(config?: Readonly<{

/** Only return results for this validator identity (base58 encoded address) */
identity?: Base58EncodedAddress;
identity?: Address;
}>): GetLeaderScheduleApiResponseBase;

@@ -44,0 +45,0 @@ }

@@ -1,2 +0,3 @@

import { Commitment, LamportsUnsafeBeyond2Pow53Minus1, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
import { U64UnsafeBeyond2Pow53Minus1 } from './common';
type GetMinimumBalanceForRentExemptionApiResponse = LamportsUnsafeBeyond2Pow53Minus1;

@@ -3,0 +4,0 @@ export interface GetMinimumBalanceForRentExemptionApi {

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { AccountInfoBase, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, Commitment, DataSlice, RpcResponse, Slot } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { AccountInfoBase, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, DataSlice, RpcResponse, Slot } from './common';
type GetMultipleAccountsApiResponseBase = AccountInfoBase | null;

@@ -20,3 +21,3 @@ type GetMultipleAccountsApiCommonConfig = Readonly<{

/** An array of up to 100 Pubkeys to query */
addresses: Base58EncodedAddress[], config: GetMultipleAccountsApiCommonConfig & GetMultipleAccountsApiSliceableCommonConfig & Readonly<{
addresses: Address[], config: GetMultipleAccountsApiCommonConfig & GetMultipleAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base64';

@@ -26,3 +27,3 @@ }>): RpcResponse<(GetMultipleAccountsApiResponseBase & (AccountInfoWithBase64EncodedData | null))[]>;

/** An array of up to 100 Pubkeys to query */
addresses: Base58EncodedAddress[], config: GetMultipleAccountsApiCommonConfig & GetMultipleAccountsApiSliceableCommonConfig & Readonly<{
addresses: Address[], config: GetMultipleAccountsApiCommonConfig & GetMultipleAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base64+zstd';

@@ -32,3 +33,3 @@ }>): RpcResponse<(GetMultipleAccountsApiResponseBase & (AccountInfoWithBase64EncodedZStdCompressedData | null))[]>;

/** An array of up to 100 Pubkeys to query */
addresses: Base58EncodedAddress[], config: GetMultipleAccountsApiCommonConfig & Readonly<{
addresses: Address[], config: GetMultipleAccountsApiCommonConfig & Readonly<{
encoding: 'jsonParsed';

@@ -38,3 +39,3 @@ }>): RpcResponse<(GetMultipleAccountsApiResponseBase & (AccountInfoWithJsonData | null))[]>;

/** An array of up to 100 Pubkeys to query */
addresses: Base58EncodedAddress[], config: GetMultipleAccountsApiCommonConfig & GetMultipleAccountsApiSliceableCommonConfig & Readonly<{
addresses: Address[], config: GetMultipleAccountsApiCommonConfig & GetMultipleAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base58';

@@ -44,5 +45,5 @@ }>): RpcResponse<(GetMultipleAccountsApiResponseBase & (AccountInfoWithBase58EncodedData | null))[]>;

/** An array of up to 100 Pubkeys to query */
addresses: Base58EncodedAddress[], config?: GetMultipleAccountsApiCommonConfig): RpcResponse<(GetMultipleAccountsApiResponseBase & (AccountInfoWithBase64EncodedData | null))[]>;
addresses: Address[], config?: GetMultipleAccountsApiCommonConfig): RpcResponse<(GetMultipleAccountsApiResponseBase & (AccountInfoWithBase64EncodedData | null))[]>;
}
export {};
//# sourceMappingURL=getMultipleAccounts.d.ts.map

@@ -1,11 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, AccountInfoWithPubkey, Commitment, DataSlice, RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type GetProgramAccountsMemcmpFilter = Readonly<{
offset: U64UnsafeBeyond2Pow53Minus1;
bytes: string;
encoding: 'base58' | 'base64';
}>;
type GetProgramAccountsDatasizeFilter = Readonly<{
dataSize: U64UnsafeBeyond2Pow53Minus1;
}>;
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, AccountInfoWithPubkey, DataSlice, GetProgramAccountsDatasizeFilter, GetProgramAccountsMemcmpFilter, RpcResponse, Slot } from './common';
type GetProgramAccountsApiCommonConfig = Readonly<{

@@ -27,38 +20,38 @@ /** @defaultValue "finalized" */

*/
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base64';
withContext: true;
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedData>[]>;
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base64';
withContext?: boolean;
}>): AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedData>[];
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base64+zstd';
withContext: true;
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>[]>;
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base64+zstd';
withContext?: boolean;
}>): AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>[];
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & Readonly<{
encoding: 'jsonParsed';
withContext: true;
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithJsonData>[]>;
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & Readonly<{
encoding: 'jsonParsed';
withContext?: boolean;
}>): AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithJsonData>[];
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base58';
withContext: true;
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58EncodedData>[]>;
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
encoding: 'base58';
withContext?: boolean;
}>): AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58EncodedData>[];
getProgramAccounts(program: Base58EncodedAddress, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
getProgramAccounts(program: Address, config: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
withContext: true;
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58Bytes>[]>;
getProgramAccounts(program: Base58EncodedAddress, config?: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
getProgramAccounts(program: Address, config?: GetProgramAccountsApiCommonConfig & GetProgramAccountsApiSliceableCommonConfig & Readonly<{
withContext?: boolean;

@@ -65,0 +58,0 @@ }>): AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58Bytes>[];

@@ -1,2 +0,2 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Address } from '@solana/addresses';
import { MicroLamportsUnsafeBeyond2Pow53Minus1, Slot } from './common';

@@ -26,5 +26,5 @@ type GetRecentPrioritizationFeesApiResponse = Readonly<{

*/
addresses?: Base58EncodedAddress[]): GetRecentPrioritizationFeesApiResponse;
addresses?: Address[]): GetRecentPrioritizationFeesApiResponse;
}
export {};
//# sourceMappingURL=getRecentPrioritizationFees.d.ts.map

@@ -1,9 +0,9 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Address } from '@solana/addresses';
import { Signature } from '@solana/keys';
import { Commitment, UnixTimestamp } from '@solana/rpc-types';
import { TransactionError } from '../transaction-error';
import { TransactionSignature } from '../transaction-signature';
import { UnixTimestamp } from '../unix-timestamp';
import { Commitment, RpcResponse, Slot } from './common';
type GetSignaturesForAddressTransaction = RpcResponse<{
import { Slot } from './common';
type GetSignaturesForAddressTransaction = Readonly<{
/** transaction signature as base-58 encoded string */
signature: TransactionSignature;
signature: Signature;
/** The slot that contains the block with the transaction */

@@ -29,5 +29,5 @@ slot: Slot;

/** start searching backwards from this transaction signature. If not provided the search starts from the top of the highest max confirmed block. */
before?: TransactionSignature;
before?: Signature;
/** search until this transaction signature, if found before limit reached */
until?: TransactionSignature;
until?: Signature;
}>;

@@ -39,5 +39,5 @@ export interface GetSignaturesForAddressApi {

*/
getSignaturesForAddress(address: Base58EncodedAddress, config?: GetSignaturesForAddressConfig): GetSignaturesForAddressApiResponse;
getSignaturesForAddress(address: Address, config?: GetSignaturesForAddressConfig): GetSignaturesForAddressApiResponse;
}
export {};
//# sourceMappingURL=getSignaturesForAddress.d.ts.map

@@ -0,4 +1,5 @@

import { Signature } from '@solana/keys';
import { Commitment } from '@solana/rpc-types';
import { TransactionError } from '../transaction-error';
import { TransactionSignature } from '../transaction-signature';
import { Commitment, RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
/** @deprecated */

@@ -12,3 +13,3 @@ type TransactionStatusOk = Readonly<{

}>;
type GetSignatureStatusesBase = Readonly<{
type SignatureStatusResult = Readonly<{
/**

@@ -32,3 +33,4 @@ * Number of blocks since signature confirmation, null if rooted,

status: TransactionStatusOk | TransactionStatusErr;
}> | null;
}>;
type GetSignatureStatusesBase = ReadonlyArray<SignatureStatusResult | null>;
type GetSignatureStatusesApiResponse = RpcResponse<GetSignatureStatusesBase>;

@@ -50,3 +52,3 @@ export interface GetSignatureStatusesApi {

*/
signatures: TransactionSignature[], config?: Readonly<{
signatures: Signature[], config?: Readonly<{
/**

@@ -53,0 +55,0 @@ * if `true` - a Solana node will search its ledger cache for any

@@ -1,2 +0,3 @@

import { Commitment, Slot } from './common';
import { Commitment } from '@solana/rpc-types';
import { Slot } from './common';
type GetSlotApiResponse = Slot;

@@ -3,0 +4,0 @@ export interface GetSlotApi {

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, Slot } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { Slot } from './common';
export interface GetSlotLeaderApi {

@@ -10,4 +11,4 @@ /**

minContextSlot?: Slot;
}>): Base58EncodedAddress;
}>): Address;
}
//# sourceMappingURL=getSlotLeader.d.ts.map

@@ -1,5 +0,5 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Address } from '@solana/addresses';
import { Slot } from './common';
/** array of Node identity public keys as base-58 encoded strings */
type GetSlotLeadersApiResponse = Base58EncodedAddress[];
type GetSlotLeadersApiResponse = Address[];
export interface GetSlotLeadersApi {

@@ -6,0 +6,0 @@ /**

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type GetStakeActivationApiResponse = Readonly<{

@@ -15,3 +16,3 @@ /** Stake active during the epoch */

*/
getStakeActivation(address: Base58EncodedAddress, config?: Readonly<{
getStakeActivation(address: Address, config?: Readonly<{
commitment?: Commitment;

@@ -18,0 +19,0 @@ minContextSlot?: Slot;

@@ -1,2 +0,3 @@

import { Commitment, LamportsUnsafeBeyond2Pow53Minus1, RpcResponse } from './common';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
import { RpcResponse } from './common';
type GetStakeMinimumDelegationApiResponse = RpcResponse<LamportsUnsafeBeyond2Pow53Minus1>;

@@ -3,0 +4,0 @@ export interface GetStakeMinimumDelegationApi {

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1, RpcResponse } from './common';
import { Address } from '@solana/addresses';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
import { RpcResponse } from './common';
type GetSupplyConfig = Readonly<{

@@ -18,3 +19,3 @@ commitment?: Commitment;

/** an array of account addresses of non-circulating accounts */
nonCirculatingAccounts: [Base58EncodedAddress];
nonCirculatingAccounts: [Address];
}>;

@@ -21,0 +22,0 @@ }>;

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, RpcResponse, TokenAmount } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { RpcResponse, TokenAmount } from './common';
type GetTokenAccountBalanceApiResponse = RpcResponse<TokenAmount>;

@@ -10,3 +11,3 @@ export interface GetTokenAccountBalanceApi {

/** Pubkey of Token account to query, as base-58 encoded string */
address: Base58EncodedAddress, config?: Readonly<{
address: Address, config?: Readonly<{
commitment?: Commitment;

@@ -13,0 +14,0 @@ }>): GetTokenAccountBalanceApiResponse;

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithPubkey, Commitment, DataSlice, RpcResponse, Slot, TokenAccount, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithPubkey, DataSlice, RpcResponse, Slot, TokenAccount, U64UnsafeBeyond2Pow53Minus1 } from './common';
type TokenAccountInfoWithJsonData = Readonly<{

@@ -16,7 +17,7 @@ data: Readonly<{

/** Pubkey of the specific token Mint to limit accounts to */
mint: Base58EncodedAddress;
mint: Address;
}>;
type ProgramIdFilter = Readonly<{
/** Pubkey of the Token program that owns the accounts */
programId: Base58EncodedAddress;
programId: Address;
}>;

@@ -38,17 +39,17 @@ type AccountsFilter = MintFilter | ProgramIdFilter;

*/
getTokenAccountsByDelegate(program: Base58EncodedAddress, filter: AccountsFilter, config: GetTokenAccountsByDelegateApiCommonConfig & GetTokenAccountsByDelegateApiSliceableCommonConfig & Readonly<{
getTokenAccountsByDelegate(program: Address, filter: AccountsFilter, config: GetTokenAccountsByDelegateApiCommonConfig & GetTokenAccountsByDelegateApiSliceableCommonConfig & Readonly<{
encoding: 'base64';
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedData>[]>;
getTokenAccountsByDelegate(program: Base58EncodedAddress, filter: AccountsFilter, config: GetTokenAccountsByDelegateApiCommonConfig & GetTokenAccountsByDelegateApiSliceableCommonConfig & Readonly<{
getTokenAccountsByDelegate(program: Address, filter: AccountsFilter, config: GetTokenAccountsByDelegateApiCommonConfig & GetTokenAccountsByDelegateApiSliceableCommonConfig & Readonly<{
encoding: 'base64+zstd';
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>[]>;
getTokenAccountsByDelegate(program: Base58EncodedAddress, filter: AccountsFilter, config: GetTokenAccountsByDelegateApiCommonConfig & Readonly<{
getTokenAccountsByDelegate(program: Address, filter: AccountsFilter, config: GetTokenAccountsByDelegateApiCommonConfig & Readonly<{
encoding: 'jsonParsed';
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & TokenAccountInfoWithJsonData>[]>;
getTokenAccountsByDelegate(program: Base58EncodedAddress, filter: AccountsFilter, config: GetTokenAccountsByDelegateApiCommonConfig & GetTokenAccountsByDelegateApiSliceableCommonConfig & Readonly<{
getTokenAccountsByDelegate(program: Address, filter: AccountsFilter, config: GetTokenAccountsByDelegateApiCommonConfig & GetTokenAccountsByDelegateApiSliceableCommonConfig & Readonly<{
encoding: 'base58';
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58EncodedData>[]>;
getTokenAccountsByDelegate(program: Base58EncodedAddress, filter: AccountsFilter, config?: GetTokenAccountsByDelegateApiCommonConfig & GetTokenAccountsByDelegateApiSliceableCommonConfig): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58Bytes>[]>;
getTokenAccountsByDelegate(program: Address, filter: AccountsFilter, config?: GetTokenAccountsByDelegateApiCommonConfig & GetTokenAccountsByDelegateApiSliceableCommonConfig): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58Bytes>[]>;
}
export {};
//# sourceMappingURL=getTokenAccountsByDelegate.d.ts.map

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithPubkey, Commitment, DataSlice, RpcResponse, Slot, TokenAccount, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { AccountInfoBase, AccountInfoWithBase58Bytes, AccountInfoWithBase58EncodedData, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithPubkey, DataSlice, RpcResponse, Slot, TokenAccount, U64UnsafeBeyond2Pow53Minus1 } from './common';
type TokenAccountInfoWithJsonData = Readonly<{

@@ -16,7 +17,7 @@ data: Readonly<{

/** Pubkey of the specific token Mint to limit accounts to */
mint: Base58EncodedAddress;
mint: Address;
}>;
type ProgramIdFilter = Readonly<{
/** Pubkey of the Token program that owns the accounts */
programId: Base58EncodedAddress;
programId: Address;
}>;

@@ -38,17 +39,17 @@ type AccountsFilter = MintFilter | ProgramIdFilter;

*/
getTokenAccountsByOwner(program: Base58EncodedAddress, filter: AccountsFilter, config: GetTokenAccountsByOwnerApiCommonConfig & GetTokenAccountsByOwnerApiSliceableCommonConfig & Readonly<{
getTokenAccountsByOwner(owner: Address, filter: AccountsFilter, config: GetTokenAccountsByOwnerApiCommonConfig & GetTokenAccountsByOwnerApiSliceableCommonConfig & Readonly<{
encoding: 'base64';
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedData>[]>;
getTokenAccountsByOwner(program: Base58EncodedAddress, filter: AccountsFilter, config: GetTokenAccountsByOwnerApiCommonConfig & GetTokenAccountsByOwnerApiSliceableCommonConfig & Readonly<{
getTokenAccountsByOwner(owner: Address, filter: AccountsFilter, config: GetTokenAccountsByOwnerApiCommonConfig & GetTokenAccountsByOwnerApiSliceableCommonConfig & Readonly<{
encoding: 'base64+zstd';
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase64EncodedZStdCompressedData>[]>;
getTokenAccountsByOwner(program: Base58EncodedAddress, filter: AccountsFilter, config: GetTokenAccountsByOwnerApiCommonConfig & Readonly<{
getTokenAccountsByOwner(owner: Address, filter: AccountsFilter, config: GetTokenAccountsByOwnerApiCommonConfig & Readonly<{
encoding: 'jsonParsed';
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & TokenAccountInfoWithJsonData>[]>;
getTokenAccountsByOwner(program: Base58EncodedAddress, filter: AccountsFilter, config: GetTokenAccountsByOwnerApiCommonConfig & GetTokenAccountsByOwnerApiSliceableCommonConfig & Readonly<{
getTokenAccountsByOwner(owner: Address, filter: AccountsFilter, config: GetTokenAccountsByOwnerApiCommonConfig & GetTokenAccountsByOwnerApiSliceableCommonConfig & Readonly<{
encoding: 'base58';
}>): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58EncodedData>[]>;
getTokenAccountsByOwner(program: Base58EncodedAddress, filter: AccountsFilter, config?: GetTokenAccountsByOwnerApiCommonConfig & GetTokenAccountsByOwnerApiSliceableCommonConfig): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58Bytes>[]>;
getTokenAccountsByOwner(owner: Address, filter: AccountsFilter, config?: GetTokenAccountsByOwnerApiCommonConfig & GetTokenAccountsByOwnerApiSliceableCommonConfig): RpcResponse<AccountInfoWithPubkey<AccountInfoBase & AccountInfoWithBase58Bytes>[]>;
}
export {};
//# sourceMappingURL=getTokenAccountsByOwner.d.ts.map

@@ -1,5 +0,6 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, RpcResponse, TokenAmount } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { RpcResponse, TokenAmount } from './common';
type GetTokenLargestAccountsApiResponse = RpcResponse<TokenAmount & {
address: Base58EncodedAddress;
address: Address;
}[]>;

@@ -10,3 +11,3 @@ export interface GetTokenLargestAccountsApi {

*/
getTokenLargestAccounts(tokenMint: Base58EncodedAddress, config?: Readonly<{
getTokenLargestAccounts(tokenMint: Address, config?: Readonly<{
commitment?: Commitment;

@@ -13,0 +14,0 @@ }>): GetTokenLargestAccountsApiResponse;

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, RpcResponse, TokenAmount } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { RpcResponse, TokenAmount } from './common';
type GetTokenSupplyApiResponse = RpcResponse<TokenAmount>;

@@ -10,3 +11,3 @@ export interface GetTokenSupplyApi {

/** Pubkey of the token Mint to query, as base-58 encoded string */
address: Base58EncodedAddress, config?: Readonly<{
address: Address, config?: Readonly<{
commitment?: Commitment;

@@ -13,0 +14,0 @@ }>): GetTokenSupplyApiResponse;

@@ -1,46 +0,11 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Address } from '@solana/addresses';
import { Signature } from '@solana/keys';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1, UnixTimestamp } from '@solana/rpc-types';
import { Blockhash, TransactionVersion } from '@solana/transactions';
import { TransactionError } from '../transaction-error';
import { UnixTimestamp } from '../unix-timestamp';
import { Base58EncodedBytes, Base58EncodedDataResponse, Base64EncodedDataResponse, Commitment, LamportsUnsafeBeyond2Pow53Minus1, Slot, TokenAmount, U64UnsafeBeyond2Pow53Minus1 } from './common';
type TokenBalance = Readonly<{
/** Index of the account in which the token balance is provided for. */
accountIndex: number;
/** Pubkey of the token's mint. */
mint: Base58EncodedAddress;
/** Pubkey of token balance's owner. */
owner?: Base58EncodedAddress;
/** Pubkey of the Token program that owns the account. */
programId?: Base58EncodedAddress;
uiTokenAmount: TokenAmount;
}>;
type TransactionRewardBase = Readonly<{
/** The public key of the account that received the reward */
pubkey: Base58EncodedAddress;
/** number of reward lamports credited or debited by the account */
lamports: LamportsUnsafeBeyond2Pow53Minus1;
/** account balance in lamports after the reward was applied */
postBalance: LamportsUnsafeBeyond2Pow53Minus1;
}>;
type TransactionRewardWithoutCommission = TransactionRewardBase & Readonly<{
/** type of reward */
rewardType: 'fee' | 'rent';
}>;
/** Commission is present only for voting and staking rewards */
type TransactionRewardWithCommission = TransactionRewardBase & Readonly<{
/** type of reward */
rewardType: 'voting' | 'staking';
/** vote account commission when the reward was credited */
commission: number;
}>;
type TransactionReward = TransactionRewardWithoutCommission | TransactionRewardWithCommission;
/** @deprecated */
type TransactionStatus = {
Ok: null;
} | {
Err: TransactionError;
};
import { Base58EncodedBytes, Base58EncodedDataResponse, Base64EncodedDataResponse, Slot, TokenBalance, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Reward, TransactionStatus } from './common-transactions';
type ReturnData = {
/** the program that generated the return data */
programId: Base58EncodedAddress;
programId: Address;
/** the return data itself */

@@ -65,3 +30,3 @@ data: Base64EncodedDataResponse;

/** transaction-level rewards */
rewards: readonly TransactionReward[] | null;
rewards: readonly Reward[] | null;
/**

@@ -79,3 +44,3 @@ * Transaction status

/** public key for an address lookup table account. */
accountKey: Base58EncodedAddress;
accountKey: Address;
/** List of indices used to load addresses of writable accounts from a lookup table. */

@@ -99,3 +64,3 @@ writableIndexes: readonly number[];

message: {
accountKeys: readonly Base58EncodedAddress[];
accountKeys: readonly Address[];
header: {

@@ -110,5 +75,5 @@ numReadonlySignedAccounts: number;

type PartiallyDecodedTransactionInstruction = Readonly<{
accounts: readonly Base58EncodedAddress[];
accounts: readonly Address[];
data: Base58EncodedBytes;
programId: Base58EncodedAddress;
programId: Address;
}>;

@@ -121,3 +86,3 @@ type ParsedTransactionInstruction = Readonly<{

program: string;
programId: Base58EncodedAddress;
programId: Address;
}>;

@@ -128,3 +93,3 @@ type TransactionJsonParsed = TransactionBase & Readonly<{

{
pubkey: Base58EncodedAddress;
pubkey: Address;
signer: boolean;

@@ -150,4 +115,4 @@ source: string;

loadedAddresses: {
writable: readonly Base58EncodedAddress[];
readonly: readonly Base58EncodedAddress[];
writable: readonly Address[];
readonly: readonly Address[];
};

@@ -174,3 +139,3 @@ }>;

*/
getTransaction<TMaxSupportedTransactionVersion extends TransactionVersion | void = void>(address: Base58EncodedAddress, config: GetTransactionCommonConfig<TMaxSupportedTransactionVersion> & Readonly<{
getTransaction<TMaxSupportedTransactionVersion extends TransactionVersion | void = void>(signature: Signature, config: GetTransactionCommonConfig<TMaxSupportedTransactionVersion> & Readonly<{
encoding: 'jsonParsed';

@@ -183,3 +148,3 @@ }>): (GetTransactionApiResponseBase & (TMaxSupportedTransactionVersion extends void ? Record<string, never> : {

}) | null;
getTransaction<TMaxSupportedTransactionVersion extends TransactionVersion | void = void>(address: Base58EncodedAddress, config: GetTransactionCommonConfig<TMaxSupportedTransactionVersion> & Readonly<{
getTransaction<TMaxSupportedTransactionVersion extends TransactionVersion | void = void>(signature: Signature, config: GetTransactionCommonConfig<TMaxSupportedTransactionVersion> & Readonly<{
encoding: 'base64';

@@ -192,3 +157,3 @@ }>): (GetTransactionApiResponseBase & (TMaxSupportedTransactionVersion extends void ? Record<string, never> : {

}) | null;
getTransaction<TMaxSupportedTransactionVersion extends TransactionVersion | void = void>(address: Base58EncodedAddress, config: GetTransactionCommonConfig<TMaxSupportedTransactionVersion> & Readonly<{
getTransaction<TMaxSupportedTransactionVersion extends TransactionVersion | void = void>(signature: Signature, config: GetTransactionCommonConfig<TMaxSupportedTransactionVersion> & Readonly<{
encoding: 'base58';

@@ -201,3 +166,3 @@ }>): (GetTransactionApiResponseBase & (TMaxSupportedTransactionVersion extends void ? Record<string, never> : {

}) | null;
getTransaction<TMaxSupportedTransactionVersion extends TransactionVersion | void = void>(address: Base58EncodedAddress, config?: GetTransactionCommonConfig<TMaxSupportedTransactionVersion> & Readonly<{
getTransaction<TMaxSupportedTransactionVersion extends TransactionVersion | void = void>(signature: Signature, config?: GetTransactionCommonConfig<TMaxSupportedTransactionVersion> & Readonly<{
encoding?: 'json';

@@ -204,0 +169,0 @@ }>): (GetTransactionApiResponseBase & (TMaxSupportedTransactionVersion extends void ? Record<string, never> : {

@@ -1,2 +0,3 @@

import { Commitment, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Commitment } from '@solana/rpc-types';
import { Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type GetTransactionCountApiResponse = U64UnsafeBeyond2Pow53Minus1;

@@ -3,0 +4,0 @@ export interface GetTransactionCountApi {

@@ -1,3 +0,4 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Commitment, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type Epoch = U64UnsafeBeyond2Pow53Minus1;

@@ -7,7 +8,7 @@ type Credits = U64UnsafeBeyond2Pow53Minus1;

type EpochCredit = [Epoch, Credits, PreviousCredits];
type VoteAccount<TVotePubkey extends Base58EncodedAddress> = Readonly<{
type VoteAccount<TVotePubkey extends Address> = Readonly<{
/** Vote account address */
votePubkey: TVotePubkey;
/** Validator identity */
nodePubkey: Base58EncodedAddress;
nodePubkey: Address;
/** the stake, in lamports, delegated to this vote account and active in this epoch */

@@ -24,9 +25,9 @@ activatedStake: U64UnsafeBeyond2Pow53Minus1;

/** Current root slot for this vote account */
rootSlot: U64UnsafeBeyond2Pow53Minus1;
rootSlot: Slot;
}>;
type GetVoteAccountsApiResponse<TVotePubkey extends Base58EncodedAddress> = Readonly<{
type GetVoteAccountsApiResponse<TVotePubkey extends Address> = Readonly<{
current: readonly VoteAccount<TVotePubkey>[];
delinquent: readonly VoteAccount<TVotePubkey>[];
}>;
type GetVoteAccountsConfig<TVotePubkey extends Base58EncodedAddress> = Readonly<{
type GetVoteAccountsConfig<TVotePubkey extends Address> = Readonly<{
commitment?: Commitment;

@@ -42,5 +43,5 @@ /** Only return results for this validator vote address */

/** Returns the account info and associated stake for all the voting accounts in the current bank. */
getVoteAccounts<TVoteAccount extends Base58EncodedAddress>(config?: GetVoteAccountsConfig<TVoteAccount>): GetVoteAccountsApiResponse<TVoteAccount>;
getVoteAccounts<TVoteAccount extends Address>(config?: GetVoteAccountsConfig<TVoteAccount>): GetVoteAccountsApiResponse<TVoteAccount>;
}
export {};
//# sourceMappingURL=getVoteAccounts.d.ts.map
import { IRpcApi } from '@solana/rpc-transport/dist/types/json-rpc-types';
import { GetAccountInfoApi } from './getAccountInfo';
import { GetBalanceApi } from './getBalance';
import { GetBlockApi } from './getBlock';
import { GetBlockCommitmentApi } from './getBlockCommitment';

@@ -57,5 +58,5 @@ import { GetBlockHeightApi } from './getBlockHeight';

}>;
export type SolanaRpcMethods = GetAccountInfoApi & GetBalanceApi & GetBlockCommitmentApi & GetBlockHeightApi & GetBlockProductionApi & GetBlocksApi & GetBlocksWithLimitApi & GetBlockTimeApi & GetClusterNodesApi & GetEpochInfoApi & GetEpochScheduleApi & GetFeeForMessageApi & GetFirstAvailableBlockApi & GetGenesisHashApi & GetHealthApi & GetHighestSnapshotSlotApi & GetIdentityApi & GetInflationGovernorApi & GetInflationRateApi & GetInflationRewardApi & GetLargestAccountsApi & GetLatestBlockhashApi & GetLeaderScheduleApi & GetMaxRetransmitSlotApi & GetMaxShredInsertSlotApi & GetMinimumBalanceForRentExemptionApi & GetMultipleAccountsApi & GetProgramAccountsApi & GetRecentPerformanceSamplesApi & GetRecentPrioritizationFeesApi & GetSignaturesForAddressApi & GetSignatureStatusesApi & GetSlotApi & GetSlotLeaderApi & GetSlotLeadersApi & GetStakeActivationApi & GetStakeMinimumDelegationApi & GetSupplyApi & GetTokenAccountBalanceApi & GetTokenAccountsByDelegateApi & GetTokenAccountsByOwnerApi & GetTokenLargestAccountsApi & GetTokenSupplyApi & GetTransactionApi & GetTransactionCountApi & GetVersionApi & GetVoteAccountsApi & IsBlockhashValidApi & MinimumLedgerSlotApi & RequestAirdropApi & SendTransactionApi & SimulateTransactionApi;
export type { Commitment } from './common';
export type SolanaRpcMethods = GetAccountInfoApi & GetBalanceApi & GetBlockApi & GetBlockCommitmentApi & GetBlockHeightApi & GetBlockProductionApi & GetBlocksApi & GetBlocksWithLimitApi & GetBlockTimeApi & GetClusterNodesApi & GetEpochInfoApi & GetEpochScheduleApi & GetFeeForMessageApi & GetFirstAvailableBlockApi & GetGenesisHashApi & GetHealthApi & GetHighestSnapshotSlotApi & GetIdentityApi & GetInflationGovernorApi & GetInflationRateApi & GetInflationRewardApi & GetLargestAccountsApi & GetLatestBlockhashApi & GetLeaderScheduleApi & GetMaxRetransmitSlotApi & GetMaxShredInsertSlotApi & GetMinimumBalanceForRentExemptionApi & GetMultipleAccountsApi & GetProgramAccountsApi & GetRecentPerformanceSamplesApi & GetRecentPrioritizationFeesApi & GetSignaturesForAddressApi & GetSignatureStatusesApi & GetSlotApi & GetSlotLeaderApi & GetSlotLeadersApi & GetStakeActivationApi & GetStakeMinimumDelegationApi & GetSupplyApi & GetTokenAccountBalanceApi & GetTokenAccountsByDelegateApi & GetTokenAccountsByOwnerApi & GetTokenLargestAccountsApi & GetTokenSupplyApi & GetTransactionApi & GetTransactionCountApi & GetVersionApi & GetVoteAccountsApi & IsBlockhashValidApi & MinimumLedgerSlotApi & RequestAirdropApi & SendTransactionApi & SimulateTransactionApi;
export declare function createSolanaRpcApi(config?: Config): IRpcApi<SolanaRpcMethods>;
export {};
//# sourceMappingURL=index.d.ts.map

@@ -0,3 +1,4 @@

import { Commitment } from '@solana/rpc-types';
import { Blockhash } from '@solana/transactions';
import { Commitment, RpcResponse, Slot } from './common';
import { RpcResponse, Slot } from './common';
type IsBlockhashValidApiResponse = RpcResponse<boolean>;

@@ -4,0 +5,0 @@ export interface IsBlockhashValidApi {

@@ -1,7 +0,8 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Base58EncodedTransactionSignature, Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from './common';
import { Address } from '@solana/addresses';
import { Signature } from '@solana/keys';
import { Commitment, LamportsUnsafeBeyond2Pow53Minus1 } from '@solana/rpc-types';
type RequestAirdropConfig = Readonly<{
commitment?: Commitment;
}>;
type RequestAirdropResponse = Base58EncodedTransactionSignature;
type RequestAirdropResponse = Signature;
export interface RequestAirdropApi {

@@ -11,5 +12,5 @@ /**

*/
requestAirdrop(recipientAccount: Base58EncodedAddress, lamports: LamportsUnsafeBeyond2Pow53Minus1, config?: RequestAirdropConfig): RequestAirdropResponse;
requestAirdrop(recipientAccount: Address, lamports: LamportsUnsafeBeyond2Pow53Minus1, config?: RequestAirdropConfig): RequestAirdropResponse;
}
export {};
//# sourceMappingURL=requestAirdrop.d.ts.map

@@ -0,3 +1,5 @@

import { Signature } from '@solana/keys';
import { Commitment } from '@solana/rpc-types';
import { Base64EncodedWireTransaction } from '@solana/transactions';
import { Base58EncodedTransactionSignature, Commitment, Slot } from './common';
import { Slot } from './common';
type SendTransactionConfig = Readonly<{

@@ -9,3 +11,3 @@ skipPreflight?: boolean;

}>;
type SendTransactionResponse = Base58EncodedTransactionSignature;
type SendTransactionResponse = Signature;
export interface SendTransactionApi {

@@ -12,0 +14,0 @@ /** @deprecated Set `encoding` to `'base64'` when calling this method */

@@ -1,5 +0,6 @@

import { Base58EncodedAddress } from '@solana/addresses';
import { Address } from '@solana/addresses';
import { Commitment } from '@solana/rpc-types';
import { Base64EncodedWireTransaction } from '@solana/transactions';
import { TransactionError } from '../transaction-error';
import { AccountInfoBase, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, Base58EncodedBytes, Base64EncodedDataResponse, Commitment, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
import { AccountInfoBase, AccountInfoWithBase64EncodedData, AccountInfoWithBase64EncodedZStdCompressedData, AccountInfoWithJsonData, Base58EncodedBytes, Base64EncodedDataResponse, RpcResponse, Slot, U64UnsafeBeyond2Pow53Minus1 } from './common';
type SimulateTransactionConfigBase = Readonly<{

@@ -33,3 +34,3 @@ /**

/** An `array` of accounts to return */
addresses: Base58EncodedAddress[];
addresses: Address[];
/** Encoding for returned Account data */

@@ -42,3 +43,3 @@ encoding: 'base64+zstd';

/** An `array` of accounts to return */
addresses: Base58EncodedAddress[];
addresses: Address[];
/** Encoding for returned Account data */

@@ -51,3 +52,3 @@ encoding: 'jsonParsed';

/** An `array` of accounts to return */
addresses: Base58EncodedAddress[];
addresses: Address[];
/** Encoding for returned Account data */

@@ -57,3 +58,3 @@ encoding?: 'base64';

}>;
type SimulateTransactionApiResponseBase = Readonly<{
type SimulateTransactionApiResponseBase = RpcResponse<{
/** Error if transaction failed, null if transaction succeeded. */

@@ -68,3 +69,3 @@ err: TransactionError | null;

/** The program that generated the return data */
programId: Base58EncodedAddress;
programId: Address;
/** The return data itself, as base-64 encoded binary data */

@@ -74,3 +75,3 @@ data: Base64EncodedDataResponse;

}>;
type SimulateTransactionApiResponseWithAccounts<T extends AccountInfoBase> = Readonly<{
type SimulateTransactionApiResponseWithAccounts<T extends AccountInfoBase> = RpcResponse<{
/** Array of accounts with the same length as the `accounts.addresses` array in the request */

@@ -77,0 +78,0 @@ accounts: (T | null)[];

{
"name": "@solana/rpc-core",
"version": "2.0.0-experimental.a27face",
"version": "2.0.0-experimental.a293578",
"description": "A library for making calls to the Solana JSON RPC API",

@@ -48,27 +48,28 @@ "exports": {

],
"dependencies": {
"@metaplex-foundation/umi-serializers": "^0.8.5"
},
"devDependencies": {
"@solana/eslint-config-solana": "^1.0.2",
"@swc/jest": "^0.2.28",
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.6",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.3.0",
"agadoo": "^3.0.0",
"eslint": "^8.45.0",
"eslint-plugin-jest": "^27.2.3",
"eslint-plugin-jest": "^27.4.2",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"jest": "^29.6.1",
"jest-environment-jsdom": "^29.6.4",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-fetch-mock-fork": "^3.0.4",
"jest-runner-eslint": "^2.1.0",
"jest-runner-eslint": "^2.1.2",
"jest-runner-prettier": "^1.0.0",
"prettier": "^2.8",
"tsup": "7.2.0",
"typescript": "^5.1.6",
"tsup": "^8.0.1",
"typescript": "^5.2.2",
"version-from-git": "^1.1.1",
"@solana/addresses": "2.0.0-experimental.a27face",
"@solana/rpc-transport": "2.0.0-experimental.a27face",
"@solana/transactions": "2.0.0-experimental.a27face",
"@solana/addresses": "2.0.0-experimental.a293578",
"@solana/codecs-strings": "2.0.0-experimental.a293578",
"@solana/codecs-core": "2.0.0-experimental.a293578",
"@solana/keys": "2.0.0-experimental.a293578",
"@solana/rpc-types": "2.0.0-experimental.a293578",
"@solana/rpc-transport": "2.0.0-experimental.a293578",
"@solana/transactions": "2.0.0-experimental.a293578",
"build-scripts": "0.0.0",

@@ -91,7 +92,8 @@ "test-config": "0.0.0",

"publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
"test:treeshakability:browser": "agadoo dist/index.browser.js",
"test:treeshakability:native": "agadoo dist/index.node.js",
"test:treeshakability:node": "agadoo dist/index.native.js",
"test:treeshakability:native": "agadoo dist/index.native.js",
"test:treeshakability:node": "agadoo dist/index.node.js",
"test:typecheck": "tsc --noEmit",

@@ -98,0 +100,0 @@ "test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --globalSetup test-config/test-validator-setup.js --globalTeardown test-config/test-validator-teardown.js --rootDir . --silent",

@@ -18,7 +18,1 @@ [![npm][npm-image]][npm-url]

This package defines a specification of the [Solana JSON-RPC](https://docs.solana.com/api/http). The inputs and outputs of each RPC method are described in terms of Typescript interfaces. You generally will not need to depend on this package directly, but rather use it as part of the RPC creation functions of the Solana JavaScript SDK [`@solana/web3.js@experimental`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library).
## Contributing
As of this moment, this package does not represent a specification of the full set of Solana JSON-RPC methods. If you find that you have need of a method that has not yet been specified, we would be grateful if you submitted a specification for it.
Read the RPC method specification [contribution guide](https://github.com/solana-labs/solana-web3.js/issues/1278) to get started.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc