Create Internal Transfer
To create an internal transfer, first obtain the msg hash from the initiate endpoint /initiate/. Next, sign msgHash with your L2 key using the signInternalTxMsgHash
function. Finally, provide the signed message along with other required information to the process transfer API /process/.
Note: You will need to include the JWT Auth token to request headers to access this endpoint. To get the JWT Auth Token, refer the login section of this document.
1. Initiate Internal Transfer
Before creating a new Internal Transfer, you will be required to obtain a msg hash by making use of this endpoint. Please note that this is a Private π route which means it needs to be authorized by the account initiating this request.
Endpoint
Request Headers
Request Body
Response
2. Sign the msg_hash with the L2 key pair
To sign the msg_hash
obtained from the above endpoint, you need to generate the L2 key pair. Use the Nodejs-sdk to generate the L2 key pair from your Ethereum private key.
2.1 Generating a L2 key pair from an ethereum private key
2.2 Use the L2 key pair to sign the msg_hash
obtained from the initiate endpoint.
3. Process Internal Transfer
Process an internal transfer between two users. Before processing the transfer, you will be required to obtain a signature by using the initiate endpoint and the signing utils. Please note that this is a private π route, which means it needs to be authorized by the account initiating this request.
Endpoint
Request Headers
Request Body
Response
Last updated