@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / RecallPerpMainFundingParams

Interface: RecallPerpMainFundingParams

Defined in: packages/sdk/src/trade.ts:1064

Inputs to Trader.recallPerpMainFunding — the PAYER pulls principal back out of a child.

Signed by the payer. Same clamped accounting as Trader.repayPerpMainFunding, and the same destination.

Extends

Properties

marginBank?

optional marginBank?: `0x${string}`

Defined in: packages/sdk/src/trade.ts:1036

MarginBank address (from the PerpMarket row), or pass pool to resolve it.

Inherited from

RepayPerpMainFundingParams.marginBank


pool?

optional pool?: `0x${string}`

Defined in: packages/sdk/src/trade.ts:1038

A PerpPool — its marginBank() is read (and cached) when marginBank is omitted.

Inherited from

RepayPerpMainFundingParams.pool


amount

amount: bigint

Defined in: packages/sdk/src/trade.ts:1046

Principal to return, raw units.

Over-asking is SAFE and does not revert: the bank returns min(amount, outstanding, present balance). Pass the outstanding principal from client.getPerpMainFunding to repay in full.

Inherited from

RepayPerpMainFundingParams.amount


gas?

optional gas?: bigint

Defined in: packages/sdk/src/trade.ts:1052

Gas ceiling for this tx.

Default

TraderConfig.gas (10,000,000)

Inherited from

RepayPerpMainFundingParams.gas


child

child: `0x${string}`

Defined in: packages/sdk/src/trade.ts:1066

The child to recall from. The signer must be its recorded payer.