All notable changes to this project will be documented in this file.
- Removes React@17 as a peer dependency. The build for React 17 host apps was failing due to the missing jsx-runtime export from React, which has been fixed in React 18.
- Renames
useSignTransaction
touseSignAndSendTransaction
. This marksuseSignTransaction
as deprecated with aconsole.info
to inform the developer of the upcoming breaking change in the next major version. - Fixes a bug in safari where the sign in / sign transaction popups were being blocked by default.
- Fixes
useSignMessage
to use bs58 encoding for transmission to the Fractal.is popup. This is an implementation detail, but fixes a bug whereuseSignMessage
only worked for utf-8 encoded strings and not serializedMessage
objects.
- Adds a
useSignMessage
hook for signing arbitrary messages. This differs fromuseSignTransaction
since it takes in a raw messageUint8Array
instead of a serializedTransaction
object and is mostly useful for callers that want to use the react-sdk to sign messages without sending anything to the network such that the caller can add subsequent signatures before sending it to the network.
- Uses custom
context
for all react query calls. This will allow consumers to use react query without having to worry about conflicting contexts used by the underlyingQueryClientProvider
within the SDK as well as the one that a consumer sets up in their app.
- Adds a
chain
field on exportedItem
andCoin
type.
- Adds hook for fiat onramp.
- Adds a bugfix for for-sale items not being removed from the client-side data cache when a user logs out.
- Adds 4 new hooks to help react-based web games create a marketplace through
our SDK:
useBuyItem
for buying an item from the marketplaceuseListItem
for listing an item on the marketplaceuseCancelListItem
for cancelling an item that is currently listed on the marketplaceuseItemsForSale
for fetching the list of items that are on sale on the marketplace (for the project that the auth token is scoped to).
- Adds 2 new hooks to detect when a transaction is posted:
useTransactionStatus
- given a transaction signature, this returns an updating status object.useWaitForTransactionStatus
- given a transaction signature, this hook returns an async function that returns promise whenever the transaction posts to the chain.
- Internal implementation for browser-side data caching was swapped out.
n/a