-
#236
ca1d4ec
Thanks @steveluscher! - The minimum TypeScript version is now 5.3.3 -
Updated dependencies [
ca1d4ec
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
-
1adf435
Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theengines
field, including the one in the root of thepnpm
workspace, and engine-strictness is delegated to the.npmrc
files. -
Updated dependencies [
1adf435
,c7b7dd9
,5af7f20
,704d8a2
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
-
#2434
31916ae
Thanks @lorisleiva! - RenamedmapCodec
totransformCodec
-
#2397
a548de2
Thanks @lorisleiva! - Added a newaddCodecSizePrefix
primitiveconst codec = addCodecSizePrefix(getBase58Codec(), getU32Codec()); codec.encode('hello world'); // 0x0b00000068656c6c6f20776f726c64 // | └-- Our encoded base-58 string. // └-- Our encoded u32 size prefix.
-
3bf31e7
Thanks @steveluscher! - Converting a base16 string to a byte buffer is now between 2-3x faster (Thanks @tibi77!) -
#2413
002cc38
Thanks @lorisleiva! - RemovedgetStringCodec
in favour offixCodecSize
andaddCodecSizePrefix
The
getStringCodec
function now always returns aVariableSizeCodec
that uses as many bytes as necessary to encode and/or decode strings. In order to fix or prefix the size of agetStringCodec
, you may now use thefixCodecSize
orprefixCodecSide
accordingly. Here are some examples:// Before. getStringCodec({ size: 'variable' }); // Variable. getStringCodec({ encoding: getUtf8Codec(), size: 'variable' }); // Variable (equivalent). getStringCodec({ size: 5 }); // Fixed. getStringCodec({ encoding: getUtf8Codec(), size: 5 }); // Fixed (equivalent). getStringCodec(); // Prefixed. getStringCodec({ encoding: getUtf8Codec(), size: getU32Codec() }); // Prefixed (equivalent). // After. getUtf8Codec(); // Variable. fixCodecSize(getUtf8Codec(), 5); // Fixed. addCodecSizePrefix(getUtf8Codec(), getU32Codec()); // Prefixed.
-
#3541
135dc5a
Thanks @steveluscher! - Drop the Release Candidate label and publish@solana/web3.js
at version 2.0.0 -
#2411
2e5af9f
Thanks @lorisleiva! - RenamedfixCodec
tofixCodecSize
-
#2606
367b8ad
Thanks @lorisleiva! - Use commonjs package type -
#3137
fd72c2e
Thanks @mcintyre94! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition ofedge-light
andworkerd
to the package exports. -
Updated dependencies [
9370133
,31916ae
,a548de2
,ff4aff6
,89f399d
,ebb03cd
,ce1be3f
,82cf07f
,2d54650
,135dc5a
,bef9604
,7e86583
,4f19842
,677a9c4
,38faba0
,2e5af9f
,2798061
,be36bab
,288029a
,4ae78f5
,478443f
,367b8ad
,fd72c2e
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
- Updated dependencies [
2798061
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
- Updated dependencies []:
- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
-
#3137
fd72c2e
Thanks @mcintyre94! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition ofedge-light
andworkerd
to the package exports. -
Updated dependencies [
38faba0
,fd72c2e
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
- Updated dependencies []:
- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
- Updated dependencies [
677a9c4
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
-
3bf31e7
Thanks @steveluscher! - Converting a base16 string to a byte buffer is now between 2-3x faster (Thanks @tibi77!) -
#2606
367b8ad
Thanks @lorisleiva! - Use commonjs package type -
Updated dependencies [
4f19842
,be36bab
,367b8ad
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
-
#2434
31916ae
Thanks @lorisleiva! - RenamedmapCodec
totransformCodec
-
#2397
a548de2
Thanks @lorisleiva! - Added a newaddCodecSizePrefix
primitiveconst codec = addCodecSizePrefix(getBase58Codec(), getU32Codec()); codec.encode('hello world'); // 0x0b00000068656c6c6f20776f726c64 // | └-- Our encoded base-58 string. // └-- Our encoded u32 size prefix.
-
#2413
002cc38
Thanks @lorisleiva! - RemovedgetStringCodec
in favour offixCodecSize
andaddCodecSizePrefix
The
getStringCodec
function now always returns aVariableSizeCodec
that uses as many bytes as necessary to encode and/or decode strings. In order to fix or prefix the size of agetStringCodec
, you may now use thefixCodecSize
orprefixCodecSide
accordingly. Here are some examples:// Before. getStringCodec({ size: 'variable' }); // Variable. getStringCodec({ encoding: getUtf8Codec(), size: 'variable' }); // Variable (equivalent). getStringCodec({ size: 5 }); // Fixed. getStringCodec({ encoding: getUtf8Codec(), size: 5 }); // Fixed (equivalent). getStringCodec(); // Prefixed. getStringCodec({ encoding: getUtf8Codec(), size: getU32Codec() }); // Prefixed (equivalent). // After. getUtf8Codec(); // Variable. fixCodecSize(getUtf8Codec(), 5); // Fixed. addCodecSizePrefix(getUtf8Codec(), getU32Codec()); // Prefixed.
-
#2411
2e5af9f
Thanks @lorisleiva! - RenamedfixCodec
tofixCodecSize
-
Updated dependencies [
9370133
,31916ae
,a548de2
,ff4aff6
,89f399d
,ebb03cd
,ce1be3f
,82cf07f
,2d54650
,bef9604
,7e86583
,2e5af9f
,288029a
,4ae78f5
,478443f
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]
-
The first Technology Preview of
@solana/web3.js
2.0 was released at the Breakpoint conference in November 2023. Based on your feedback, we want to get a second version of it into your hands now with some changes, bug fixes, and new features.To install the second Technology Preview:
npm install --save @solana/web3.js@tp2
Most notably, this release integrates with the new JavaScript client generator for on-chain programs. Instruction creators and account decoders can now be autogenerated for any program, including your own! Read more here, and check out the growing list of autogenerated core programs here.
Try a demo of Technology Preview 2 in your browser at https://sola.na/web3tp2demo.
- Renamed
Base58EncodedAddress
toAddress
(#1814) 63683a4bc - Renamed
Ed25519Signature
andTransactionSignature
toSignatureBytes
andSignature
(#1815) 205c09268 - Fixed return type of
getSignaturesForAddress
(#1821) 36c7263bd signTransaction
now asserts that the transaction is fully signed; addedpartiallySignTransaction
that does not (#1820) 7d54c2dad- The
@solana/webcrypto-ed25519-polyfill
now sets thecrypto
global in Node 17a54d24a - Added
assertIsBlockhashLifetimeTransaction
that asserts transaction has a blockhash lifetime (#1908) ae94ca38d - Added a
createPrivateKeyFromBytes
helper (#1913) 85b7dfe13 - Added
@solana/accounts
; types and helper methods for representing, fetching and decoding Solana accounts (#1855) e1ca3966e - Export the TransactionError type (#1964) 4c009bf5b
- Export all RPC method XApi types from
@solana/rpc-core
(#1965) ed98b3d9c - Added a generic
createJsonRpcApi
function for custom APIs 1e2106f21 - Added a generic
createJsonRpcSubscriptionsApi
function for custom APIs ae3f1f087 - RPC commitment now defaults to
confirmed
when not explicitly specified cb7702ca5 - Added
ClusterUrl
types and handlers (#2084) 61f7ba0 - RPC transports can now be cluster-specific, ie.
RpcDevnet<TRpcMethods>
&RpcSubscriptionsDevnet<TRpcMethods>
(#2053) e58bb22, (#2056) cbf8f38 - RPC APIs can now be cluster-specific, ie.
SolanaRpcMethodsDevnet
(#2054) 5175d8a - Added cluster-level RPC support for
@solana/web3.js
(#2055) 5a6335d, (#2058) 0e03ca9 - Added
@solana/signers
; an abstraction layer over signing messages and transactions in Solana (#1710) 7c29a1e - Updated codec such that only one instance of
Uint8Array
is created when encoding data. This allowsEncoders
to set data at different offsets and therefore enables non-linear serialization (#1865) 7800e3b - Added
FixedSize*
andVariableSize*
type variants forCodecs
,Encoders
andDecoders
(#1883) 5e58d5c - Repaired some inaccurate RPC method signatures (#2137) bb65ba9
- Renamed transaction/airdrop sender factories with the ‘Factory’ suffix (#2130) 2d1d49c
- All code now throws coded exceptions defined in
@solana/errors
which can be refined usingisSolanaError()
and decoded in production usingnpx @solana/errors decode
(#2160) 3524f2c, (#2161) 94944b, (#2213) 8541c2e, (#2220) c9b2705, (#2207) 75a18e3, (#2224) 613053d, (#2226) 94fee67, (#2228) 483c674, (#2235) 803b2d8, (#2236) cf9c20c, (#2242) 9084fdd, (#2245) e374ac6, (#2186) 546263e, (#2187) bea19d2, (#2188) 2e0ae95, (#2189) 7712fc3, (#2190) 7d67615, (#2191) 0ba8f21, (#2192) 91a360d, (#2202) a71a2db, (#2286) 52a5d3d, and more - You can now supply a custom Undici dispatcher for use with the
fetch
API when creating an RPC transport in Node (#2178) a2fc5a3 - Added functions to assert a value is an
IInstructionWithAccounts
and IInstructionWithData` (#2212) 07c30c1 - Added a function to assert an instruction is for a given program (#2234) fb655dd
- You can now create an RPC using only a URL (#2238) cd0b6c6, (#2239) fc11993
- You can now resize codec with the
resizeCodec
helper (#2293) 606de63 - You can now skip bytes while writing byte buffers using the
offsetCodec
helper (#2294) 09d8cc8 - You can now now pad the beginning or end of byte buffers using the
padLeftCodec
andpadRightCodec
helpers (#2314) f9509c7 - Added a new
@solana/sysvars
package for fetching, decoding, and building transactions with sysvar accounts (#2041)
- Renamed
-
Updated dependencies [
0546a8c
]:- @solana/[email protected]
- @solana/[email protected]
- @solana/[email protected]