Skip to content
TABLE OF CONTENTS

Transfer

transfer

Transfer assets from sender to receiver on layer 2.

Parameters


*starkKey string

A unique key that identifies the user in the off-chain state.


*privateKey string

Generating a signature requires.


*type 'ETH' | 'ERC20' | 'ERC721' | 'ERC721M' | 'ERC721MC'

The token type.


*receiver string

The wallet address of the receiver.


amount string | number

Amount of tokens to be transferred.


contractAddress string

Contract address.


tokenId string | number

tokenId of token.


expirationTimestamp number

The period to expire for the transfer, unit is seconds.


tokenUrl string

Token url of ERC721. If your contract type is ERM721MC, this parameter must be passed.

Example

tsx
const { data } = await reddio.apis.transfer({
  starkKey: '0x761f1709a72a7e1d9a503faf2a1067686f315acdc825a804e1281fbd39accda',
  privateKey: '',
  contractAddress: '0x941661bd1134dc7cc3d107bf006b8631f6e65ad5',
  tokenId: 1,
  type: 'ERC721',
  receiver: '0x761f1709a72a7e1d9a503faf2a1067686f315acdc825a804e1281fbd39accda',
  expirationTimestamp: 4194303,
});

Example return

json
{
	"status": "OK",
	"error": "",
	"data": {
		"sequence_id": 12
	}
}