v0.3.0
This release focuses on streamlining channel creation, improving API consistency, and adding support for modern signature standards.
Changelog
Nitrolite SDK
- Replaced an optional NitroliteClient
stateWalletClientfield with a requiredStateSignerinterface to handle state signing operations (viasignState(channelId, state)). - Added
WalletStateSigner(using viem'sWalletClient) andSessionStateSigner(using raw private key account) classes to provide convenient implementations of theStateSignerinterface. - Updated
CreateChannel(...)method parameters to support the improved channel creation flow. - Standardized the request types in all Clearnode API methods, so that now
paramsis an object instead of an array. This improves type safety and clarity. - Standardized
CreateChannel,CloseChannel, andResizeChannelmethod response types. - Changed the
Signaturetype from{r, s, v}struct toHex. - Added pagination types and parameters for requests to ClearNode pagination-supporting endpoints.
Clearnode API
- Added
create_channelmethod to facilitate the improved, single-transaction channel opening flow. The response includes theChannelandStatestructs, alongside with theserverSignaturefor the initial state. - Standardized the request structure in all Clearnode API methods, so that now
paramsis an object instead of an array. This improves type safety and clarity. - Standardized
create_channel,close_channel, andresize_channelmethod responses. - Added
metadatastruct to theget_channels,get_app_sessions,get_ledger_entries, andget_ledger_transactionsmethod responses to provide additional pagination information: current page, number of items per page, total pages, and total items.
The v0.3.0 API documentation can be found in the API docs of the ClearNode.
Smart Contract
- Channels can now become operational immediately after the
create(...)method call if all participant signatures are provided. In such case, the funds of all participants other than thee sender ("creator") are transferred from the respective address specified inparticipantsarray. - Changed the
Signaturetype from{r, s, v}struct tobytes. - Added
EIP712AdjudicatorBaseto support EIP-712 typed structured data signatures in Adjudicator contracts. - Added support for EIP-191, EIP-712, EIP-1271, and EIP-6492 signatures.