Submitting the Transaction
Once the user has approved the token transfer, it’s time to construct the submit
request to the Kima Transaction Backend.
Submitting the Transaction
POST /submit
Request Body:
originAddress
(Address): sending user addressoriginChain
(string): sending chaintargetAddress
(Address): receiving user addresstargetChain
(string): receiving chaintargetSymbol
(string): receiving token symbolamount
(number): amount of token to transferfee
(number): amount of token that Kima consumes to pay gas fee for pulling & releasing token transactionsFor Bitcoin transactions:
Set these to the empty string or zero for non-BTC transactions
htlcCreationHash
(string): the tx hash locking the funds in the HTLChtlcCreationVout
(number): the output index of the locked funds in the HTLC creation transactionhtlcExpirationTimestamp
(string): the timestamp when the HTLC contract expires and the user can reclaim the funds locked therehtclVersion
(string)senderPubKey
(string): for bitcoin transactions this is the public key of the sender
Success Response:
height
: numbertxIndex
: numbercode
: number: error code; will be zero when successfultransactionHash
: stringevents
: Event[]type
: stringattributes
: Attribute[]key
: stringvalue
: string
rawLog
?: stringdata
?: MsgData[]msgResponses
: Uint8ArraygasUsed
: bigintgasWanted
: bigint
Chain Names
See the short names in the Supported Blockchains section.
Get Transaction Id
The transaction Id will be needed to get the transaction status. The following code can be used to extract the Id from the submit
response.
Authentication
Before calling submit
a JWT token must be obtained with the body payload. The JWT will be checked against the request body and if it does not match will respond with a 500
error.
Validation
If provided, the Kima Backend will use the Explorisk url defined in the ENV var XPLORISK_URL
to get the risk score for the origin and target user addresses. If the score is anything other than low
it will respond with a 500
error.
Last updated