@solana/rpc-parsed-types 2.0.0-experimental.1c57210

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2023 Solana Labs, Inc
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,19 @@
1
+ [![npm][npm-image]][npm-url] [![npm-downloads][npm-downloads-image]][npm-url]
2
+ [![semantic-release][semantic-release-image]][semantic-release-url]
3
+ <br />
4
+ [![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]
5
+
6
+ [code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
7
+ [code-style-prettier-url]: https://github.com/prettier/prettier
8
+ [npm-downloads-image]: https://img.shields.io/npm/dm/@solana/rpc-types/experimental.svg?style=flat
9
+ [npm-image]: https://img.shields.io/npm/v/@solana/rpc-types/experimental.svg?style=flat
10
+ [npm-url]: https://www.npmjs.com/package/@solana/rpc-types/v/experimental
11
+ [semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
12
+ [semantic-release-url]: https://github.com/semantic-release/semantic-release
13
+
14
+ # @solana/rpc-parsed-types
15
+
16
+ This package defines types for Parsed objects used in the
17
+ [Solana JSON-RPC](https://docs.solana.com/api/http). It can be used standalone,
18
+ but it is also exported as part of the Solana JavaScript SDK
19
+ [`@solana/web3.js@experimental`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library).
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=out.js.map
4
+ //# sourceMappingURL=index.browser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=out.js.map
3
+ //# sourceMappingURL=index.browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=out.js.map
3
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ //# sourceMappingURL=out.js.map
4
+ //# sourceMappingURL=index.node.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=out.js.map
3
+ //# sourceMappingURL=index.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { StringifiedBigInt } from '@solana/rpc-types';
3
+ export type JsonParsedAddressLookupTableAccount = Readonly<{
4
+ addresses: readonly Address[];
5
+ authority?: Address;
6
+ deactivationSlot: StringifiedBigInt;
7
+ lastExtendedSlot: StringifiedBigInt;
8
+ lastExtendedSlotStartIndex: number;
9
+ }>;
10
+ //# sourceMappingURL=address-lookup-table-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"address-lookup-table-accounts.d.ts","sourceRoot":"","sources":["../../src/address-lookup-table-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,mCAAmC,GAAG,QAAQ,CAAC;IACvD,SAAS,EAAE,SAAS,OAAO,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,0BAA0B,EAAE,MAAM,CAAC;CACtC,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { Base64EncodedDataResponse, Slot } from '@solana/rpc-types';
3
+ import type { RpcParsedType } from './rpc-parsed-type.js';
4
+ type JsonParsedBpfProgramAccount = Readonly<{
5
+ programData: Address;
6
+ }>;
7
+ type JsonParsedBpfProgramDataAccount = Readonly<{
8
+ authority?: Address;
9
+ data: Base64EncodedDataResponse;
10
+ slot: Slot;
11
+ }>;
12
+ export type JsonParsedBpfUpgradeableLoaderProgramAccount = RpcParsedType<'program', JsonParsedBpfProgramAccount> | RpcParsedType<'programData', JsonParsedBpfProgramDataAccount>;
13
+ export {};
14
+ //# sourceMappingURL=bpf-upgradeable-loader-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bpf-upgradeable-loader-accounts.d.ts","sourceRoot":"","sources":["../../src/bpf-upgradeable-loader-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,KAAK,2BAA2B,GAAG,QAAQ,CAAC;IACxC,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC,CAAC;AAEH,KAAK,+BAA+B,GAAG,QAAQ,CAAC;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,yBAAyB,CAAC;IAChC,IAAI,EAAE,IAAI,CAAC;CACd,CAAC,CAAC;AAEH,MAAM,MAAM,4CAA4C,GAClD,aAAa,CAAC,SAAS,EAAE,2BAA2B,CAAC,GACrD,aAAa,CAAC,aAAa,EAAE,+BAA+B,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { RpcParsedType } from './rpc-parsed-type.js';
3
+ type JsonParsedStakeConfigAccount = Readonly<{
4
+ slashPenalty: number;
5
+ warmupCooldownRate: number;
6
+ }>;
7
+ type JsonParsedValidatorInfoAccount = Readonly<{
8
+ configData: unknown;
9
+ keys: {
10
+ pubkey: Address;
11
+ signer: boolean;
12
+ }[];
13
+ }>;
14
+ export type JsonParsedConfigProgramAccount = RpcParsedType<'stakeConfig', JsonParsedStakeConfigAccount> | RpcParsedType<'validatorInfo', JsonParsedValidatorInfoAccount>;
15
+ export {};
16
+ //# sourceMappingURL=config-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-accounts.d.ts","sourceRoot":"","sources":["../../src/config-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,KAAK,4BAA4B,GAAG,QAAQ,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;CAC9B,CAAC,CAAC;AAEH,KAAK,8BAA8B,GAAG,QAAQ,CAAC;IAC3C,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE;QACF,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KACnB,EAAE,CAAC;CACP,CAAC,CAAC;AAEH,MAAM,MAAM,8BAA8B,GACpC,aAAa,CAAC,aAAa,EAAE,4BAA4B,CAAC,GAC1D,aAAa,CAAC,eAAe,EAAE,8BAA8B,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ export * from './address-lookup-table-accounts.js';
2
+ export * from './bpf-upgradeable-loader-accounts.js';
3
+ export * from './config-accounts.js';
4
+ export * from './nonce-accounts.js';
5
+ export * from './stake-accounts.js';
6
+ export * from './sysvar-accounts.js';
7
+ export * from './token-accounts.js';
8
+ export * from './vote-accounts.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Address } from '@solana/addresses';
2
+ import type { Blockhash, StringifiedBigInt } from '@solana/rpc-types';
3
+ export type JsonParsedNonceAccount = Readonly<{
4
+ authority: Address;
5
+ blockhash: Blockhash;
6
+ feeCalculator: Readonly<{
7
+ lamportsPerSignature: StringifiedBigInt;
8
+ }>;
9
+ }>;
10
+ //# sourceMappingURL=nonce-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nonce-accounts.d.ts","sourceRoot":"","sources":["../../src/nonce-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,QAAQ,CAAC;QACpB,oBAAoB,EAAE,iBAAiB,CAAC;KAC3C,CAAC,CAAC;CACN,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type RpcParsedType<TType extends string, TInfo> = Readonly<{
2
+ info: TInfo;
3
+ type: TType;
4
+ }>;
5
+ //# sourceMappingURL=rpc-parsed-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc-parsed-type.d.ts","sourceRoot":"","sources":["../../src/rpc-parsed-type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,CAAC,KAAK,SAAS,MAAM,EAAE,KAAK,IAAI,QAAQ,CAAC;IAC9D,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;CACf,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { Address } from '@solana/addresses';
2
+ import { StringifiedBigInt, UnixTimestamp } from '@solana/rpc-types';
3
+ import { RpcParsedType } from './rpc-parsed-type.js';
4
+ type JsonParsedStakeAccount = Readonly<{
5
+ meta: Readonly<{
6
+ rentExemptReserve: StringifiedBigInt;
7
+ authorized: Readonly<{
8
+ staker: Address;
9
+ withdrawer: Address;
10
+ }>;
11
+ lockup: Readonly<{
12
+ unixTimestamp: UnixTimestamp;
13
+ epoch: bigint;
14
+ custodian: Address;
15
+ }>;
16
+ }>;
17
+ stake: Readonly<{
18
+ delegation: Readonly<{
19
+ voter: Address;
20
+ stake: StringifiedBigInt;
21
+ activationEpoch: StringifiedBigInt;
22
+ deactivationEpoch: StringifiedBigInt;
23
+ warmupCooldownRate: number;
24
+ }>;
25
+ creditsObserved: bigint;
26
+ }> | null;
27
+ }>;
28
+ export type JsonParsedStakeProgramAccount = RpcParsedType<'initialized', JsonParsedStakeAccount> | RpcParsedType<'delegated', JsonParsedStakeAccount>;
29
+ export {};
30
+ //# sourceMappingURL=stake-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stake-accounts.d.ts","sourceRoot":"","sources":["../../src/stake-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,KAAK,sBAAsB,GAAG,QAAQ,CAAC;IACnC,IAAI,EAAE,QAAQ,CAAC;QACX,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,UAAU,EAAE,QAAQ,CAAC;YACjB,MAAM,EAAE,OAAO,CAAC;YAChB,UAAU,EAAE,OAAO,CAAC;SACvB,CAAC,CAAC;QACH,MAAM,EAAE,QAAQ,CAAC;YACb,aAAa,EAAE,aAAa,CAAC;YAC7B,KAAK,EAAE,MAAM,CAAC;YACd,SAAS,EAAE,OAAO,CAAC;SACtB,CAAC,CAAC;KACN,CAAC,CAAC;IACH,KAAK,EAAE,QAAQ,CAAC;QACZ,UAAU,EAAE,QAAQ,CAAC;YACjB,KAAK,EAAE,OAAO,CAAC;YACf,KAAK,EAAE,iBAAiB,CAAC;YACzB,eAAe,EAAE,iBAAiB,CAAC;YACnC,iBAAiB,EAAE,iBAAiB,CAAC;YACrC,kBAAkB,EAAE,MAAM,CAAC;SAC9B,CAAC,CAAC;QACH,eAAe,EAAE,MAAM,CAAC;KAC3B,CAAC,GAAG,IAAI,CAAC;CACb,CAAC,CAAC;AAEH,MAAM,MAAM,6BAA6B,GACnC,aAAa,CAAC,aAAa,EAAE,sBAAsB,CAAC,GACpD,aAAa,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { Blockhash, Epoch, Slot, StringifiedBigInt, UnixTimestamp } from '@solana/rpc-types';
2
+ import { RpcParsedType } from './rpc-parsed-type.js';
3
+ type FeeCalculator = Readonly<{
4
+ lamportsPerSignature: StringifiedBigInt;
5
+ }>;
6
+ type JsonParsedClockAccount = Readonly<{
7
+ slot: Slot;
8
+ epoch: Epoch;
9
+ epochStartTimestamp: UnixTimestamp;
10
+ leaderScheduleEpoch: Epoch;
11
+ unixTimestamp: UnixTimestamp;
12
+ }>;
13
+ type JsonParsedEpochScheduleAccount = Readonly<{
14
+ slotsPerEpoch: bigint;
15
+ leaderScheduleSlotOffset: bigint;
16
+ warmup: boolean;
17
+ firstNormalEpoch: Epoch;
18
+ firstNormalSlot: Slot;
19
+ }>;
20
+ type JsonParsedFeesAccount_DEPRECATED = Readonly<{
21
+ feeCalculator: FeeCalculator;
22
+ }>;
23
+ type JsonParsedRecentBlockhashesAccount_DEPRECATED = Readonly<{
24
+ blockhash: Blockhash;
25
+ feeCalculator: FeeCalculator;
26
+ }>[];
27
+ type JsonParsedRentAccount = Readonly<{
28
+ lamportsPerByteYear: StringifiedBigInt;
29
+ exemptionThreshold: number;
30
+ burnPercent: number;
31
+ }>;
32
+ type JsonParsedSlotHashesAccount = Readonly<{
33
+ hash: string;
34
+ slot: Slot;
35
+ }>[];
36
+ type JsonParsedSlotHistoryAccount = Readonly<{
37
+ bits: string;
38
+ nextSlot: Slot;
39
+ }>;
40
+ type JsonParsedStakeHistoryAccount = Readonly<{
41
+ epoch: Epoch;
42
+ stakeHistory: Readonly<{
43
+ activating: bigint;
44
+ deactivating: bigint;
45
+ effective: bigint;
46
+ }>;
47
+ }>[];
48
+ type JsonParsedLastRestartSlotAccount = Readonly<{
49
+ lastRestartSlot: Slot;
50
+ }>;
51
+ type JsonParsedEpochRewardsAccount = Readonly<{
52
+ totalRewards: bigint;
53
+ distributedRewards: bigint;
54
+ distributionCompleteBlockHeight: bigint;
55
+ }>;
56
+ export type JsonParsedSysvarAccount = RpcParsedType<'clock', JsonParsedClockAccount> | RpcParsedType<'epochSchedule', JsonParsedEpochScheduleAccount> | RpcParsedType<'fees', JsonParsedFeesAccount_DEPRECATED> | RpcParsedType<'recentBlockhashes', JsonParsedRecentBlockhashesAccount_DEPRECATED> | RpcParsedType<'rent', JsonParsedRentAccount> | RpcParsedType<'slotHashes', JsonParsedSlotHashesAccount> | RpcParsedType<'slotHistory', JsonParsedSlotHistoryAccount> | RpcParsedType<'stakeHistory', JsonParsedStakeHistoryAccount> | RpcParsedType<'lastRestartSlot', JsonParsedLastRestartSlotAccount> | RpcParsedType<'epochRewards', JsonParsedEpochRewardsAccount>;
57
+ export {};
58
+ //# sourceMappingURL=sysvar-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sysvar-accounts.d.ts","sourceRoot":"","sources":["../../src/sysvar-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,KAAK,aAAa,GAAG,QAAQ,CAAC;IAC1B,oBAAoB,EAAE,iBAAiB,CAAC;CAC3C,CAAC,CAAC;AAEH,KAAK,sBAAsB,GAAG,QAAQ,CAAC;IACnC,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,mBAAmB,EAAE,aAAa,CAAC;IACnC,mBAAmB,EAAE,KAAK,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;CAChC,CAAC,CAAC;AAEH,KAAK,8BAA8B,GAAG,QAAQ,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,MAAM,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,KAAK,CAAC;IACxB,eAAe,EAAE,IAAI,CAAC;CACzB,CAA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,MAAM,EAAE,gCAAgC,CAAC,GACvD,aAAa,CAAC,mBAAmB,EAAE,6CAA6C,CAAC,GACjF,aAAa,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAC5C,aAAa,CAAC,YAAY,EAAE,2BAA2B,CAAC,GACxD,aAAa,CAAC,aAAa,EAAE,4BAA4B,CAAC,GAC1D,aAAa,CAAC,cAAc,EAAE,6BAA6B,CAAC,GAC5D,aAAa,CAAC,iBAAiB,EAAE,gCAAgC,CAAC,GAClE,aAAa,CAAC,cAAc,EAAE,6BAA6B,CAAC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { Address } from '@solana/addresses';
2
+ import type { StringifiedBigInt, TokenAmount } from '@solana/rpc-types';
3
+ import { RpcParsedType } from './rpc-parsed-type.js';
4
+ type TokenAccountState = 'initialized' | 'uninitialized' | 'frozen';
5
+ export type JsonParsedTokenAccount = Readonly<{
6
+ mint: Address;
7
+ owner: Address;
8
+ tokenAmount: TokenAmount;
9
+ delegate?: Address;
10
+ state: TokenAccountState;
11
+ isNative: boolean;
12
+ rentExemptReserve?: TokenAmount;
13
+ delegatedAmount?: TokenAmount;
14
+ closeAuthority?: Address;
15
+ extensions?: readonly unknown[];
16
+ }>;
17
+ type JsonParsedMintAccount = Readonly<{
18
+ mintAuthority: Address | null;
19
+ supply: StringifiedBigInt;
20
+ decimals: number;
21
+ isInitialized: boolean;
22
+ freezeAuthority: Address | null;
23
+ extensions?: readonly unknown[];
24
+ }>;
25
+ type JsonParsedMultisigAccount = Readonly<{
26
+ numRequiredSigners: number;
27
+ numValidSigners: number;
28
+ isInitialized: boolean;
29
+ signers: readonly Address[];
30
+ }>;
31
+ export type JsonParsedTokenProgramAccount = RpcParsedType<'account', JsonParsedTokenAccount> | RpcParsedType<'mint', JsonParsedMintAccount> | RpcParsedType<'multisig', JsonParsedMultisigAccount>;
32
+ export {};
33
+ //# sourceMappingURL=token-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-accounts.d.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SAAS,EAAE,sBAAsB,CAAC,GAChD,aAAa,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAC5C,aAAa,CAAC,UAAU,EAAE,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { Address } from '@solana/addresses';
2
+ import { Epoch, Slot, StringifiedBigInt, UnixTimestamp } from '@solana/rpc-types';
3
+ export type JsonParsedVoteAccount = Readonly<{
4
+ authorizedVoters: Readonly<{
5
+ authorizedVoter: Address;
6
+ epoch: Epoch;
7
+ }>[];
8
+ authorizedWithdrawer: Address;
9
+ commission: number;
10
+ epochCredits: Readonly<{
11
+ credits: StringifiedBigInt;
12
+ epoch: Epoch;
13
+ previousCredits: StringifiedBigInt;
14
+ }>[];
15
+ lastTimestamp: Readonly<{
16
+ slot: Slot;
17
+ timestamp: UnixTimestamp;
18
+ }>;
19
+ nodePubkey: Address;
20
+ priorVoters: Readonly<{
21
+ authorizedPubkey: Address;
22
+ epochOfLastAuthorizedSwitch: Epoch;
23
+ targetEpoch: Epoch;
24
+ }>[];
25
+ rootSlot: Slot | null;
26
+ votes: Readonly<{
27
+ confirmationCount: number;
28
+ slot: Slot;
29
+ }>[];
30
+ }>;
31
+ //# sourceMappingURL=vote-accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vote-accounts.d.ts","sourceRoot":"","sources":["../../src/vote-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IACzC,gBAAgB,EAAE,QAAQ,CAAC;QACvB,eAAe,EAAE,OAAO,CAAC;QACzB,KAAK,EAAE,KAAK,CAAC;KAChB,CAAC,EAAE,CAAC;IACL,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,QAAQ,CAAC;QACnB,OAAO,EAAE,iBAAiB,CAAC;QAC3B,KAAK,EAAE,KAAK,CAAC;QACb,eAAe,EAAE,iBAAiB,CAAC;KACtC,CAAC,EAAE,CAAC;IACL,aAAa,EAAE,QAAQ,CAAC;QACpB,IAAI,EAAE,IAAI,CAAC;QACX,SAAS,EAAE,aAAa,CAAC;KAC5B,CAAC,CAAC;IACH,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,QAAQ,CAAC;QAClB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,2BAA2B,EAAE,KAAK,CAAC;QACnC,WAAW,EAAE,KAAK,CAAC;KACtB,CAAC,EAAE,CAAC;IACL,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,QAAQ,CAAC;QACZ,iBAAiB,EAAE,MAAM,CAAC;QAC1B,IAAI,EAAE,IAAI,CAAC;KACd,CAAC,EAAE,CAAC;CACR,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@solana/rpc-parsed-types",
3
+ "version": "2.0.0-experimental.1c57210",
4
+ "description": "Type definitions for parsed types used in the Solana RPC",
5
+ "exports": {
6
+ "browser": {
7
+ "import": "./dist/index.browser.js",
8
+ "require": "./dist/index.browser.cjs"
9
+ },
10
+ "node": {
11
+ "import": "./dist/index.node.js",
12
+ "require": "./dist/index.node.cjs"
13
+ },
14
+ "react-native": "./dist/index.native.js",
15
+ "types": "./dist/types/index.d.ts"
16
+ },
17
+ "browser": {
18
+ "./dist/index.node.cjs": "./dist/index.browser.cjs",
19
+ "./dist/index.node.js": "./dist/index.browser.js"
20
+ },
21
+ "main": "./dist/index.node.cjs",
22
+ "module": "./dist/index.node.js",
23
+ "react-native": "./dist/index.native.js",
24
+ "types": "./dist/types/index.d.ts",
25
+ "type": "module",
26
+ "files": [
27
+ "./dist/"
28
+ ],
29
+ "sideEffects": false,
30
+ "keywords": [
31
+ "blockchain",
32
+ "solana",
33
+ "web3"
34
+ ],
35
+ "author": "Solana Labs Maintainers <maintainers@solanalabs.com>",
36
+ "license": "MIT",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/solana-labs/solana-web3.js"
40
+ },
41
+ "bugs": {
42
+ "url": "http://github.com/solana-labs/solana-web3.js/issues"
43
+ },
44
+ "browserslist": [
45
+ "supports bigint and not dead",
46
+ "maintained node versions"
47
+ ],
48
+ "devDependencies": {
49
+ "@solana/eslint-config-solana": "^1.0.2",
50
+ "@typescript-eslint/eslint-plugin": "^6.13.2",
51
+ "@typescript-eslint/parser": "^6.3.0",
52
+ "agadoo": "^3.0.0",
53
+ "eslint": "^8.45.0",
54
+ "eslint-plugin-jest": "^27.4.2",
55
+ "eslint-plugin-sort-keys-fix": "^1.1.2",
56
+ "jest": "^29.7.0",
57
+ "prettier": "^3.1",
58
+ "tsup": "^8.0.1",
59
+ "typescript": "^5.2.2",
60
+ "version-from-git": "^1.1.1",
61
+ "@solana/addresses": "2.0.0-experimental.1c57210",
62
+ "@solana/rpc-types": "2.0.0-experimental.1c57210",
63
+ "test-config": "0.0.0",
64
+ "tsconfig": "0.0.0",
65
+ "build-scripts": "0.0.0"
66
+ },
67
+ "bundlewatch": {
68
+ "defaultCompression": "gzip",
69
+ "files": [
70
+ {
71
+ "path": "./dist/index*.js"
72
+ }
73
+ ]
74
+ },
75
+ "scripts": {
76
+ "compile:js": "tsup --config build-scripts/tsup.config.package.ts",
77
+ "compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/build-scripts/add-js-extension-to-types.mjs",
78
+ "dev": "jest -c node_modules/test-config/jest-dev.config.ts --globalSetup test-config/test-validator-setup.js --globalTeardown test-config/test-validator-teardown.js --rootDir . --watch",
79
+ "publish-packages": "pnpm publish --tag experimental --access public --no-git-checks",
80
+ "style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
81
+ "test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
82
+ "test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
83
+ "test:treeshakability:browser": "agadoo dist/index.browser.js",
84
+ "test:treeshakability:native": "agadoo dist/index.native.js",
85
+ "test:treeshakability:node": "agadoo dist/index.node.js",
86
+ "test:typecheck": "tsc --noEmit"
87
+ }
88
+ }