Once the user has approved the token transfer, it’s time to construct the submit
request to the Kima Transaction Backend.
POST /submit
Request Body:
originAddress
(Address): sending user address
originChain
(string): sending chain
targetAddress
(Address): receiving user address
targetChain
(string): receiving chain
targetSymbol
(string): receiving token symbol
amount
(number): amount of token to transfer
fee
(number): amount of token that Kima consumes to pay gas fee for pulling & releasing token transactions
For Bitcoin transactions:
Set these to the empty string or zero for non-BTC transactions
htlcCreationHash
(string): the tx hash locking the funds in the HTLC
htlcCreationVout
(number): the output index of the locked funds in the HTLC creation transaction
htlcExpirationTimestamp
(string): the timestamp when the HTLC contract expires and the user can reclaim the funds locked there
htclVersion
(string)
senderPubKey
(string): for bitcoin transactions this is the public key of the sender
Success Response:
height
: number
txIndex
: number
code
: number: error code; will be zero when successful
transactionHash
: string
events
: Event[]
type
: string
attributes
: Attribute[]
key
: string
value
: string
rawLog
?: string
data
?: MsgData[]
msgResponses
: Uint8Array
gasUsed
: bigint
gasWanted
: bigint
See the short names in the Supported Blockchains section.
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.
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.
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.