@solana/rpc-parsed-types 2.0.0-experimental.4c9a8b8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +19 -0
- package/dist/index.browser.cjs +4 -0
- package/dist/index.browser.cjs.map +1 -0
- package/dist/index.browser.js +3 -0
- package/dist/index.browser.js.map +1 -0
- package/dist/index.native.js +3 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.node.cjs +4 -0
- package/dist/index.node.cjs.map +1 -0
- package/dist/index.node.js +3 -0
- package/dist/index.node.js.map +1 -0
- package/dist/types/address-lookup-table-accounts.d.ts +10 -0
- package/dist/types/address-lookup-table-accounts.d.ts.map +1 -0
- package/dist/types/bpf-upgradeable-loader-accounts.d.ts +14 -0
- package/dist/types/bpf-upgradeable-loader-accounts.d.ts.map +1 -0
- package/dist/types/config-accounts.d.ts +16 -0
- package/dist/types/config-accounts.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/rpc-parsed-type.d.ts +5 -0
- package/dist/types/rpc-parsed-type.d.ts.map +1 -0
- package/dist/types/token-accounts.d.ts +33 -0
- package/dist/types/token-accounts.d.ts.map +1 -0
- package/package.json +88 -0
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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -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 AddressLookupTableAccount = 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,yBAAyB,GAAG,QAAQ,CAAC;IAC7C,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 ProgramAccount = Readonly<{
|
|
5
|
+
programData: Address;
|
|
6
|
+
}>;
|
|
7
|
+
type ProgramDataAccount = Readonly<{
|
|
8
|
+
authority?: Address;
|
|
9
|
+
data: Base64EncodedDataResponse;
|
|
10
|
+
slot: Slot;
|
|
11
|
+
}>;
|
|
12
|
+
export type BpfUpgradeableProgramAccount = RpcParsedType<'program', ProgramAccount> | RpcParsedType<'programData', ProgramDataAccount>;
|
|
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,cAAc,GAAG,QAAQ,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC,CAAC;AAEH,KAAK,kBAAkB,GAAG,QAAQ,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,yBAAyB,CAAC;IAChC,IAAI,EAAE,IAAI,CAAC;CACd,CAAC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAClC,aAAa,CAAC,SAAS,EAAE,cAAc,CAAC,GACxC,aAAa,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Address } from '@solana/addresses';
|
|
2
|
+
import type { RpcParsedType } from './rpc-parsed-type.js';
|
|
3
|
+
type StakeConfigAccount = Readonly<{
|
|
4
|
+
slashPenalty: number;
|
|
5
|
+
warmupCooldownRate: number;
|
|
6
|
+
}>;
|
|
7
|
+
type ValidatorInfoAccount = Readonly<{
|
|
8
|
+
configData: unknown;
|
|
9
|
+
keys: {
|
|
10
|
+
pubkey: Address;
|
|
11
|
+
signer: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
}>;
|
|
14
|
+
export type ConfigProgramAccount = RpcParsedType<'stakeConfig', StakeConfigAccount> | RpcParsedType<'validatorInfo', ValidatorInfoAccount>;
|
|
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,kBAAkB,GAAG,QAAQ,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;CAC9B,CAAC,CAAC;AAEH,KAAK,oBAAoB,GAAG,QAAQ,CAAC;IACjC,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,oBAAoB,GAC1B,aAAa,CAAC,aAAa,EAAE,kBAAkB,CAAC,GAChD,aAAa,CAAC,eAAe,EAAE,oBAAoB,CAAC,CAAC"}
|
|
@@ -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"}
|
|
@@ -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,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 TokenAccount = 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
|
+
export type MintAccount = Readonly<{
|
|
18
|
+
mintAuthority: Address | null;
|
|
19
|
+
supply: StringifiedBigInt;
|
|
20
|
+
decimals: number;
|
|
21
|
+
isInitialized: boolean;
|
|
22
|
+
freezeAuthority: Address | null;
|
|
23
|
+
extensions?: readonly unknown[];
|
|
24
|
+
}>;
|
|
25
|
+
export type MultisigAccount = Readonly<{
|
|
26
|
+
numRequiredSigners: number;
|
|
27
|
+
numValidSigners: number;
|
|
28
|
+
isInitialized: boolean;
|
|
29
|
+
signers: readonly Address[];
|
|
30
|
+
}>;
|
|
31
|
+
export type TokenProgramAccount = RpcParsedType<'account', TokenAccount> | RpcParsedType<'mint', MintAccount> | RpcParsedType<'multisig', MultisigAccount>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=token-accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"token-accounts.d.ts","sourceRoot":"","sources":["../../src/token-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,KAAK,iBAAiB,GAAG,aAAa,GAAG,eAAe,GAAG,QAAQ,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IAC/B,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,GAAG,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACnC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,SAAS,OAAO,EAAE,CAAC;CAC/B,CAAC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GACzB,aAAa,CAAC,SAAS,EAAE,YAAY,CAAC,GACtC,aAAa,CAAC,MAAM,EAAE,WAAW,CAAC,GAClC,aAAa,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solana/rpc-parsed-types",
|
|
3
|
+
"version": "2.0.0-experimental.4c9a8b8",
|
|
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.4c9a8b8",
|
|
62
|
+
"@solana/rpc-types": "2.0.0-experimental.4c9a8b8",
|
|
63
|
+
"build-scripts": "0.0.0",
|
|
64
|
+
"test-config": "0.0.0",
|
|
65
|
+
"tsconfig": "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
|
+
}
|