Skip to content

Releases: 0xSplits/splits-sdk

v5.0.0

12 Feb 18:59
Compare
Choose a tag to compare

v4 --> v5 Migration Guide

What's Changed

  • A new version of the Split contracts (v2.1) have been launched, including new factories. No changes are needed to start using the new contracts. Calling SplitV2Client.createSplit(args) will now create a v2.1 Split instead of a v2 Split. The only difference in the contracts are that the v2 Split could not properly handle non-compliant ERC20 tokens (e.g. USDT on mainnet). The v2.1 Split can handle those tokens. The other functions (i.e. distribute) will also work with no changes, and they will work for both v2 Splits and v2.1 Splits. For more information see here.
  • Splits Kit v1 has launched. It is a wrapper around the Splits React SDK, providing easy React components to plug into your application. It currently supports a CreateSplit component and a DisplaySplit component. Documentation is here, you can see the components being used at Splits Lite which is a publicly available repo.
  • Dropped support for viem v1. All three packages (splits-sdk, splits-sdk-react, and splits-kit) require viem v2.

Breaking Changes

  • Need to upgrade to viem v2 if you are using v1. See here.
  • All data hooks in the react sdk now have the same return values: isLoading, data, status, error. The hooks that were specifically changed: useSplitMetadataViaProvider, useSplitMetadata, useSplitEarnings, useContractEarnings, useLiquidSplitMetadata, useSwapperMetadata, useUserEarnings, useUserEarningsByContract, useVestingMetadata, useWaterfallMetadata.
  • All data hooks should just take in the required args, and then an optional options dictionary. Any optional args now go into that dictionary. The updated hooks: useSplitEarnings, useContractEarnings.
  • Added _ to the start of all the submit functions. They are not meant to be called directly, so added an underscore to make that more clear.

Full Changelog: https://github.com/0xSplits/splits-sdk/compare/@0xsplits/[email protected]...@0xsplits/[email protected]

v4.1.1

22 Jan 22:17
Compare
Choose a tag to compare

What's Changed

Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/[email protected]

v4.0.5

10 Jul 18:29
Compare
Choose a tag to compare

v4.0.4

03 Jul 22:01
Compare
Choose a tag to compare

@0xsplits/[email protected]

24 Jun 18:41
Compare
Choose a tag to compare

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/[email protected]

@0xsplits/[email protected]

10 May 00:29
Compare
Choose a tag to compare

What's Changed

Full Changelog: https://github.com/0xSplits/splits-sdk/compare/@0xsplits/[email protected]...@0xsplits/[email protected]

v4.0.0

08 May 19:30
Compare
Choose a tag to compare

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:

  1. 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.
  2. The formatted earnings functions/hooks have been removed. If you were using any of the formatted functions/hooks before (e.g. getFormattedSplitEarnings or useFormattedUserEarnings), you can just use the regular version now (e.g. getSplitEarnings or useUserEarnings) 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
}
  1. 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 or import { SplitV1Client } from '@0xsplits/splits-sdk'
  2. 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.
  3. 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:

  1. 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.
  2. Blast network is now supported
  3. The SDK now supports either Viem v1 or Viem v2.

v3.3.2

24 Apr 21:25
Compare
Choose a tag to compare

v3.3.1

07 Mar 20:06
Compare
Choose a tag to compare

What's Changed

  • Update zora & zora sepolia subgraph urls

Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/[email protected]

v3.3.0

06 Mar 17:59
Compare
Choose a tag to compare

What's Changed

Full Changelog: https://github.com/0xSplits/splits-sdk/commits/@0xsplits/[email protected]