@solana/codecs-data-structures 2.0.0-experimental.a48ebd2 → 2.0.0-experimental.a7a613a
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/README.md +482 -4
- package/dist/index.browser.cjs +334 -432
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js +336 -430
- package/dist/index.browser.js.map +1 -1
- package/dist/index.native.js +338 -430
- package/dist/index.native.js.map +1 -1
- package/dist/index.node.cjs +334 -432
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.js +338 -430
- package/dist/index.node.js.map +1 -1
- package/dist/types/array.d.ts +35 -6
- package/dist/types/array.d.ts.map +1 -1
- package/dist/types/bit-array.d.ts +5 -5
- package/dist/types/bit-array.d.ts.map +1 -1
- package/dist/types/boolean.d.ts +18 -6
- package/dist/types/boolean.d.ts.map +1 -1
- package/dist/types/bytes.d.ts +14 -5
- package/dist/types/bytes.d.ts.map +1 -1
- package/dist/types/data-enum.d.ts +18 -20
- package/dist/types/data-enum.d.ts.map +1 -1
- package/dist/types/index.d.ts +13 -14
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/map.d.ts +24 -6
- package/dist/types/map.d.ts.map +1 -1
- package/dist/types/nullable.d.ts +24 -6
- package/dist/types/nullable.d.ts.map +1 -1
- package/dist/types/scalar-enum.d.ts +42 -11
- package/dist/types/scalar-enum.d.ts.map +1 -1
- package/dist/types/set.d.ts +24 -6
- package/dist/types/set.d.ts.map +1 -1
- package/dist/types/struct.d.ts +16 -21
- package/dist/types/struct.d.ts.map +1 -1
- package/dist/types/tuple.d.ts +22 -15
- package/dist/types/tuple.d.ts.map +1 -1
- package/dist/types/unit.d.ts +4 -12
- package/dist/types/unit.d.ts.map +1 -1
- package/dist/types/utils.d.ts +10 -2
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +12 -34
- package/dist/index.development.js +0 -889
- package/dist/index.development.js.map +0 -1
- package/dist/index.production.min.js +0 -51
- package/dist/types/array-like-codec-size.d.ts +0 -20
- package/dist/types/array-like-codec-size.d.ts.map +0 -1
package/dist/types/unit.d.ts
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** Defines the config for unit codecs. */
|
|
3
|
-
export type UnitSerializerconfig = BaseCodecConfig;
|
|
1
|
+
import { FixedSizeCodec, FixedSizeDecoder, FixedSizeEncoder } from '@solana/codecs-core';
|
|
4
2
|
/**
|
|
5
3
|
* Creates a void encoder.
|
|
6
|
-
*
|
|
7
|
-
* @param config - A set of config for the encoder.
|
|
8
4
|
*/
|
|
9
|
-
export declare function getUnitEncoder(
|
|
5
|
+
export declare function getUnitEncoder(): FixedSizeEncoder<void, 0>;
|
|
10
6
|
/**
|
|
11
7
|
* Creates a void decoder.
|
|
12
|
-
*
|
|
13
|
-
* @param config - A set of config for the decoder.
|
|
14
8
|
*/
|
|
15
|
-
export declare function getUnitDecoder(
|
|
9
|
+
export declare function getUnitDecoder(): FixedSizeDecoder<void, 0>;
|
|
16
10
|
/**
|
|
17
11
|
* Creates a void codec.
|
|
18
|
-
*
|
|
19
|
-
* @param config - A set of config for the codec.
|
|
20
12
|
*/
|
|
21
|
-
export declare function getUnitCodec(
|
|
13
|
+
export declare function getUnitCodec(): FixedSizeCodec<void, void, 0>;
|
|
22
14
|
//# sourceMappingURL=unit.d.ts.map
|
package/dist/types/unit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../src/unit.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../src/unit.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EACnB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,CAK1D;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,CAK1D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAE5D"}
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
/** Returns the max size or null if at least one size is null. */
|
|
2
1
|
export declare function maxCodecSizes(sizes: (number | null)[]): number | null;
|
|
3
|
-
/** Returns the sum of all sizes or null if at least one size is null. */
|
|
4
2
|
export declare function sumCodecSizes(sizes: (number | null)[]): number | null;
|
|
3
|
+
export declare function getFixedSize(codec: {
|
|
4
|
+
fixedSize: number;
|
|
5
|
+
} | {
|
|
6
|
+
maxSize?: number;
|
|
7
|
+
}): number | null;
|
|
8
|
+
export declare function getMaxSize(codec: {
|
|
9
|
+
fixedSize: number;
|
|
10
|
+
} | {
|
|
11
|
+
maxSize?: number;
|
|
12
|
+
}): number | null;
|
|
5
13
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,GAAG,IAAI,CAKrE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,GAAG,IAAI,CAErE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,GAAG,IAAI,CAE/F;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,GAAG,IAAI,CAE7F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/codecs-data-structures",
|
|
3
|
-
"version": "2.0.0-experimental.
|
|
3
|
+
"version": "2.0.0-experimental.a7a613a",
|
|
4
4
|
"description": "Codecs for various data structures",
|
|
5
5
|
"exports": {
|
|
6
6
|
"browser": {
|
|
@@ -49,31 +49,8 @@
|
|
|
49
49
|
"node": ">=17.4"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@solana/codecs-core": "2.0.0-experimental.
|
|
53
|
-
"@solana/codecs-numbers": "2.0.0-experimental.
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@solana/eslint-config-solana": "^1.0.2",
|
|
57
|
-
"@swc/jest": "^0.2.29",
|
|
58
|
-
"@types/jest": "^29.5.6",
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
60
|
-
"@typescript-eslint/parser": "^6.3.0",
|
|
61
|
-
"agadoo": "^3.0.0",
|
|
62
|
-
"eslint": "^8.45.0",
|
|
63
|
-
"eslint-plugin-jest": "^27.4.2",
|
|
64
|
-
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
65
|
-
"jest": "^29.7.0",
|
|
66
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
67
|
-
"jest-runner-eslint": "^2.1.2",
|
|
68
|
-
"jest-runner-prettier": "^1.0.0",
|
|
69
|
-
"prettier": "^2.8",
|
|
70
|
-
"tsup": "^8.0.1",
|
|
71
|
-
"typescript": "^5.2.2",
|
|
72
|
-
"version-from-git": "^1.1.1",
|
|
73
|
-
"build-scripts": "0.0.0",
|
|
74
|
-
"@solana/codecs-strings": "2.0.0-experimental.a48ebd2",
|
|
75
|
-
"test-config": "0.0.0",
|
|
76
|
-
"tsconfig": "0.0.0"
|
|
52
|
+
"@solana/codecs-core": "2.0.0-experimental.a7a613a",
|
|
53
|
+
"@solana/codecs-numbers": "2.0.0-experimental.a7a613a"
|
|
77
54
|
},
|
|
78
55
|
"bundlewatch": {
|
|
79
56
|
"defaultCompression": "gzip",
|
|
@@ -84,18 +61,19 @@
|
|
|
84
61
|
]
|
|
85
62
|
},
|
|
86
63
|
"scripts": {
|
|
87
|
-
"compile:js": "tsup --config build-scripts/tsup.config.
|
|
88
|
-
"compile:typedefs": "tsc -p ./tsconfig.declarations.json",
|
|
89
|
-
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
90
|
-
"publish-
|
|
64
|
+
"compile:js": "tsup --config build-scripts/tsup.config.package.ts",
|
|
65
|
+
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/@solana/build-scripts/add-js-extension-to-types.mjs",
|
|
66
|
+
"dev": "jest -c node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch",
|
|
67
|
+
"publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks",
|
|
68
|
+
"publish-packages": "pnpm prepublishOnly && pnpm publish-impl",
|
|
91
69
|
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
|
|
92
|
-
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
93
|
-
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
70
|
+
"test:lint": "jest -c node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent",
|
|
71
|
+
"test:prettier": "jest -c node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
|
|
94
72
|
"test:treeshakability:browser": "agadoo dist/index.browser.js",
|
|
95
73
|
"test:treeshakability:native": "agadoo dist/index.native.js",
|
|
96
74
|
"test:treeshakability:node": "agadoo dist/index.node.js",
|
|
97
75
|
"test:typecheck": "tsc --noEmit",
|
|
98
|
-
"test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
|
|
99
|
-
"test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
|
|
76
|
+
"test:unit:browser": "jest -c node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent",
|
|
77
|
+
"test:unit:node": "jest -c node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent"
|
|
100
78
|
}
|
|
101
79
|
}
|