ETransfer
  • About ETransfer
    • Introduction
    • Business process
      • Deposit process
      • Withdraw process
  • ⚒️SDK
    • SDK introduction
    • SDK change log
    • Get Started
      • 📥Installation
      • 📃Configuration
      • ⌨️Quick Start
      • 🔐Auth
      • 💰Deposit Digital Assets
      • 💰Withdraw Digital Assets
      • ⚒️UI SDK
        • Configuration
        • Deposit Component
        • Withdraw Component
        • History Component
        • Transfer Detail Component
        • ETransfer Content Component
  • Install portkey wallet
  • FAQ
  • Contact us
  • MORE INFORMATION
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page
  • Introduction
  • How to use
  • Installation
  • Usage
  1. SDK
  2. Get Started

Deposit Digital Assets

PreviousAuthNextWithdraw Digital Assets

Last updated 11 months ago

Introduction

Deposit Assets

Deposit assets from other chains to the aelf chain.

SDK - Deposit Assets

A deposit address is generated based on the token, network and other information selected by the user. The user transfers crypto to the deposit address, then the ETransfer server will send tokens to the user's aelf chain account.

How to use

Installation

npm install @etransfer/core
# OR
yarn add @etransfer/core

Usage

Get supported assets

Acquire the list of assets supported by ETransfer.You can find which assets are supported for deposit and swap.

Example

import { eTransferCore } from '@etransfer/core';
import { BusinessType } from '@etransfer/types';

const result = await eTransferCore.services.getTokenOption({ type: BusinessType.Deposit });

Http Headers

Header
Type
Required
Remarks

Authorization

string

true

The authorization token is the result returned by /connect/token.

Method Parameters

Field
Type
Required
Remarks

type

BusinessType

true

Business type: 'Deposit'

Method return value

Field
Type
Remarks

...TTokenItem

Extends TTokenItem

From crypto information

toTokenList

TToTokenItem[]

To crypto information

TTokenItem type

Field
Type
Remarks

name

string

Crypto name

symbol

string

Crypto symbol

icon

string

Crypto logo url

contractAddress

string

ETransfer contract address

decimals

number

Crypto decimals

TToTokenItem type

Field
Type
Remarks

...TTokenItem

Extends TTokenItem

chainIdList

ChainId[]

Supported chain array

Get supported networks

Acquire the list of networks supported by ETransfer.You can find which networks support the deposit and swap functions.You can get basic information and the block confirmations of the network, etc.

Example

import { eTransferCore } from '@etransfer/core';
import { BusinessType } from '@etransfer/types';

const result = await eTransferCore.services.getNetworkList({
  type: BusinessType.Deposit,
  chainId: 'AELF',
  symbol: 'USDT',
});

Http Headers

Header
Type
Required
Remarks

Authorization

string

true

The authorization token is the result returned by /connect/token.

Method Parameters

Field
Type
Required
Remarks

type

BusinessType

true

Business type: 'Deposit'

chainId

ChainId

true

'AELF' | 'tDVV'

symbol

string

false

Get data from eTransferCore.services.getTokenOption

Method return value

Field
Type
Remarks

network

string

Network

name

string

Network name

multiConfirm

string

Network block confirmations

multiConfirmTime

string

Network block confirmation time

contractAddress

string

Network contract address

explorerUrl

string

Network explorer address

status

NetworkStatus

Network health status'Health' | 'Congesting' | 'Offline'

Get deposit address

Acquire the deposit information and deposit address. You can transfer assets to this address, and then your aelf account will receive aelf chain assets.

Please check the deposit tips and minimum deposit limit.

Example

import { eTransferCore } from '@etransfer/core';

const result = await eTransferCore.services.getDepositInfo({
  chainId: 'AELF',
  network: 'ETH',
  symbol: 'USDT',
  toSymbol: 'SGR',
});

Http Headers

Header
Type
Required
Remarks

Authorization

string

true

The authorization token is the result returned by /connect/token.

Method Parameters

Field
Type
Required
Remarks

chainId

ChainId

true

'AELF' | 'tDVV'

network

string

true

Get data from eTransferCore.services.getNetworkList

symbol

string

false

From crypto, get data from eTransferCore.services.getTokenOption

toSymbol

string

false

To Crypto, get data from eTransferCore.services.getTokenOption

Method return value

Field
Type
Required
Remarks

depositAddress

string

true

Deposit address

minAmount

string

true

Minimum deposit amount

minAmountUsd

string

true

Minimum deposit amount in USD

extraNotes

string[]

false

Deposit tips

extraInfo

TDepositExtraInfo

false

Additional deposit information

TDepositExtraInfo type

Field
Type
Remarks

slippage

string

Deposit slippage

First, init the ETransferCore instance. You can find it in .

First, init the ETransferCore instance. You can find it in .

How to acquire: .

How to acquire: .

How to acquire: .

⚒️
💰
ETransfer SDK Quick Start
📥Installation
ETransfer SDK Quick Start
ETransfer SDK Auth
ETransfer SDK Auth
ETransfer SDK Auth