EarnShares.toVenueAmount
Converts a vault share amount to venue shares at the anchor rate, rounding down.
Mirrors VaultAdapter.tokensToShares.
Imports
Named
import { EarnShares } from 'ox/tempo'Examples
import { EarnShares } from 'ox/tempo'
const venueShareAmount = EarnShares.toVenueAmount(
{ engineShares: 3n, shareSupply: 2n },
7n,
)
10nDefinition
function toVenueAmount(
anchor: Anchor,
shareAmount: bigint,
): bigintSource: src/tempo/EarnShares.ts
Parameters
anchor
- Type:
Anchor
The conversion anchor.
anchor.engineShares
- Type:
bigint
Venue shares held by the engine at the anchor point.
anchor.shareSupply
- Type:
bigint
Vault share supply at the anchor point.
shareAmount
- Type:
bigint
Vault share amount, base units.
Return Type
Venue share amount, rounded down.
bigint

