Skip to content

@filoz/synapse-react

Synapse React - Main Entry Point

import * as react from '@filoz/synapse-react'
InterfaceDescription
DataSetWithPiecesData set information returned from Warm Storage contract
SessionKeySignerOptionsOptions shared by the write hooks that can sign with a session key.
UploadedPieceA piece uploaded and added to the data set by useUploadPieces.
UploadPiecesFileProgressProgress of one file in useUploadPieces.
UseAccountInfoProps-
UseApproveAllowanceProps-
UseCreateDataSetPropsOptions shared by the write hooks that can sign with a session key.
UseCreateDataSetVariables-
UseDataSetsProps-
UseDeletePiecePropsOptions shared by the write hooks that can sign with a session key.
UseDeletePieceVariables-
UseDepositAndApproveProps-
UseDepositProps-
UseERC20BalanceProps-
UseFundWalletProps-
UseOperatorApprovalsProps-
UsePriceListPropsThe props for the usePriceList hook.
UseProvidersProps-
UseUploadPiecesPropsThe props for the useUploadPieces hook.
UseUploadPiecesResultThe result for the useUploadPieces mutation.
UseUploadPiecesVariablesThe variables for the useUploadPieces mutation.
UseUploadPropsOptions shared by the write hooks that can sign with a session key.
UseUploadSimplePropsOptions shared by the write hooks that can sign with a session key.
UseUploadSimpleVariables-
UseUploadVariables-
UseWatchUsdfcProps-
Type AliasDescription
ApproveOperatorProps-
RevokeOperatorProps-
UseApproveAllowanceVariables-
UseCreateDataSetResult-
UseDataSetsResultThe result for the useDataSets hook: data sets with their pieces, or without them when includePieces is false.
UseDepositAndApproveVariablesThe variables for the deposit and approve mutation.
UseDepositVariables-
UsePriceListResultThe result for the usePriceList hook.
UseProvidersResult-
UseWithdrawProps-
UseWithdrawVariables-
FunctionDescription
assertSessionKeyCheck that a session key can sign for the connected wallet: same chain, and its root is the connected account.
getSignerClientResolve the client that signs a write: the session key client when a session key is given, otherwise the connector client of the connected wallet.
useAccountInfoGet the account info from the payments contract.
useAddUsdfcAdd the USDFC token to the wallet.
useApproveAllowanceApprove the allowance of the ERC20 token to the payments contract.
useApproveOperatorApprove a service contract to act as an operator for payment rails.
useCreateDataSet-
useDataSetsGet the data sets of an address, optionally with their pieces.
useDeletePiece-
useDepositDeposit ERC20 tokens into the payments contract.
useDepositAndApproveDeposit and approve ERC20 tokens into the payments contract.
useERC20BalanceGet the balance and allowance of the ERC20 token.
useFundWalletFund the wallet with USDFC and FIL.
useOperatorApprovalsGet the operator approvals from the payments contract.
usePriceListGet the warm storage price list.
useProviders-
useRevokeOperatorRevoke the operator to deposit and withdraw ERC20 tokens from the payments contract.
useUpload-
useUploadPiecesUpload files to an existing data set with synapse-core only (SP.uploadPieces).
useUploadSimpleUpload files to a data set and add them in one request.
useWithdrawWithdraw ERC20 tokens from the payments contract.