Skip to main content

Approvals

Table of contents

Constructors

Methods

Constructors

constructor

new Approvals()

Methods

fetchApprovals

Static fetchApprovals(__namedParameters): CancelablePromise<ApprovalOutputDTO>

throws ApiError

Parameters

NameTypeDescription
__namedParametersObject-
__namedParameters.allowanceTargetstringAddress whose spending allowance is to be checked
__namedParameters.chainIdChainIdID of chain, e.g Ethereum Mainnet = 1
__namedParameters.ownerstringWallet address of token holder
__namedParameters.tokenAddressstringContract address of token

Returns

CancelablePromise<ApprovalOutputDTO>

ApprovalOutputDTO Gives approval values of given tokens for a given owner & chainId

Defined in

socket-v2-sdk/src/client/services/Approvals.ts:14


fetchApprovalsCalldata

Static fetchApprovalsCalldata(__namedParameters): CancelablePromise<ApprovalTxOutputDTO>

throws ApiError

Parameters

NameTypeDescription
__namedParametersObject-
__namedParameters.allowanceTargetstringAddress whose spending allowance is to be checked
__namedParameters.amountstringAmount of tokens to approve, e.g 10 USDC (6 decimals)
__namedParameters.chainIdChainIdID of chain, e.g Ethereum Mainnet = 1
__namedParameters.ownerstringWallet address of token holder
__namedParameters.tokenAddressstringContract address of token

Returns

CancelablePromise<ApprovalTxOutputDTO>

ApprovalTxOutputDTO Return the Approval Tx Data for the given params.

Defined in

socket-v2-sdk/src/client/services/Approvals.ts:48