Skip to content

@filoz/synapse-react

Synapse React - Main Entry Point

import * as react from '@filoz/synapse-react'
Interface Description
DataSetWithPieces Data set information returned from Warm Storage contract
SessionKeySignerOptions Options shared by the write hooks that can sign with a session key.
UploadedPiece A piece uploaded and added to the data set by useUploadPieces.
UploadPiecesFileProgress Progress of one file in useUploadPieces.
UseAccountInfoProps -
UseApproveAllowanceProps -
UseCreateDataSetProps Options shared by the write hooks that can sign with a session key.
UseCreateDataSetVariables -
UseDataSetsProps -
UseDeletePieceProps Options shared by the write hooks that can sign with a session key.
UseDeletePieceVariables -
UseDepositAndApproveProps -
UseDepositProps -
UseERC20BalanceProps -
UseFundWalletProps -
UseOperatorApprovalsProps -
UsePriceListProps The props for the usePriceList hook.
UseProvidersProps -
UseUploadPiecesProps The props for the useUploadPieces hook.
UseUploadPiecesResult The result for the useUploadPieces mutation.
UseUploadPiecesVariables The variables for the useUploadPieces mutation.
UseUploadProps Options shared by the write hooks that can sign with a session key.
UseUploadSimpleProps Options shared by the write hooks that can sign with a session key.
UseUploadSimpleVariables -
UseUploadVariables -
UseWatchUsdfcProps -
Type Alias Description
ApproveOperatorProps -
RevokeOperatorProps -
UseApproveAllowanceVariables -
UseCreateDataSetResult -
UseDataSetsResult The result for the useDataSets hook: data sets with their pieces, or without them when includePieces is false.
UseDepositAndApproveVariables The variables for the deposit and approve mutation.
UseDepositVariables -
UsePriceListResult The result for the usePriceList hook.
UseProvidersResult -
UseWithdrawProps -
UseWithdrawVariables -
Function Description
assertSessionKey Check that a session key can sign for the connected wallet: same chain, and its root is the connected account.
getSignerClient Resolve the client that signs a write: the session key client when a session key is given, otherwise the connector client of the connected wallet.
useAccountInfo Get the account info from the payments contract.
useAddUsdfc Add the USDFC token to the wallet.
useApproveAllowance Approve the allowance of the ERC20 token to the payments contract.
useApproveOperator Approve a service contract to act as an operator for payment rails.
useCreateDataSet -
useDataSets Get the data sets of an address, optionally with their pieces.
useDeletePiece -
useDeposit Deposit ERC20 tokens into the payments contract.
useDepositAndApprove Deposit and approve ERC20 tokens into the payments contract.
useERC20Balance Get the balance and allowance of the ERC20 token.
useFundWallet Fund the wallet with USDFC and FIL.
useOperatorApprovals Get the operator approvals from the payments contract.
usePriceList Get the warm storage price list.
useProviders -
useRevokeOperator Revoke the operator to deposit and withdraw ERC20 tokens from the payments contract.
useUpload -
useUploadPieces Upload files to an existing data set with synapse-core only (SP.uploadPieces).
useUploadSimple Upload files to a data set and add them in one request.
useWithdraw Withdraw ERC20 tokens from the payments contract.