ForLp
register_lpnode
Basic Information
Brief Description
- Used to register chain event listeners with ChainClient. After the relevant chain client installation is complete, LpAdmin will automatically call it and perform checks.
- When LP invokes, it will register the chain events it is interested in (mainly transaction events) and wait for the ChainClient callback.
Request URL
/evm-client-${config.system_chain_id}/lpnode/register_lpnode
Request Method
- POST
Request Example
json
{
"lpnode_server_url": {
"on_transfer_out": "http://lpnode-server:9202/lpnode/chain_client/on_transfer_out",
"on_transfer_in": "http://lpnode-server:9202/lpnode/chain_client/on_transfer_in",
"on_confirm": "http://lpnode-server:9202/lpnode/chain_client/on_confirm", // User Out Confirm Event Or Lp Confirm In Event
"on_refunded": "http://lpnode-server:9202/lpnode/chain_client/on_refund" // User refunded Or Lp Refunded
},
"chainType": "evm"
}Successful Response Example
json
{ "code": 200, "message": "register succeed" }Parameter Description for Successful Response
code: Status codemessage: Return message
transfer_in
Basic Information
Brief Description
- When Lp initiates a transaction, this is called to send the transaction, primarily assisting Lp in transferring Tokens or native coins.
Request URL
/evm-client-${config.system_chain_id}/lpnode/transfer_in
Request Method
- POST
Request Example
json
{
"transaction_type": "LOCAL_PADDING",
"command_transfer_in": {
"sender_wallet_name": "BSC-TEST-WALLET",
"user_receiver_address": "171965501528652954155215873577169194230145665610",
"token": "501839043259013433387531949255103871519731592940",
"token_amount": "5862150000000000",
"eth_amount": "0",
"hash_lock": "0x5fc4e68a3f3f83c0c3e2fa47ddfe04bf28f209c6af2ec2965c2b100d18e39593",
"agreement_reached_time": 1729761958,
"expected_single_step_time": 60,
"tolerant_single_step_time": 60,
"earliest_refund_time": 1729762378,
"src_chain_id": 9006,
"src_transfer_id": "0xee003ed9b29573ad71ef609cd180af5e7452555a81b7d3457e77b41e1704d968",
"append_information": "{\"user_account_id\":\"0x1E1f3324f5482bACeA3E07978278624F28e4ca4A\"}"
},
"gas": {
"gas_price": "FAST"
}
}Successful Response Example
json
{
"code": 200,
"message": "Command received" // This only indicates that the message was received; the transaction is only truly successful after the chain event is received.
}Parameter Description for Successful Response
code: Status codemessage: Message reception information
refund
Brief Description
- Called when Lp initiates a transaction to send the transaction.
Request URL
/evm-client-${config.system_chain_id}/lpnode/refund,
Request Method
- POST
Request Example
json
{
"transaction_type": "LOCAL_PADDING",
"command_transfer_refund": {
"bid": "0x2fd590d379e79404935a646ab1756e7edea4e65c2b2c125712682634db936db3",
"uuid": "0xba568f08ccd46d32665945afada90cd0c81ffb6101972ed2050e70f9e29beaa4",
"sender_wallet_name": "bscmainnet",
"user_receiver_address": "230550328186284554982703328169495403777670908339",
"token": "489982930986835137684486657990555633941558688085",
"token_amount": "20271192430000000000",
"eth_amount": "0",
"hash_lock": "0x41e71d8acace03baa288435498c4f1c8c31b95cf8b1e5178d2c9cc58f0b6a060",
"agreement_reached_time": 1732042462,
"expected_single_step_time": 120,
"tolerant_single_step_time": 240,
"earliest_refund_time": 1732043543,
"append_information": "{\"user_account_id\":\"0x28623BF8E872FFAE6e2955a176dFCd10B97a09b3\"}"
},
"gas": {
"gas_price": "STANDARD"
}
}Successful Response Example
json
{
"code": 200,
"message": "Command received" // This only indicates that the message was received; the transaction is only truly successful after the chain event is received.
}Parameter Description for Successful Response
code: Status codemessage: Return message
confirm
Brief Description
- Called when Lp initiates a transaction to send the transaction.
Request URL
/evm-client-${config.system_chain_id}/lpnode/confirm
Request Method
- POST
Request Example
json
{
"transaction_type": "LOCAL_PADDING",
"command_transfer_confirm": {
"bid": "0xf8a17fe9f1fd9a9e002a8409a8742eb6cbe10983db872ab724dfbce911070b97",
"uuid": "0x0fb1db9c040a75ed98dbb8a5b808bafc8a529792640f428584002fca69a59ab8",
"sender_wallet_name": "bscmainnet",
"user_receiver_address": "230550328186284554982703328169495403777670908339",
"token": "489982930986835137684486657990555633941558688085",
"token_amount": "20271192430000000000",
"eth_amount": "0",
"hash_lock": "0xb2f3ebd6bd2ce7ec8987ac50261398876b53c7f055cd88460f5b05da79918bf1",
"agreement_reached_time": 1732074277,
"expected_single_step_time": 120,
"tolerant_single_step_time": 240,
"earliest_refund_time": 1732075358,
"preimage": "0x411d00bbb1634425407705a186f25f4952705663f6ff05044d83afbe75f6772f",
"append_information": "{\"user_account_id\":\"0x28623BF8E872FFAE6e2955a176dFCd10B97a09b3\"}",
"transfer_id": "0x0fb1db9c040a75ed98dbb8a5b808bafc8a529792640f428584002fca69a59ab8"
},
"gas": {
"gas_price": "STANDARD"
}
}Successful Response Example
json
{
"code": 200,
"message": "Command received" // This only indicates that the message was received; the transaction is only truly successful after the chain event is received.
}Parameter Description for Successful Response
code: Status codemessage: Return message
get_wallets
Brief Description
- Used to read the Token balances in the Lp wallet.
Request URL
http://localhost:9100/evm-client-9006/lpnode/get_wallets
Request Method
- POST
Successful Response Example
json
{
"code": 200,
"data": [
{
"wallet_name": "TestWallet1",
"token": "0x0000000000000000000000000000000000000000",
"wallet_address": "0x1E1f3324f5482bACeA3E07978278624F28e4ca4A",
"decimals": 18,
"balance_value": {
"type": "BigNumber",
"hex": "0x0222fc013b9a99d6"
}
},
{
"wallet_name": "TestWallet1",
"token": "0xacda8bf66c2cadac9e99aa1aa75743f536e71094",
"wallet_address": "0x1E1f3324f5482bACeA3E07978278624F28e4ca4A",
"decimals": 18,
"balance_value": {
"type": "BigNumber",
"hex": "0x0142ede0052cefee14160ef008"
}
},
{
"wallet_name": "TestWallet1",
"token": "0x57e73db0eebd89f722e064d4c209f86eba9daeec",
"wallet_address": "0x1E1f3324f5482bACeA3E07978278624F28e4ca4A",
"decimals": 18,
"balance_value": {
"type": "BigNumber",
"hex": "0x01431d02efb30b0f4a71b38788"
}
},
{
"wallet_name": "TestWallet1",
"token": "0x0000000000000000000000000000000000000000",
"wallet_address": "0x1E1f3324f5482bACeA3E07978278624F28e4ca4A",
"decimals": 18,
"balance_value": {
"type": "BigNumber",
"hex": "0x0222fc013b9a99d6"
}
}
]
}Parameter Description for Successful Response
code: Status codedata: List of Token balance information
sign_message_712
Brief Description
- Called when Lp locks the price to sign the message using this API.
Request URL
/evm-client-${config.system_chain_id}/lpnode/sign_message_712
Request Method
- POST
Request Example
json
{
"sign_data": {
"src_chain_id": 501,
"src_address": "2JPAxkrtXnJpc1SQUsRxHk8n4beCkDPb9k6ZVbWYCXdM", // Sending address
"src_token": "0xc6fa7af3bedbad3a3d65f36aabc97431b1bbe4c2d2f6e0e47ca60203452f5d61",
"src_amount": "20332189",
"dst_chain_id": 9006,
"dst_address": "0x28623BF8E872FFAE6e2955a176dFCd10B97a09b3", // Receiving address
"dst_token": "0x55d398326f99059fF775485246999027B3197955",
"dst_amount": "20271192430000000000",
"dst_native_amount": "0",
"requestor": "7DEUEDxXmKcirJifrTqKeV6ApchffyH15bh4CaxmJX1W",
"lp_id": "maximilianus.myterminus.com",
"agreement_reached_time": 1732046907,
"expected_single_step_time": 120,
"tolerant_single_step_time": 240,
"earliest_refund_time": 1732047988
},
"wallet_name": "bscmainnet"
}Successful Response Example
json
{
"code": 200,
"signed": ""
}Parameter Description for Successful Response
code: Status codesigned: The signed string