Methods
1. getSupportedChainIds
Returns an array of supported chain IDs.
public getSupportedChainIds(): number[]2. setConfig
Sets custom configuration for the SDK, such as using Permit2 and specifying RPC URLs for reliability.
public setConfig(config: Config)3. getConfig
Fetches the current configuration settings for the SDK.
public getConfig(): Config4. getSupportedTokens
Lists the supported tokens for a given chain ID.
async getSupportedTokens(chainId: SupportedChainIds, account?: HexString): Promise<TokenList>5. getAllowance
Checks the allowance for a specific token on a given chain.
async getAllowance({ chainId, fromToken, account }): Promise<bigint>6. getContractAddress
Fetches the contract address for the DCA contract on a specific chain.
7. approve
Provides approval for token management under the DZap DCA contract.
8. sign
Signs a permit for DCA transactions. Note: Signatures are valid for 5 minutes from signing.
9. createPosition
Creates a new DCA position with specified parameters.
10. claimPosition
Claims profits from a position, converting them to the target token.
11. terminatePosition
Terminates an existing DCA position.
12. editPosition
Edits an active DCA position.
13. getPositions
Fetches all DCA positions for an account across specified chain IDs.
14. getAllPositions
Fetches all DCA positions for an account across all supported chain IDs.
Last updated