SDK-Only Method:
getPaymentInstruction is not a JSON-RPC method on the
server (a raw JSON-RPC request for it returns HTTP 405). The TypeScript SDK
calls the server’s
estimateTransactionFee
method, uses the returned payment_address and signer_pubkey, and builds
the token transfer instruction locally. The estimateTransactionFee method
must be enabled on the Kora server.TypeScript SDK Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction | string | Yes | Base64-encoded transaction to price |
fee_token | string | Yes | Mint of the token the user pays the fee in |
source_wallet | string or TransactionSigner | Yes | Wallet that makes the token payment. Pass the TransactionSigner to keep its signer identity on the payment instruction |
token_program_id | string | No | Token program of fee_token. Defaults to the Token Program; use the Token-2022 program address for Token-2022 mints |
signer_key | string | No | Public key of the Kora signer to use, passed to estimateTransactionFee. Use the same value for signTransaction |
sig_verify | boolean | No | Passed to estimateTransactionFee. Defaults to false |