Net

Chain base coin (ETH, BNB) APIs

Endpoint

Real Server : https://api.lmtls.io/v1/chain/net

Real Server : https://test-api.lmtls.io/v1/chain/net

getTempKey

Returns a generated tempKey by address

Parameters

Name
Type
Description

address

String

Address

keyType

String

See below keyType section.

keyType

Transaction Type
keyType String

Export Address

exportAddress

Create Token

create

Burn

burn

Transfer

transfer

Approve

approve

Mint

mint

Return Value

Name
Type
Description

tempKey

String

tempKey

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": { 
            "tempKey": "ffd5b9f7f4650366bd704327...",
        }
    }
}

getTransactionStatus

Returns a status of transaction.

Parameters

Name
Type
Description

transactionId

String

Transaction Id

Return Value

Name
Type
Description

status

Integer

See below status type.

revertReason

String

Reverted reason, if transaction fail.

Status type

Status
Description

1

Success

0

Fail

2

Invalid

-1

Pending or invalid Transaction Id

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "status": 0,
            "revertReason":"ERC20: transfer amount exceeds balance"
        }
    }
}

getBalance

Return an address ETH / BNB balance.

Parameters

Name
Type
Description

address

String

Address

Return Value

Name
Type
Description

balance

BigDecimal

balance of address.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "balance": "100.12"
        }
    }
}

getGasPrice

Returns the average gas value from the corresponding Onchain.

Parameters

Return Value

Name
Type
Description

gasPrice

BigDecimal

gasPrice

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "gasPrice": "0.000000004"
        }
    }
}

transfer

Transfer ETH / BNB from from-address to to-address.

Parameters

Name
Type
Description

sender

String

Sender address

toAddress

String

To address

amount

BigDecimal

Transfer amount.

tempKey

String

tempKey for "transfer"

hashKey

String

hash(tempKey | fromAddress' secretKey)

signature

String

sign( hash (sender | toAddress | amount | tempKey | hashKey) ) by formAddress's privateKey using signData API

gasPrice

BigDecimal

gasPrice.

nonce

BigInteger

nonce value. If it is null, it will be filled in automatically.

If acceleration is needed, use the nonce value generated when performing the transaction and use a higher gasPrice than the previous transaction.

Return Value

Name
Type
Description

transactionId

String

Transaction Id

nonce

BigInteger

nonce value

A transactionId is returned, but that doesn't mean it has been added to the Block yet. You should check that the status is 1 by using getTransactionStatus.

Example

{
    "jsonrpc": "2.0",
    "id": "00456",
    "result": {
        "resultCode": "200",
        "resultMessage": "Success",
        "resultData": {
            "transactionId": "0xf7d37be47ce8b563b07aa5e81e17e9722bab2e...",
            "nonce": "32"
        }
    }
}

Last updated