@solana/codecs-data-structures 2.0.0-rc.0 → 2.0.0-rc.1
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 +5 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
[code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
|
|
8
8
|
[code-style-prettier-url]: https://github.com/prettier/prettier
|
|
9
|
-
[npm-downloads-image]: https://img.shields.io/npm/dm/@solana/codecs-data-structures/
|
|
10
|
-
[npm-image]: https://img.shields.io/npm/v/@solana/codecs-data-structures/
|
|
11
|
-
[npm-url]: https://www.npmjs.com/package/@solana/codecs-data-structures/v/
|
|
9
|
+
[npm-downloads-image]: https://img.shields.io/npm/dm/@solana/codecs-data-structures/rc.svg?style=flat
|
|
10
|
+
[npm-image]: https://img.shields.io/npm/v/@solana/codecs-data-structures/rc.svg?style=flat
|
|
11
|
+
[npm-url]: https://www.npmjs.com/package/@solana/codecs-data-structures/v/rc
|
|
12
12
|
[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
|
|
13
13
|
[semantic-release-url]: https://github.com/semantic-release/semantic-release
|
|
14
14
|
|
|
15
15
|
# @solana/codecs-data-structures
|
|
16
16
|
|
|
17
|
-
This package contains codecs for various data structures such as arrays, maps, structs, tuples, enums, etc. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@
|
|
17
|
+
This package contains codecs for various data structures such as arrays, maps, structs, tuples, enums, etc. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK [`@solana/web3.js@rc`](https://github.com/solana-labs/solana-web3.js/tree/master/packages/library).
|
|
18
18
|
|
|
19
19
|
This package is also part of the [`@solana/codecs` package](https://github.com/solana-labs/solana-web3.js/tree/master/packages/codecs) which acts as an entry point for all codec packages as well as for their documentation.
|
|
20
20
|
|
|
@@ -574,7 +574,7 @@ codecWithCustomNoneValue.encode(42); // 0x2a00
|
|
|
574
574
|
codecWithCustomNoneValue.encode(null); // 0xff
|
|
575
575
|
```
|
|
576
576
|
|
|
577
|
-
Finally, note that if `prefix` is set to `null` and no `noneValue` is provided, the codec
|
|
577
|
+
Finally, note that if `prefix` is set to `null` and no `noneValue` is provided, the codec assumes that the item exists if and only if some remaining bytes are available to decode. This could be useful to describe data structures that may or may not have additional data to the end of the buffer.
|
|
578
578
|
|
|
579
579
|
```ts
|
|
580
580
|
const codec = getNullableCodec(getU16Codec(), { prefix: null });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana/codecs-data-structures",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.1",
|
|
4
4
|
"description": "Codecs for various data structures",
|
|
5
5
|
"exports": {
|
|
6
6
|
"browser": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"node": ">=17.4"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@solana/codecs-numbers": "2.0.0-rc.
|
|
53
|
-
"@solana/
|
|
54
|
-
"@solana/
|
|
52
|
+
"@solana/codecs-numbers": "2.0.0-rc.1",
|
|
53
|
+
"@solana/errors": "2.0.0-rc.1",
|
|
54
|
+
"@solana/codecs-core": "2.0.0-rc.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"typescript": ">=5"
|