Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stakekit/api-hooks

Package Overview
Dependencies
Maintainers
5
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stakekit/api-hooks - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

dist/esm/index.js.map

39

dist/index.d.ts
import * as _tanstack_react_query from '@tanstack/react-query';
import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions, QueryClient, QueryClientConfig } from '@tanstack/react-query';
import { PropsWithChildren } from 'react';
import React, { PropsWithChildren } from 'react';
import { AxiosInstance } from 'axios';

@@ -1526,3 +1526,3 @@

declare const getStakeYieldOpportunitiesQueryKey: () => readonly ["/v1/stake/opportunities"];
declare const getStakeYieldOpportunitiesQueryOptions: <TData = YieldOpportunityDto[], TError = unknown>(options?: {
declare const useStakeYieldOpportunitiesQueryOptions: <TData = YieldOpportunityDto[], TError = unknown>(options?: {
query?: UseQueryOptions<YieldOpportunityDto[], TError, TData, QueryKey> | undefined;

@@ -1545,3 +1545,3 @@ } | undefined) => UseQueryOptions<YieldOpportunityDto[], TError, TData, QueryKey> & {

declare const getStakeYieldOpportunityQueryKey: (integrationId: string) => readonly [`/v1/stake/opportunities/${string}`];
declare const getStakeYieldOpportunityQueryOptions: <TData = YieldOpportunityDto, TError = unknown>(integrationId: string, options?: {
declare const useStakeYieldOpportunityQueryOptions: <TData = YieldOpportunityDto, TError = unknown>(integrationId: string, options?: {
query?: UseQueryOptions<YieldOpportunityDto, TError, TData, QueryKey> | undefined;

@@ -1564,3 +1564,3 @@ } | undefined) => UseQueryOptions<YieldOpportunityDto, TError, TData, QueryKey> & {

declare const getStakeGetValidatorsQueryKey: (integrationId: string) => readonly [`/v1/stake/validators/${string}`];
declare const getStakeGetValidatorsQueryOptions: <TData = ValidatorDto[], TError = unknown>(integrationId: string, options?: {
declare const useStakeGetValidatorsQueryOptions: <TData = ValidatorDto[], TError = unknown>(integrationId: string, options?: {
query?: UseQueryOptions<ValidatorDto[], TError, TData, QueryKey> | undefined;

@@ -1583,3 +1583,3 @@ } | undefined) => UseQueryOptions<ValidatorDto[], TError, TData, QueryKey> & {

declare const getStakeGetStakeSessionQueryKey: (stakeId: string) => readonly [`/v1/stake/${string}`];
declare const getStakeGetStakeSessionQueryOptions: <TData = StakeDto, TError = unknown>(stakeId: string, options?: {
declare const useStakeGetStakeSessionQueryOptions: <TData = StakeDto, TError = unknown>(stakeId: string, options?: {
query?: UseQueryOptions<StakeDto, TError, TData, QueryKey> | undefined;

@@ -1601,3 +1601,3 @@ } | undefined) => UseQueryOptions<StakeDto, TError, TData, QueryKey> & {

declare const stakeEnter: (stakeRequestDto: StakeRequestDto) => Promise<StakeDto>;
declare const getStakeEnterMutationOptions: <TError = unknown, TContext = unknown>(options?: {
declare const useStakeEnterMutationOptions: <TError = unknown, TContext = unknown>(options?: {
mutation?: UseMutationOptions<StakeDto, TError, {

@@ -1624,3 +1624,3 @@ data: StakeRequestDto;

declare const stakeExit: (stakeRequestDto: StakeRequestDto) => Promise<StakeDto>;
declare const getStakeExitMutationOptions: <TError = unknown, TContext = unknown>(options?: {
declare const useStakeExitMutationOptions: <TError = unknown, TContext = unknown>(options?: {
mutation?: UseMutationOptions<StakeDto, TError, {

@@ -1647,3 +1647,3 @@ data: StakeRequestDto;

declare const stakePendingActions: (pendingActionRequestDto: PendingActionRequestDto) => Promise<StakeDto>;
declare const getStakePendingActionsMutationOptions: <TError = unknown, TContext = unknown>(options?: {
declare const useStakePendingActionsMutationOptions: <TError = unknown, TContext = unknown>(options?: {
mutation?: UseMutationOptions<StakeDto, TError, {

@@ -1670,3 +1670,3 @@ data: PendingActionRequestDto;

declare const stakeGetBalances: (integrationId: string, yieldBalanceRequestDto: YieldBalanceRequestDto) => Promise<YieldBalanceDto[]>;
declare const getStakeGetBalancesMutationOptions: <TError = unknown, TContext = unknown>(options?: {
declare const useStakeGetBalancesMutationOptions: <TError = unknown, TContext = unknown>(options?: {
mutation?: UseMutationOptions<YieldBalanceDto[], TError, {

@@ -1698,3 +1698,3 @@ integrationId: string;

declare const getTransactionGetTransactionQueryKey: (transactionId: string) => readonly [`/v1/transaction/${string}`];
declare const getTransactionGetTransactionQueryOptions: <TData = TransactionDto, TError = unknown>(transactionId: string, options?: {
declare const useTransactionGetTransactionQueryOptions: <TData = TransactionDto, TError = unknown>(transactionId: string, options?: {
query?: UseQueryOptions<TransactionDto, TError, TData, QueryKey> | undefined;

@@ -1716,3 +1716,3 @@ } | undefined) => UseQueryOptions<TransactionDto, TError, TData, QueryKey> & {

declare const transactionConstruct: (transactionId: string, constructTransactionRequestDto: ConstructTransactionRequestDto) => Promise<TransactionDto>;
declare const getTransactionConstructMutationOptions: <TError = unknown, TContext = unknown>(options?: {
declare const useTransactionConstructMutationOptions: <TError = unknown, TContext = unknown>(options?: {
mutation?: UseMutationOptions<TransactionDto, TError, {

@@ -1743,3 +1743,3 @@ transactionId: string;

declare const transactionSubmit: (transactionId: string, submitRequestDto: SubmitRequestDto) => Promise<SubmitResponseDto>;
declare const getTransactionSubmitMutationOptions: <TError = unknown, TContext = unknown>(options?: {
declare const useTransactionSubmitMutationOptions: <TError = unknown, TContext = unknown>(options?: {
mutation?: UseMutationOptions<SubmitResponseDto, TError, {

@@ -1770,3 +1770,3 @@ transactionId: string;

declare const transactionSubmitHash: (transactionId: string, submitHashRequestDto: SubmitHashRequestDto) => Promise<void>;
declare const getTransactionSubmitHashMutationOptions: <TError = unknown, TContext = unknown>(options?: {
declare const useTransactionSubmitHashMutationOptions: <TError = unknown, TContext = unknown>(options?: {
mutation?: UseMutationOptions<void, TError, {

@@ -1798,3 +1798,3 @@ transactionId: string;

declare const getTransactionGetTransactionStatusFromIdQueryKey: (transactionId: string) => readonly [`/v1/transaction/${string}/status`];
declare const getTransactionGetTransactionStatusFromIdQueryOptions: <TData = TransactionStatusResponseDto, TError = unknown>(transactionId: string, options?: {
declare const useTransactionGetTransactionStatusFromIdQueryOptions: <TData = TransactionStatusResponseDto, TError = unknown>(transactionId: string, options?: {
query?: UseQueryOptions<TransactionStatusResponseDto, TError, TData, QueryKey> | undefined;

@@ -1817,3 +1817,3 @@ } | undefined) => UseQueryOptions<TransactionStatusResponseDto, TError, TData, QueryKey> & {

declare const getTransactionGetGasForNetworkQueryKey: (network: string) => readonly [`/v1/transaction/gas/${string}`];
declare const getTransactionGetGasForNetworkQueryOptions: <TData = GasForNetworkResponseDto, TError = unknown>(network: string, options?: {
declare const useTransactionGetGasForNetworkQueryOptions: <TData = GasForNetworkResponseDto, TError = unknown>(network: string, options?: {
query?: UseQueryOptions<GasForNetworkResponseDto, TError, TData, QueryKey> | undefined;

@@ -1867,8 +1867,9 @@ } | undefined) => UseQueryOptions<GasForNetworkResponseDto, TError, TData, QueryKey> & {

declare const useQueryClient: () => QueryClient;
declare const QueryProvider: ({ children }: PropsWithChildren) => JSX.Element;
declare const StakeKitContext: React.Context<QueryClient | undefined>;
declare const useStakeKitQueryClient: () => QueryClient;
declare const StakeKitQueryProvider: ({ children }: PropsWithChildren) => JSX.Element;
declare class APIManager {
private static axiosInstance;
private static queryClient;
static queryClient: QueryClient | null;
private constructor();

@@ -1885,2 +1886,2 @@ static configure({ apiKey, baseURL, queryClientConfig, }: {

export { APIManager, AddressArgumentsDto, AddressWithTokenDto, AddressesDto, AmountArgumentOptionsDto, ApeNativeArgumentOptionsDto, ApeNativeArgumentsDto, ArgumentOptionsDto, AuthConfirmEmailDto, AuthEmailLoginDto, AuthEmailLoginResponseDto, AuthForgotPasswordDto, AuthGoogleLoginDto, AuthResetPasswordDto, AuthUpdateDto, AuthUpdateDtoOldPassword, BalanceResponseDto, BalanceTypes, BalancesRequestDto, BinanceAdditionalAddressesStakeArgumentOptionsDto, ConfirmUserMeDto, ConstructTransactionRequestDto, ConstructTransactionRequestDtoGasArgs, CosmosAdditionalAddressesDto, CosmosGasArgsDto, CreateKeyDto, CreatePayoutAddressDto, CreateProjectDto, CreateTeamDto, CreateTeamDtoContactDetails, CreateTeamDtoUser, CreateUserDto, DurationArgumentOptionsDto, EvmEIP1559GasArgsDto, EvmEIP1559GasArgsDtoType, EvmLegacyGasArgsDto, EvmLegacyGasArgsDtoType, GasEstimateDto, GasForNetworkResponseDto, GasMode, GasModeValueDto, GasModeValueDtoGasArgs, GasModesDto, InfinityPaginatedDto, InfinityPaginatedDtoData, Key, KeyDeletedAt, Networks, PayoutAddressDto, PendingActionArgumentsDto, PendingActionDto, PendingActionRequestDto, PriceRequestDto, PriceResponseDto, Project, ProjectDeletedAt, QueryProvider, RequiredArgumentDto, RequiredArgumentWithNetworkDto, RequiredArgumentWithNetworkDtoNetwork, RewardClaiming, RewardSchedule, Role, StakeArgumentOptionsDto, StakeArgumentResponseDto, StakeArgumentsDto, StakeDto, StakeEnterMutationBody, StakeEnterMutationError, StakeEnterMutationResult, StakeExitMutationBody, StakeExitMutationError, StakeExitMutationResult, StakeGetBalancesMutationBody, StakeGetBalancesMutationError, StakeGetBalancesMutationResult, StakeGetStakeSessionQueryError, StakeGetStakeSessionQueryResult, StakeGetValidatorsQueryError, StakeGetValidatorsQueryResult, StakePendingActionsMutationBody, StakePendingActionsMutationError, StakePendingActionsMutationResult, StakeRequestDto, StakeSessionTypes, StakeStatus, StakeYieldOpportunitiesQueryError, StakeYieldOpportunitiesQueryResult, StakeYieldOpportunityQueryError, StakeYieldOpportunityQueryResult, SubmitHashRequestDto, SubmitRequestDto, SubmitResponseDto, Team, TeamContactDetails, TeamDeletedAt, TeamDto, TeamDtoContactDetails, TimePeriodDto, TokenDto, TokenGetTokenBalancesQueryError, TokenGetTokenBalancesQueryResult, TokenGetTokenPricesQueryError, TokenGetTokenPricesQueryResult, TokensDto, TransactionConstructMutationBody, TransactionConstructMutationError, TransactionConstructMutationResult, TransactionDto, TransactionDtoGasEstimate, TransactionGetGasForNetworkQueryError, TransactionGetGasForNetworkQueryResult, TransactionGetTransactionQueryError, TransactionGetTransactionQueryResult, TransactionGetTransactionStatusFromIdQueryError, TransactionGetTransactionStatusFromIdQueryResult, TransactionStatus, TransactionStatusResponseDto, TransactionStatusResponseDtoRaw, TransactionSubmitHashMutationBody, TransactionSubmitHashMutationError, TransactionSubmitHashMutationResult, TransactionSubmitMutationBody, TransactionSubmitMutationError, TransactionSubmitMutationResult, TransactionType, UpdateKeyDto, UpdatePayoutAddressDto, UpdatePayoutAddressDtoNetwork, UpdateProjectDto, UpdateTeamDto, UpdateUserDto, UpdateUserMeDto, UserDto, ValidatorDto, YieldBalanceDto, YieldBalanceRequestDto, YieldConfigDto, YieldOpportunityDto, YieldProviderDto, YieldProviders, YieldStatusResponseDto, YieldType, getStakeEnterMutationOptions, getStakeExitMutationOptions, getStakeGetBalancesMutationOptions, getStakeGetStakeSessionQueryKey, getStakeGetStakeSessionQueryOptions, getStakeGetValidatorsQueryKey, getStakeGetValidatorsQueryOptions, getStakePendingActionsMutationOptions, getStakeYieldOpportunitiesQueryKey, getStakeYieldOpportunitiesQueryOptions, getStakeYieldOpportunityQueryKey, getStakeYieldOpportunityQueryOptions, getTokenGetTokenBalancesQueryKey, getTokenGetTokenBalancesQueryOptions, getTokenGetTokenPricesQueryKey, getTokenGetTokenPricesQueryOptions, getTransactionConstructMutationOptions, getTransactionGetGasForNetworkQueryKey, getTransactionGetGasForNetworkQueryOptions, getTransactionGetTransactionQueryKey, getTransactionGetTransactionQueryOptions, getTransactionGetTransactionStatusFromIdQueryKey, getTransactionGetTransactionStatusFromIdQueryOptions, getTransactionSubmitHashMutationOptions, getTransactionSubmitMutationOptions, stakeEnter, stakeExit, stakeGetBalances, stakeGetStakeSession, stakeGetValidators, stakePendingActions, stakeYieldOpportunities, stakeYieldOpportunity, tokenGetTokenBalances, tokenGetTokenPrices, transactionConstruct, transactionGetGasForNetwork, transactionGetTransaction, transactionGetTransactionStatusFromId, transactionSubmit, transactionSubmitHash, useQueryClient, useStakeEnter, useStakeExit, useStakeGetBalances, useStakeGetStakeSession, useStakeGetValidators, useStakePendingActions, useStakeYieldOpportunities, useStakeYieldOpportunity, useTokenGetTokenBalances, useTokenGetTokenPrices, useTransactionConstruct, useTransactionGetGasForNetwork, useTransactionGetTransaction, useTransactionGetTransactionStatusFromId, useTransactionSubmit, useTransactionSubmitHash };
export { APIManager, AddressArgumentsDto, AddressWithTokenDto, AddressesDto, AmountArgumentOptionsDto, ApeNativeArgumentOptionsDto, ApeNativeArgumentsDto, ArgumentOptionsDto, AuthConfirmEmailDto, AuthEmailLoginDto, AuthEmailLoginResponseDto, AuthForgotPasswordDto, AuthGoogleLoginDto, AuthResetPasswordDto, AuthUpdateDto, AuthUpdateDtoOldPassword, BalanceResponseDto, BalanceTypes, BalancesRequestDto, BinanceAdditionalAddressesStakeArgumentOptionsDto, ConfirmUserMeDto, ConstructTransactionRequestDto, ConstructTransactionRequestDtoGasArgs, CosmosAdditionalAddressesDto, CosmosGasArgsDto, CreateKeyDto, CreatePayoutAddressDto, CreateProjectDto, CreateTeamDto, CreateTeamDtoContactDetails, CreateTeamDtoUser, CreateUserDto, DurationArgumentOptionsDto, EvmEIP1559GasArgsDto, EvmEIP1559GasArgsDtoType, EvmLegacyGasArgsDto, EvmLegacyGasArgsDtoType, GasEstimateDto, GasForNetworkResponseDto, GasMode, GasModeValueDto, GasModeValueDtoGasArgs, GasModesDto, InfinityPaginatedDto, InfinityPaginatedDtoData, Key, KeyDeletedAt, Networks, PayoutAddressDto, PendingActionArgumentsDto, PendingActionDto, PendingActionRequestDto, PriceRequestDto, PriceResponseDto, Project, ProjectDeletedAt, RequiredArgumentDto, RequiredArgumentWithNetworkDto, RequiredArgumentWithNetworkDtoNetwork, RewardClaiming, RewardSchedule, Role, StakeArgumentOptionsDto, StakeArgumentResponseDto, StakeArgumentsDto, StakeDto, StakeEnterMutationBody, StakeEnterMutationError, StakeEnterMutationResult, StakeExitMutationBody, StakeExitMutationError, StakeExitMutationResult, StakeGetBalancesMutationBody, StakeGetBalancesMutationError, StakeGetBalancesMutationResult, StakeGetStakeSessionQueryError, StakeGetStakeSessionQueryResult, StakeGetValidatorsQueryError, StakeGetValidatorsQueryResult, StakeKitContext, StakeKitQueryProvider, StakePendingActionsMutationBody, StakePendingActionsMutationError, StakePendingActionsMutationResult, StakeRequestDto, StakeSessionTypes, StakeStatus, StakeYieldOpportunitiesQueryError, StakeYieldOpportunitiesQueryResult, StakeYieldOpportunityQueryError, StakeYieldOpportunityQueryResult, SubmitHashRequestDto, SubmitRequestDto, SubmitResponseDto, Team, TeamContactDetails, TeamDeletedAt, TeamDto, TeamDtoContactDetails, TimePeriodDto, TokenDto, TokenGetTokenBalancesQueryError, TokenGetTokenBalancesQueryResult, TokenGetTokenPricesQueryError, TokenGetTokenPricesQueryResult, TokensDto, TransactionConstructMutationBody, TransactionConstructMutationError, TransactionConstructMutationResult, TransactionDto, TransactionDtoGasEstimate, TransactionGetGasForNetworkQueryError, TransactionGetGasForNetworkQueryResult, TransactionGetTransactionQueryError, TransactionGetTransactionQueryResult, TransactionGetTransactionStatusFromIdQueryError, TransactionGetTransactionStatusFromIdQueryResult, TransactionStatus, TransactionStatusResponseDto, TransactionStatusResponseDtoRaw, TransactionSubmitHashMutationBody, TransactionSubmitHashMutationError, TransactionSubmitHashMutationResult, TransactionSubmitMutationBody, TransactionSubmitMutationError, TransactionSubmitMutationResult, TransactionType, UpdateKeyDto, UpdatePayoutAddressDto, UpdatePayoutAddressDtoNetwork, UpdateProjectDto, UpdateTeamDto, UpdateUserDto, UpdateUserMeDto, UserDto, ValidatorDto, YieldBalanceDto, YieldBalanceRequestDto, YieldConfigDto, YieldOpportunityDto, YieldProviderDto, YieldProviders, YieldStatusResponseDto, YieldType, getStakeGetStakeSessionQueryKey, getStakeGetValidatorsQueryKey, getStakeYieldOpportunitiesQueryKey, getStakeYieldOpportunityQueryKey, getTokenGetTokenBalancesQueryKey, getTokenGetTokenBalancesQueryOptions, getTokenGetTokenPricesQueryKey, getTokenGetTokenPricesQueryOptions, getTransactionGetGasForNetworkQueryKey, getTransactionGetTransactionQueryKey, getTransactionGetTransactionStatusFromIdQueryKey, stakeEnter, stakeExit, stakeGetBalances, stakeGetStakeSession, stakeGetValidators, stakePendingActions, stakeYieldOpportunities, stakeYieldOpportunity, tokenGetTokenBalances, tokenGetTokenPrices, transactionConstruct, transactionGetGasForNetwork, transactionGetTransaction, transactionGetTransactionStatusFromId, transactionSubmit, transactionSubmitHash, useStakeEnter, useStakeEnterMutationOptions, useStakeExit, useStakeExitMutationOptions, useStakeGetBalances, useStakeGetBalancesMutationOptions, useStakeGetStakeSession, useStakeGetStakeSessionQueryOptions, useStakeGetValidators, useStakeGetValidatorsQueryOptions, useStakeKitQueryClient, useStakePendingActions, useStakePendingActionsMutationOptions, useStakeYieldOpportunities, useStakeYieldOpportunitiesQueryOptions, useStakeYieldOpportunity, useStakeYieldOpportunityQueryOptions, useTokenGetTokenBalances, useTokenGetTokenPrices, useTransactionConstruct, useTransactionConstructMutationOptions, useTransactionGetGasForNetwork, useTransactionGetGasForNetworkQueryOptions, useTransactionGetTransaction, useTransactionGetTransactionQueryOptions, useTransactionGetTransactionStatusFromId, useTransactionGetTransactionStatusFromIdQueryOptions, useTransactionSubmit, useTransactionSubmitHash, useTransactionSubmitHashMutationOptions, useTransactionSubmitMutationOptions };
{
"name": "@stakekit/api-hooks",
"description": "React hooks for StakeKit API",
"version": "0.0.5",
"version": "0.0.6",
"types": "./dist/index.d.ts",

@@ -35,7 +35,8 @@ "main": "./dist/esm/index.js",

"clean": "rm -rf dist",
"build": "yarn lint && yarn clean && tsup src/index.ts --format esm,cjs --legacy-output --treeshake --dts"
"build": "yarn lint && yarn clean && tsup"
},
"dependencies": {
"@tanstack/react-query": "^4.28.0",
"axios": "^1.4.0"
"axios": "^1.4.0",
"lodash.merge": "^4.6.2"
},

@@ -46,6 +47,6 @@ "peerDependencies": {

"devDependencies": {
"@types/lodash.merge": "^4",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-react-app": "^7.0.1",
"lodash": "^4.17.21",
"orval": "^6.15.0",

@@ -52,0 +53,0 @@ "prettier": "^2.8.8",

@@ -18,7 +18,7 @@ ## React hooks for StakeKit API

Configure API client with proper base url, API key and wrap app with QueryProvider:
Configure API client with proper base url, API key and wrap app with StakeKitQueryProvider:
Example:
```tsx
import { APIManager, QueryProvider, useQueryClient } from '@stakekit/api-hooks';
import { APIManager, StakeKitQueryProvider, useStakeKitQueryClient } from '@stakekit/api-hooks';

@@ -35,4 +35,6 @@ APIManager.configure({

// APIManager.queryClient.clear()
const App = () => {
const queryClient = useQueryClient()
const queryClient = useStakeKitQueryClient()

@@ -42,6 +44,6 @@ const logout = () => queryClient.clear()

return (
<QueryProvider>
<StakeKitQueryProvider>
<Main />
<button onClick={logout} />
</QueryProvider>
</StakeKitQueryProvider>
)

@@ -48,0 +50,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc