-
Notifications
You must be signed in to change notification settings - Fork 845
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/babel/plugin-trans…
…form-private-property-in-object-7.24.1
- Loading branch information
Showing
199 changed files
with
7,973 additions
and
6,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
'@solana/codecs-data-structures': patch | ||
'@solana/codecs-strings': patch | ||
'@solana/transactions': patch | ||
'@solana/codecs-core': patch | ||
'@solana/addresses': patch | ||
'@solana/rpc-types': patch | ||
'@solana/options': patch | ||
--- | ||
|
||
Renamed `mapCodec` to `transformCodec` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
'@solana/codecs-core': patch | ||
'@solana/errors': patch | ||
--- | ||
|
||
Added new `addCodecSentinel` primitive | ||
|
||
The `addCodecSentinel` function provides a new way of delimiting the size of a codec. It allows us to add a sentinel to the end of the encoded data and to read until that sentinel is found when decoding. It accepts any codec and a `Uint8Array` sentinel responsible for delimiting the encoded data. | ||
|
||
```ts | ||
const codec = addCodecSentinel(getUtf8Codec(), new Uint8Array([255, 255])); | ||
codec.encode('hello'); | ||
// 0x68656c6c6fffff | ||
// | └-- Our sentinel. | ||
// └-- Our encoded string. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@solana/programs": patch | ||
--- | ||
|
||
Remove program types and `resolveTransactionError` helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@solana/programs": patch | ||
--- | ||
|
||
Add `isProgramError` helper function to `@solana/programs` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
'@solana/codecs-data-structures': patch | ||
'@solana/errors': patch | ||
--- | ||
|
||
Added `useValuesAsDiscriminators` option to `getEnumCodec` | ||
|
||
When dealing with numerical enums that have explicit values, you may now use the `useValuesAsDiscriminators` option to encode the value of the enum variant instead of its index. | ||
|
||
```ts | ||
enum Numbers { | ||
One, | ||
Five = 5, | ||
Six, | ||
Nine = 9, | ||
} | ||
|
||
const codec = getEnumCodec(Numbers, { useValuesAsDiscriminators: true }); | ||
codec.encode(Direction.One); // 0x00 | ||
codec.encode(Direction.Five); // 0x05 | ||
codec.encode(Direction.Six); // 0x06 | ||
codec.encode(Direction.Nine); // 0x09 | ||
``` | ||
|
||
Note that when using the `useValuesAsDiscriminators` option on an enum that contains a lexical value, an error will be thrown. | ||
|
||
```ts | ||
enum Lexical { | ||
One, | ||
Two = 'two', | ||
} | ||
getEnumCodec(Lexical, { useValuesAsDiscriminators: true }); // Throws an error. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@solana/codecs-data-structures': patch | ||
--- | ||
|
||
The `getBooleanCodec` function now accepts variable-size number codecs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@solana/ws-impl": patch | ||
--- | ||
|
||
Use native `WebSocket` for compatibility with server runtimes that support it, like Deno |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.