Releases: 0xSplits/splits-sdk
v4.0.5
What's Changed
- Balance fix by @mihoward21 in #54
Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/splits-sdk@4.0.5
v4.0.4
What's Changed
- Fix earnings by @mihoward21 in #52
Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/splits-sdk@4.0.4
@0xsplits/splits-sdk@4.0.3
What's Changed
- PE-2201 optional public client arg on get earnings by @mihoward21 in #51
Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/splits-sdk@4.0.3
@0xsplits/splits-sdk@4.0.2
What's Changed
- fix: v1/v2 viem support for split v1 by @r0ohafza in #48
- Fix split v2 arbitrary allocations by @r0ohafza in #49
Full Changelog: https://github.com/0xSplits/splits-sdk/compare/@0xsplits/splits-sdk@4.0.0...@0xsplits/splits-sdk@4.0.2
v4.0.0
This major release marks the introduction of splits v2, for more information on v2 itself please refer to this article. This release has multiple breaking changes across our core SDK and React SDK.
With this release we have made a departure from the hosted service provided by The Graph and moved to an in house graphQL service. All previous versions of the SDK will become partially functional following the sunset of the hosted service by The Graph.
The new API for the SDK (Core and React) can be found in our docs.
The breaking changes from 3.x.x to 4.x.x are:
- viem has moved to a peer dependency. You will need to have it installed alongside the splits sdk, the sdk will no longer install it for you.
- The formatted earnings functions/hooks have been removed. If you were using any of the formatted functions/hooks before (e.g.
getFormattedSplitEarnings
oruseFormattedUserEarnings
), you can just use the regular version now (e.g.getSplitEarnings
oruseUserEarnings
) and you'll receive back the same data. If you are using any of the regular earnings functions, the returned data will now be in a new format. That means instead of getting just the raw value as a bigint, you'll now receive a dictionary of the form:
{
rawAmount: bigint
symbol: string
decimals: number
formattedAmount: string
}
- The main SplitsClient no longer has any functionality directly tied to it. You'll need to access the appropriate client to perform any functions. If you want access to the Splits V1 functions, you can use
(new SplitsClient(...)).splitV1
orimport { SplitV1Client } from '@0xsplits/splits-sdk'
- All data fetching from the new subgraph runs through the DataClient now. Any fetching of metadata or earnings will be done off of that client.
- Supported networks in 4.0.0 are: [Mainnet, Polygon, Optimism, Base, Zora, Arbitrum, BSC, xDAI, Blast, Sepolia, Holesky, Zora Sepolia, Base Sepolia, Optimism Sepolia].
Some changes to highlight in 4.0.0 that are not breaking changes:
- Splits v2 support! The SplitV2Client and WarehouseClient have all the functionality needed to interact with the new Splits v2 contracts. Checkout the blog post for more details.
- Blast network is now supported
- The SDK now supports either Viem v1 or Viem v2.
v3.3.2
What's Changed
Full Changelog: https://github.com/0xSplits/splits-sdk/compare/@0xsplits/splits-sdk@3.3.1...@0xsplits/splits-sdk@3.3.2
v3.3.1
What's Changed
- Update zora & zora sepolia subgraph urls
Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/splits-sdk@3.3.1
v3.3.0
What's Changed
- Increased chain support by @mihoward21 in #27
Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/splits-sdk@3.3.0
v3.2.7
What's Changed
- add sepolia support for all contracts by @mihoward21 in #25
- fix recoup and diversifier addresses for sepolia by @mihoward21 in #26
Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/splits-sdk@3.2.7
v3.2.5
What's Changed
Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/splits-sdk@3.2.5