Skip to content

Commit ca1d4ec

Browse files
authored
Remove NO_CONFIG hack in RPC methods with no parameters (#236)
1 parent dbee044 commit ca1d4ec

File tree

56 files changed

+175
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+175
-185
lines changed

.changeset/beige-tips-kiss.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@solana/rpc-api': patch
3+
---
4+
5+
RPC methods that take no parameters no longer rely on having a placeholder `NO_CONFIG` argument. Removing it will save you from wondering why it exists.

.changeset/silent-berries-know.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
'@solana/rpc-subscriptions-channel-websocket': patch
3+
'@solana/webcrypto-ed25519-polyfill': patch
4+
'@solana/transaction-confirmation': patch
5+
'@solana/codecs-data-structures': patch
6+
'@solana/rpc-subscriptions-spec': patch
7+
'@solana/fast-stable-stringify': patch
8+
'@solana/rpc-subscriptions-api': patch
9+
'@solana/transaction-messages': patch
10+
'@solana/rpc-transport-http': patch
11+
'@solana/rpc-subscriptions': patch
12+
'@solana/rpc-parsed-types': patch
13+
'@solana/rpc-transformers': patch
14+
'@solana/codecs-numbers': patch
15+
'@solana/codecs-strings': patch
16+
'@solana/rpc-spec-types': patch
17+
'@solana/instructions': patch
18+
'@solana/subscribable': patch
19+
'@solana/transactions': patch
20+
'@solana/codecs-core': patch
21+
'@solana/rpc-graphql': patch
22+
'@solana/assertions': patch
23+
'@solana/functional': patch
24+
'@solana/addresses': patch
25+
'@solana/rpc-types': patch
26+
'@solana/accounts': patch
27+
'@solana/programs': patch
28+
'@solana/promises': patch
29+
'@solana/rpc-spec': patch
30+
'@solana/options': patch
31+
'@solana/rpc-api': patch
32+
'@solana/signers': patch
33+
'@solana/sysvars': patch
34+
'@solana/codecs': patch
35+
'@solana/compat': patch
36+
'@solana/errors': patch
37+
'@solana/keys': patch
38+
'@solana/kit': patch
39+
'@solana/rpc': patch
40+
---
41+
42+
The minimum TypeScript version is now 5.3.3

packages/accounts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"@solana/rpc-types": "workspace:*"
8080
},
8181
"peerDependencies": {
82-
"typescript": ">=5"
82+
"typescript": ">=5.3.3"
8383
},
8484
"engines": {
8585
"node": ">=20.18.0"

packages/addresses/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"@solana/errors": "workspace:*"
7878
},
7979
"peerDependencies": {
80-
"typescript": ">=5"
80+
"typescript": ">=5.3.3"
8181
},
8282
"engines": {
8383
"node": ">=20.18.0"

packages/assertions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@solana/errors": "workspace:*"
7575
},
7676
"peerDependencies": {
77-
"typescript": ">=5"
77+
"typescript": ">=5.3.3"
7878
},
7979
"engines": {
8080
"node": ">=20.18.0"

packages/codecs-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"tinybench": "^4.0.1"
7979
},
8080
"peerDependencies": {
81-
"typescript": ">=5"
81+
"typescript": ">=5.3.3"
8282
},
8383
"engines": {
8484
"node": ">=20.18.0"

packages/codecs-data-structures/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"@solana/codecs-strings": "workspace:*"
8080
},
8181
"peerDependencies": {
82-
"typescript": ">=5"
82+
"typescript": ">=5.3.3"
8383
},
8484
"engines": {
8585
"node": ">=20.18.0"

packages/codecs-numbers/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"@solana/errors": "workspace:*"
7676
},
7777
"peerDependencies": {
78-
"typescript": ">=5"
78+
"typescript": ">=5.3.3"
7979
},
8080
"engines": {
8181
"node": ">=20.18.0"

packages/codecs-strings/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
},
8383
"peerDependencies": {
8484
"fastestsmallesttextencoderdecoder": "^1.0.22",
85-
"typescript": ">=5"
85+
"typescript": ">=5.3.3"
8686
},
8787
"engines": {
8888
"node": ">=20.18.0"

packages/codecs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@solana/options": "workspace:*"
7777
},
7878
"peerDependencies": {
79-
"typescript": ">=5"
79+
"typescript": ">=5.3.3"
8080
},
8181
"engines": {
8282
"node": ">=20.18.0"

packages/compat/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"@solana/web3.js": "^1"
8484
},
8585
"peerDependencies": {
86-
"typescript": ">=5"
86+
"typescript": ">=5.3.3"
8787
},
8888
"engines": {
8989
"node": ">=20.18.0"

packages/errors/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"commander": "^13.1.0"
7777
},
7878
"peerDependencies": {
79-
"typescript": ">=5"
79+
"typescript": ">=5.3.3"
8080
},
8181
"engines": {
8282
"node": ">=20.18.0"

packages/fast-stable-stringify/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"maintained node versions"
7979
],
8080
"peerDependencies": {
81-
"typescript": ">=5"
81+
"typescript": ">=5.3.3"
8282
},
8383
"engines": {
8484
"node": ">=20.18.0"

packages/functional/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"maintained node versions"
7272
],
7373
"peerDependencies": {
74-
"typescript": ">=5"
74+
"typescript": ">=5.3.3"
7575
},
7676
"engines": {
7777
"node": ">=20.18.0"

packages/instructions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"@solana/addresses": "workspace:*"
7979
},
8080
"peerDependencies": {
81-
"typescript": ">=5"
81+
"typescript": ">=5.3.3"
8282
},
8383
"engines": {
8484
"node": ">=20.18.0"

packages/keys/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"@solana/errors": "workspace:*"
7979
},
8080
"peerDependencies": {
81-
"typescript": ">=5"
81+
"typescript": ">=5.3.3"
8282
},
8383
"devDependencies": {
8484
"tinybench": "^4.0.1"

packages/kit/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"@solana/transactions": "workspace:*"
9595
},
9696
"peerDependencies": {
97-
"typescript": ">=5"
97+
"typescript": ">=5.3.3"
9898
},
9999
"engines": {
100100
"node": ">=20.18.0"

packages/options/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"@solana/errors": "workspace:*"
7979
},
8080
"peerDependencies": {
81-
"typescript": ">=5"
81+
"typescript": ">=5.3.3"
8282
},
8383
"engines": {
8484
"node": ">=20.18.0"

packages/programs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"@solana/transaction-messages": "workspace:*"
8080
},
8181
"peerDependencies": {
82-
"typescript": ">=5"
82+
"typescript": ">=5.3.3"
8383
},
8484
"engines": {
8585
"node": ">=20.18.0"

packages/promises/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"maintained node versions"
7272
],
7373
"peerDependencies": {
74-
"typescript": ">=5"
74+
"typescript": ">=5.3.3"
7575
},
7676
"engines": {
7777
"node": ">=20.18.0"

packages/rpc-api/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"@solana/rpc-transport-http": "workspace:*"
8989
},
9090
"peerDependencies": {
91-
"typescript": ">=5"
91+
"typescript": ">=5.3.3"
9292
},
9393
"engines": {
9494
"node": ">=20.18.0"

packages/rpc-api/src/getClusterNodes.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ type GetClusterNodesApiResponse = readonly ClusterNode[];
4242
export type GetClusterNodesApi = {
4343
/**
4444
* Returns information about all the nodes participating in the cluster
45-
* Note that the optional NO_CONFIG object is ignored. See https://github.com/solana-labs/solana-web3.js/issues/1389
4645
*/
47-
getClusterNodes(
48-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
49-
NO_CONFIG?: Record<string, never>,
50-
): GetClusterNodesApiResponse;
46+
getClusterNodes(): GetClusterNodesApiResponse;
5147
};

packages/rpc-api/src/getEpochSchedule.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ type GetEpochScheduleApiResponse = Readonly<{
1414
export type GetEpochScheduleApi = {
1515
/**
1616
* Returns the epoch schedule information from this cluster's genesis config
17-
* Note that the optional NO_CONFIG object is ignored. See https://github.com/solana-labs/solana-web3.js/issues/1389
1817
*/
19-
getEpochSchedule(
20-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
21-
NO_CONFIG?: Record<string, never>,
22-
): GetEpochScheduleApiResponse;
18+
getEpochSchedule(): GetEpochScheduleApiResponse;
2319
};

packages/rpc-api/src/getFirstAvailableBlock.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ type GetFirstAvailableBlockApiResponse = Slot;
55
export type GetFirstAvailableBlockApi = {
66
/**
77
* Returns the slot of the lowest confirmed block that has not been purged from the ledger
8-
* Note that the optional NO_CONFIG object is ignored. See https://github.com/solana-labs/solana-web3.js/issues/1389
98
*/
10-
getFirstAvailableBlock(
11-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
12-
NO_CONFIG?: Record<string, never>,
13-
): GetFirstAvailableBlockApiResponse;
9+
getFirstAvailableBlock(): GetFirstAvailableBlockApiResponse;
1410
};

packages/rpc-api/src/getGenesisHash.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@ export type GetGenesisHashApi = {
66
/**
77
* Returns the genesis hash
88
*/
9-
getGenesisHash(
10-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
11-
NO_CONFIG?: Record<string, never>,
12-
): GetGenesisHashApiResponse;
9+
getGenesisHash(): GetGenesisHashApiResponse;
1310
};

packages/rpc-api/src/getHealth.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@ export type GetHealthApi = {
44
/**
55
* Returns the health status of the node ("ok" if healthy).
66
*/
7-
getHealth(
8-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
9-
NO_CONFIG?: Record<string, never>,
10-
): GetHealthApiResponse;
7+
getHealth(): GetHealthApiResponse;
118
};

packages/rpc-api/src/getHighestSnapshotSlot.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,5 @@ export type GetHighestSnapshotSlotApi = {
1313
* incremental snapshot slot based on the full snapshot slot, if there
1414
* is one.
1515
*/
16-
getHighestSnapshotSlot(
17-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
18-
NO_CONFIG?: Record<string, never>,
19-
): GetHighestSnapshotSlotApiResponse;
16+
getHighestSnapshotSlot(): GetHighestSnapshotSlotApiResponse;
2017
};

packages/rpc-api/src/getIdentity.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@ export type GetIdentityApi = {
88
/**
99
* Returns the identity pubkey for the current node
1010
*/
11-
getIdentity(
12-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
13-
NO_CONFIG?: Record<string, never>,
14-
): GetIdentityApiResponse;
11+
getIdentity(): GetIdentityApiResponse;
1512
};

packages/rpc-api/src/getInflationRate.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,5 @@ export type GetInflationRateApi = {
1515
/**
1616
* Returns the specific inflation values for the current epoch
1717
*/
18-
getInflationRate(
19-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
20-
NO_CONFIG?: Record<string, never>,
21-
): GetInflationRateApiResponse;
18+
getInflationRate(): GetInflationRateApiResponse;
2219
};

packages/rpc-api/src/getMaxRetransmitSlot.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ type GetMaxRetransmitSlotApiResponse = Slot;
55
export type GetMaxRetransmitSlotApi = {
66
/**
77
* Get the max slot seen from retransmit stage.
8-
* Note that the optional NO_CONFIG object is ignored. See https://github.com/solana-labs/solana-web3.js/issues/1389
98
*/
10-
getMaxRetransmitSlot(
11-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
12-
NO_CONFIG?: Record<string, never>,
13-
): GetMaxRetransmitSlotApiResponse;
9+
getMaxRetransmitSlot(): GetMaxRetransmitSlotApiResponse;
1410
};

packages/rpc-api/src/getMaxShredInsertSlot.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ type GetMaxShredInsertSlotApiResponse = Slot;
55
export type GetMaxShredInsertSlotApi = {
66
/**
77
* Get the max slot seen from after shred insert.
8-
* Note that the optional NO_CONFIG object is ignored. See https://github.com/solana-labs/solana-web3.js/issues/1389
98
*/
10-
getMaxShredInsertSlot(
11-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
12-
NO_CONFIG?: Record<string, never>,
13-
): GetMaxShredInsertSlotApiResponse;
9+
getMaxShredInsertSlot(): GetMaxShredInsertSlotApiResponse;
1410
};

packages/rpc-api/src/getVersion.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,5 @@ export type GetVersionApi = {
99
/**
1010
* Returns the current Solana version running on the node
1111
*/
12-
getVersion(
13-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
14-
NO_CONFIG?: Record<string, never>,
15-
): GetVersionApiResponse;
12+
getVersion(): GetVersionApiResponse;
1613
};

packages/rpc-graphql/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"@solana/transactions": "workspace:*"
8686
},
8787
"peerDependencies": {
88-
"typescript": ">=5"
88+
"typescript": ">=5.3.3"
8989
},
9090
"engines": {
9191
"node": ">=20.18.0"

packages/rpc-parsed-types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"@solana/rpc-types": "workspace:*"
7474
},
7575
"peerDependencies": {
76-
"typescript": ">=5"
76+
"typescript": ">=5.3.3"
7777
},
7878
"engines": {
7979
"node": ">=20.18.0"

packages/rpc-spec-types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"maintained node versions"
7272
],
7373
"peerDependencies": {
74-
"typescript": ">=5"
74+
"typescript": ">=5.3.3"
7575
},
7676
"engines": {
7777
"node": ">=20.18.0"

packages/rpc-spec/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"@solana/rpc-spec-types": "workspace:*"
7676
},
7777
"peerDependencies": {
78-
"typescript": ">=5"
78+
"typescript": ">=5.3.3"
7979
},
8080
"engines": {
8181
"node": ">=20.18.0"

packages/rpc-subscriptions-api/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"@solana/rpc-subscriptions-channel-websocket": "workspace:*"
8484
},
8585
"peerDependencies": {
86-
"typescript": ">=5"
86+
"typescript": ">=5.3.3"
8787
},
8888
"engines": {
8989
"node": ">=20.18.0"

packages/rpc-subscriptions-api/src/root-notifications.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@ export type RootNotificationsApi = {
66
/**
77
* Subscribe to receive notification anytime a new root is set by the validator
88
*/
9-
rootNotifications(
10-
// FIXME: https://github.com/solana-labs/solana-web3.js/issues/1389
11-
NO_CONFIG?: Record<string, never>,
12-
): RootNotificationsApiNotification;
9+
rootNotifications(): RootNotificationsApiNotification;
1310
};

0 commit comments

Comments
 (0)