Skip to main content

@strata-foundation/spl-token-bonding

Classes

Interfaces

Type Aliases

CurveV0

ฦฌ CurveV0: IdlAccounts<SplTokenBondingIDL>["curveV0"]

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:1646


ExponentialCurveV0

ฦฌ ExponentialCurveV0: Object

Type declaration

NameType
bBN
cBN
fracnumber
pownumber

Defined in

packages/spl-token-bonding/src/curves.ts:12


PiecewiseCurve

ฦฌ PiecewiseCurve: Record<string, Record<string, any>>

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:1636


PrimitiveCurve

ฦฌ PrimitiveCurve: Record<string, Record<string, any>>

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:1629


ProgramStateV0

ฦฌ ProgramStateV0: IdlAccounts<SplTokenBondingIDL>["programStateV0"]

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:1644


SplTokenBondingIDL

ฦฌ SplTokenBondingIDL: Object

Type declaration

NameType
accounts[{ name: "programStateV0" ; type: { fields: [{ name: "wrappedSolMint" ; type: "publicKey" }, { name: "solStorage" ; type: "publicKey" }, { name: "mintAuthorityBumpSeed" ; type: "u8" }, { name: "solStorageBumpSeed" ; type: "u8" }, { name: "bumpSeed" ; type: "u8" }] ; kind: "struct" } }, { name: "curveV0" ; type: { fields: [{ name: "definition" ; type: { defined: "PiecewiseCurve" } }] ; kind: "struct" } }, { name: "tokenBondingV0" ; type: { fields: [{ name: "baseMint" ; type: "publicKey" }, { name: "targetMint" ; type: "publicKey" }, { name: "generalAuthority" ; type: { option: "publicKey" } }, { name: "reserveAuthority" ; type: { option: "publicKey" } }, { name: "curveAuthority" ; type: { option: "publicKey" } }, { name: "baseStorage" ; type: "publicKey" }, { name: "buyBaseRoyalties" ; type: "publicKey" }, { name: "buyTargetRoyalties" ; type: "publicKey" }, { name: "sellBaseRoyalties" ; type: "publicKey" }, { name: "sellTargetRoyalties" ; type: "publicKey" }, { name: "buyBaseRoyaltyPercentage" ; type: "u32" }, { name: "buyTargetRoyaltyPercentage" ; type: "u32" }, { name: "sellBaseRoyaltyPercentage" ; type: "u32" }, { name: "sellTargetRoyaltyPercentage" ; type: "u32" }, { name: "curve" ; type: "publicKey" }, { name: "mintCap" ; type: { option: "u64" } }, { name: "purchaseCap" ; type: { option: "u64" } }, { name: "goLiveUnixTime" ; type: "i64" }, { name: "freezeBuyUnixTime" ; type: { option: "i64" } }, { name: "createdAtUnixTime" ; type: "i64" }, { name: "buyFrozen" ; type: "bool" }, { name: "sellFrozen" ; type: "bool" }, { name: "index" ; type: "u16" }, { name: "bumpSeed" ; type: "u8" }, { name: "baseStorageBumpSeed" ; type: "u8" }, { name: "targetMintAuthorityBumpSeed" ; type: "u8" }, { name: "baseStorageAuthorityBumpSeed" ; type: { option: "u8" } }, { name: "reserveBalanceFromBonding" ; type: "u64" }, { name: "supplyFromBonding" ; type: "u64" }, { name: "ignoreExternalReserveChanges" ; type: "bool" }, { name: "ignoreExternalSupplyChanges" ; type: "bool" }] ; kind: "struct" } }]
errors[{ code: 6000 ; msg: "Target mint must have an authority" ; name: "NoMintAuthority" }, { code: 6001 ; msg: "Target mint must have an authority that is a pda of this program" ; name: "InvalidMintAuthority" }, { code: 6002 ; msg: "Invalid base storage authority pda or seed did not match canonical seed for base storage authority" ; name: "InvalidBaseStorageAuthority" }, { code: 6003 ; msg: "Token bonding does not have an authority" ; name: "NoAuthority" }, { code: 6004 ; msg: "Error in precise number arithmetic" ; name: "ArithmeticError" }, { code: 6005 ; msg: "Buy price was higher than the maximum buy price. Try increasing max_price or slippage configuration" ; name: "PriceTooHigh" }, { code: 6006 ; msg: "Sell price was lower than the minimum sell price. Try decreasing min_price or increasing slippage configuration" ; name: "PriceTooLow" }, { code: 6007 ; msg: "Cannot sell more than the target mint currently has in supply" ; name: "MintSupplyTooLow" }, { code: 6008 ; msg: "Sell is not enabled on this bonding curve" ; name: "SellDisabled" }, { code: 6009 ; msg: "This bonding curve is not live yet" ; name: "NotLiveYet" }, { code: 6010 ; msg: "Passed the mint cap" ; name: "PassedMintCap" }, { code: 6011 ; msg: "Cannot purchase that many tokens because of purchase cap" ; name: "OverPurchaseCap" }, { code: 6012 ; msg: "Buy is frozen on this bonding curve, purchases not allowed" ; name: "BuyFrozen" }, { code: 6013 ; msg: "Use token bonding wrapped sol via buy_wrapped_sol, sell_wrapped_sol commands. We may one day provide liquid staking rewards on this stored sol." ; name: "WrappedSolNotAllowed" }, { code: 6014 ; msg: "The provided curve is invalid" ; name: "InvalidCurve" }, { code: 6015 ; msg: "An account was provided that did not have the correct mint" ; name: "InvalidMint" }, { code: 6016 ; msg: "Ignoring external changes is only supported on v1 of buy and sell endpoints. Please upgrade your client" ; name: "IgnoreExternalV1Only" }, { code: 6017 ; msg: "Cannot pad token bonding without ignoring external reserve and supply changes. This is an advanced feature, incorrect use could lead to insufficient resreves to cover sells" ; name: "InvalidPad" }]
instructions[{ accounts: [{ isMut: true ; isSigner: true ; name: "payer" }, { isMut: true ; isSigner: false ; name: "state" }, { isMut: false ; isSigner: false ; name: "solStorage" }, { isMut: false ; isSigner: false ; name: "wrappedSolMint" }, { isMut: false ; isSigner: false ; name: "mintAuthority" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }, { isMut: false ; isSigner: false ; name: "systemProgram" }, { isMut: false ; isSigner: false ; name: "rent" }] ; args: [{ name: "args" ; type: { defined: "InitializeSolStorageV0Args" } }] ; name: "initializeSolStorageV0" }, { accounts: [{ isMut: false ; isSigner: false ; name: "state" }, { isMut: true ; isSigner: false ; name: "wrappedSolMint" }, { isMut: false ; isSigner: false ; name: "mintAuthority" }, { isMut: true ; isSigner: false ; name: "solStorage" }, { isMut: true ; isSigner: true ; name: "source" }, { isMut: true ; isSigner: false ; name: "destination" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }, { isMut: false ; isSigner: false ; name: "systemProgram" }] ; args: [{ name: "args" ; type: { defined: "BuyWrappedSolV0Args" } }] ; name: "buyWrappedSolV0" }, { accounts: [{ isMut: false ; isSigner: false ; name: "state" }, { isMut: true ; isSigner: false ; name: "wrappedSolMint" }, { isMut: true ; isSigner: false ; name: "solStorage" }, { isMut: true ; isSigner: false ; name: "source" }, { isMut: false ; isSigner: true ; name: "owner" }, { isMut: true ; isSigner: false ; name: "destination" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }, { isMut: false ; isSigner: false ; name: "systemProgram" }] ; args: [{ name: "args" ; type: { defined: "SellWrappedSolV0Args" } }] ; name: "sellWrappedSolV0" }, { accounts: [{ isMut: true ; isSigner: true ; name: "payer" }, { isMut: true ; isSigner: false ; name: "curve" }, { isMut: false ; isSigner: false ; name: "systemProgram" }, { isMut: false ; isSigner: false ; name: "rent" }] ; args: [{ name: "args" ; type: { defined: "CreateCurveV0Args" } }] ; name: "createCurveV0" }, { accounts: [{ isMut: true ; isSigner: true ; name: "payer" }, { isMut: false ; isSigner: false ; name: "curve" }, { isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: false ; name: "baseMint" }, { isMut: false ; isSigner: false ; name: "targetMint" }, { isMut: false ; isSigner: false ; name: "baseStorage" }, { isMut: false ; isSigner: false ; name: "buyBaseRoyalties" }, { isMut: false ; isSigner: false ; name: "buyTargetRoyalties" }, { isMut: false ; isSigner: false ; name: "sellBaseRoyalties" }, { isMut: false ; isSigner: false ; name: "sellTargetRoyalties" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }, { isMut: false ; isSigner: false ; name: "systemProgram" }, { isMut: false ; isSigner: false ; name: "rent" }, { isMut: false ; isSigner: false ; name: "clock" }] ; args: [{ name: "args" ; type: { defined: "InitializeTokenBondingV0Args" } }] ; name: "initializeTokenBondingV0" }, { accounts: [{ isMut: true ; isSigner: false ; name: "refund" }, { isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: true ; name: "generalAuthority" }, { isMut: true ; isSigner: false ; name: "targetMint" }, { isMut: true ; isSigner: false ; name: "baseStorage" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }] ; args: [] ; name: "closeTokenBondingV0" }, { accounts: [{ accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: true ; name: "reserveAuthority" }, { isMut: false ; isSigner: false ; name: "baseMint" }, { isMut: true ; isSigner: false ; name: "baseStorage" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }] ; name: "common" }, { isMut: true ; isSigner: false ; name: "destination" }] ; args: [{ name: "args" ; type: { defined: "TransferReservesV0Args" } }] ; name: "transferReservesV0" }, { accounts: [{ accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: true ; name: "reserveAuthority" }, { isMut: false ; isSigner: false ; name: "baseMint" }, { isMut: true ; isSigner: false ; name: "baseStorage" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }] ; name: "common" }, { isMut: true ; isSigner: false ; name: "destination" }, { isMut: false ; isSigner: false ; name: "state" }, { isMut: true ; isSigner: false ; name: "wrappedSolMint" }, { isMut: false ; isSigner: false ; name: "mintAuthority" }, { isMut: true ; isSigner: false ; name: "solStorage" }, { isMut: false ; isSigner: false ; name: "systemProgram" }] ; args: [{ name: "args" ; type: { defined: "TransferReservesV0Args" } }] ; name: "transferReservesNativeV0" }, { accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: true ; name: "reserveAuthority" }] ; args: [{ name: "args" ; type: { defined: "UpdateReserveAuthorityV0Args" } }] ; name: "updateReserveAuthorityV0" }, { accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: true ; name: "curveAuthority" }, { isMut: false ; isSigner: false ; name: "curve" }] ; args: [{ name: "args" ; type: { defined: "UpdateCurveV0Args" } }] ; name: "updateCurveV0" }, { accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: true ; name: "generalAuthority" }, { isMut: false ; isSigner: false ; name: "baseMint" }, { isMut: false ; isSigner: false ; name: "targetMint" }, { isMut: false ; isSigner: false ; name: "buyBaseRoyalties" }, { isMut: false ; isSigner: false ; name: "buyTargetRoyalties" }, { isMut: false ; isSigner: false ; name: "sellBaseRoyalties" }, { isMut: false ; isSigner: false ; name: "sellTargetRoyalties" }] ; args: [{ name: "args" ; type: { defined: "UpdateTokenBondingV0Args" } }] ; name: "updateTokenBondingV0" }, { accounts: [{ accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: false ; name: "curve" }, { isMut: false ; isSigner: false ; name: "baseMint" }, { isMut: true ; isSigner: false ; name: "targetMint" }, { isMut: true ; isSigner: false ; name: "baseStorage" }, { isMut: true ; isSigner: false ; name: "buyBaseRoyalties" }, { isMut: true ; isSigner: false ; name: "destination" }, { isMut: true ; isSigner: false ; name: "buyTargetRoyalties" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }, { isMut: false ; isSigner: false ; name: "clock" }] ; name: "common" }, { isMut: false ; isSigner: false ; name: "state" }, { isMut: true ; isSigner: false ; name: "source" }, { isMut: false ; isSigner: true ; name: "sourceAuthority" }] ; args: [{ name: "args" ; type: { defined: "BuyV0Args" } }] ; name: "buyV1" }, { accounts: [{ accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: false ; name: "curve" }, { isMut: false ; isSigner: false ; name: "baseMint" }, { isMut: true ; isSigner: false ; name: "targetMint" }, { isMut: true ; isSigner: false ; name: "baseStorage" }, { isMut: true ; isSigner: false ; name: "buyBaseRoyalties" }, { isMut: true ; isSigner: false ; name: "destination" }, { isMut: true ; isSigner: false ; name: "buyTargetRoyalties" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }, { isMut: false ; isSigner: false ; name: "clock" }] ; name: "common" }, { isMut: true ; isSigner: true ; name: "source" }, { isMut: false ; isSigner: false ; name: "state" }, { isMut: true ; isSigner: false ; name: "wrappedSolMint" }, { isMut: false ; isSigner: false ; name: "mintAuthority" }, { isMut: true ; isSigner: false ; name: "solStorage" }, { isMut: false ; isSigner: false ; name: "systemProgram" }] ; args: [{ name: "args" ; type: { defined: "BuyV0Args" } }] ; name: "buyNativeV0" }, { accounts: [{ accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: false ; name: "curve" }, { isMut: false ; isSigner: false ; name: "baseMint" }, { isMut: true ; isSigner: false ; name: "targetMint" }, { isMut: true ; isSigner: false ; name: "baseStorage" }, { isMut: true ; isSigner: false ; name: "sellBaseRoyalties" }, { isMut: true ; isSigner: false ; name: "source" }, { isMut: false ; isSigner: true ; name: "sourceAuthority" }, { isMut: true ; isSigner: false ; name: "sellTargetRoyalties" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }, { isMut: false ; isSigner: false ; name: "clock" }] ; name: "common" }, { isMut: false ; isSigner: false ; name: "state" }, { isMut: true ; isSigner: false ; name: "destination" }] ; args: [{ name: "args" ; type: { defined: "SellV0Args" } }] ; name: "sellV1" }, { accounts: [{ accounts: [{ isMut: true ; isSigner: false ; name: "tokenBonding" }, { isMut: false ; isSigner: false ; name: "curve" }, { isMut: false ; isSigner: false ; name: "baseMint" }, { isMut: true ; isSigner: false ; name: "targetMint" }, { isMut: true ; isSigner: false ; name: "baseStorage" }, { isMut: true ; isSigner: false ; name: "sellBaseRoyalties" }, { isMut: true ; isSigner: false ; name: "source" }, { isMut: false ; isSigner: true ; name: "sourceAuthority" }, { isMut: true ; isSigner: false ; name: "sellTargetRoyalties" }, { isMut: false ; isSigner: false ; name: "tokenProgram" }, { isMut: false ; isSigner: false ; name: "clock" }] ; name: "common" }, { isMut: true ; isSigner: false ; name: "destination" }, { isMut: false ; isSigner: false ; name: "state" }, { isMut: true ; isSigner: false ; name: "wrappedSolMint" }, { isMut: false ; isSigner: false ; name: "mintAuthority" }, { isMut: true ; isSigner: false ; name: "solStorage" }, { isMut: false ; isSigner: false ; name: "systemProgram" }] ; args: [{ name: "args" ; type: { defined: "SellV0Args" } }] ; name: "sellNativeV0" }]
metadata{ address: "TBondmkCYxaPCKG4CHYfVTcwQ8on31xnJrPzk8F8WsS" }
metadata.address"TBondmkCYxaPCKG4CHYfVTcwQ8on31xnJrPzk8F8WsS"
name"spl_token_bonding"
types[{ name: "BuyWithBaseV0Args" ; type: { fields: [{ name: "baseAmount" ; type: "u64" }, { name: "minimumTargetAmount" ; type: "u64" }] ; kind: "struct" } }, { name: "BuyTargetAmountV0Args" ; type: { fields: [{ name: "targetAmount" ; type: "u64" }, { name: "maximumPrice" ; type: "u64" }] ; kind: "struct" } }, { name: "BuyV0Args" ; type: { fields: [{ name: "buyWithBase" ; type: { option: { defined: "BuyWithBaseV0Args" } } }, { name: "buyTargetAmount" ; type: { option: { defined: "BuyTargetAmountV0Args" } } }] ; kind: "struct" } }, { name: "BuyWrappedSolV0Args" ; type: { fields: [{ name: "amount" ; type: "u64" }] ; kind: "struct" } }, { name: "CreateCurveV0Args" ; type: { fields: [{ name: "definition" ; type: { defined: "PiecewiseCurve" } }] ; kind: "struct" } }, { name: "InitializeSolStorageV0Args" ; type: { fields: [{ name: "mintAuthorityBumpSeed" ; type: "u8" }, { name: "solStorageBumpSeed" ; type: "u8" }, { name: "bumpSeed" ; type: "u8" }] ; kind: "struct" } }, { name: "InitializeTokenBondingV0Args" ; type: { fields: [{ name: "buyBaseRoyaltyPercentage" ; type: "u32" }, { name: "buyTargetRoyaltyPercentage" ; type: "u32" }, { name: "sellBaseRoyaltyPercentage" ; type: "u32" }, { name: "sellTargetRoyaltyPercentage" ; type: "u32" }, { name: "goLiveUnixTime" ; type: "i64" }, { name: "freezeBuyUnixTime" ; type: { option: "i64" } }, { name: "mintCap" ; type: { option: "u64" } }, { name: "purchaseCap" ; type: { option: "u64" } }, { name: "generalAuthority" ; type: { option: "publicKey" } }, { name: "reserveAuthority" ; type: { option: "publicKey" } }, { name: "curveAuthority" ; type: { option: "publicKey" } }, { name: "buyFrozen" ; type: "bool" }, { name: "index" ; type: "u16" }, { name: "bumpSeed" ; type: "u8" }, { name: "sellFrozen" ; type: "bool" }, { name: "ignoreExternalReserveChanges" ; type: "bool" }, { name: "ignoreExternalSupplyChanges" ; type: "bool" }, { name: "initialReservesPad" ; type: "u64" }, { name: "initialSupplyPad" ; type: "u64" }] ; kind: "struct" } }, { name: "SellV0Args" ; type: { fields: [{ name: "targetAmount" ; type: "u64" }, { name: "minimumPrice" ; type: "u64" }] ; kind: "struct" } }, { name: "SellWrappedSolV0Args" ; type: { fields: [{ name: "amount" ; type: "u64" }, { name: "all" ; type: "bool" }] ; kind: "struct" } }, { name: "TransferReservesV0Args" ; type: { fields: [{ name: "amount" ; type: "u64" }] ; kind: "struct" } }, { name: "UpdateCurveV0Args" ; type: { fields: [{ name: "curveAuthority" ; type: { option: "publicKey" } }] ; kind: "struct" } }, { name: "UpdateReserveAuthorityV0Args" ; type: { fields: [{ name: "newReserveAuthority" ; type: { option: "publicKey" } }] ; kind: "struct" } }, { name: "UpdateTokenBondingV0Args" ; type: { fields: [{ name: "generalAuthority" ; type: { option: "publicKey" } }, { name: "buyBaseRoyaltyPercentage" ; type: "u32" }, { name: "buyTargetRoyaltyPercentage" ; type: "u32" }, { name: "sellBaseRoyaltyPercentage" ; type: "u32" }, { name: "sellTargetRoyaltyPercentage" ; type: "u32" }, { name: "buyFrozen" ; type: "bool" }] ; kind: "struct" } }, { name: "TimeCurveV0" ; type: { fields: [{ name: "offset" ; type: "i64" }, { name: "curve" ; type: { defined: "PrimitiveCurve" } }, { name: "buyTransitionFees" ; type: { option: { defined: "TransitionFeeV0" } } }, { name: "sellTransitionFees" ; type: { option: { defined: "TransitionFeeV0" } } }] ; kind: "struct" } }, { name: "TransitionFeeV0" ; type: { fields: [{ name: "percentage" ; type: "u32" }, { name: "interval" ; type: "u32" }] ; kind: "struct" } }, { name: "PrimitiveCurve" ; type: { kind: "enum" ; variants: [{ fields: [{ name: "c" ; type: "u128" }, { name: "b" ; type: "u128" }, { name: "pow" ; type: "u8" }, { name: "frac" ; type: "u8" }] ; name: "ExponentialCurveV0" }, { fields: [{ name: "c" ; type: "u128" }, { name: "k1" ; type: "u128" }, { name: "k0" ; type: "u128" }, { name: "interval" ; type: "u32" }, { name: "d" ; type: "u128" }] ; name: "TimeDecayExponentialCurveV0" }] } }, { name: "PiecewiseCurve" ; type: { kind: "enum" ; variants: [{ fields: [{ name: "curves" ; type: { vec: { defined: "TimeCurveV0" } } }] ; name: "TimeV0" }] } }]
version"3.9.2"

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:1627


TimeDecayExponentialCurveV0

ฦฌ TimeDecayExponentialCurveV0: Object

Type declaration

NameType
cBN
dBN
intervalnumber
k0BN
k1BN

Defined in

packages/spl-token-bonding/src/curves.ts:19


TokenBondingV0

ฦฌ TokenBondingV0: IdlAccounts<SplTokenBondingIDL>["tokenBondingV0"]

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:1648

Variables

PiecewiseCurve

โ€ข PiecewiseCurve: Object

Type declaration

NameType
TimeV0{ timev0: {} = {} }
TimeV0.timev0{}

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:1637


PrimitiveCurve

โ€ข PrimitiveCurve: Object

Type declaration

NameType
ExponentialCurveV0{ exponentialcurvev0: {} = {} }
ExponentialCurveV0.exponentialcurvev0{}
TimeDecayExponentialCurveV0{ timedecayexponentialcurvev0: {} = {} }
TimeDecayExponentialCurveV0.timedecayexponentialcurvev0{}

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:1630


SplTokenBondingIDLJson

โ€ข Const SplTokenBondingIDLJson: Idl & { metadata?: { address: string } }

Defined in

packages/spl-token-bonding/src/generated/spl-token-bonding.ts:2

Functions

amountAsNum

โ–ธ amountAsNum(amount, mint): number

Parameters

NameType
amountu64
mintMintInfo

Returns

number

Defined in

packages/spl-token-bonding/src/utils.ts:62


asDecimal

โ–ธ asDecimal(percent): number

Parameters

NameType
percentnumber

Returns

number

Defined in

packages/spl-token-bonding/src/utils.ts:66


fromCurve

โ–ธ fromCurve(curve, baseAmount, targetSupply, goLiveUnixTime): IPricingCurve

Parameters

NameType
curveany
baseAmountnumber
targetSupplynumber
goLiveUnixTimenumber

Returns

IPricingCurve

Defined in

packages/spl-token-bonding/src/curves.ts:27


supplyAsNum

โ–ธ supplyAsNum(mint): number

Parameters

NameType
mintMintInfo

Returns

number

Defined in

packages/spl-token-bonding/src/utils.ts:64


toBN

โ–ธ toBN(numberOrBn, mintOrDecimals): BN

Parameters

NameType
numberOrBnnumber | BN
mintOrDecimalsnumber | MintInfo

Returns

BN

Defined in

packages/spl-token-bonding/src/utils.ts:60


toNumber

โ–ธ toNumber(numberOrBn, mint): number

Parameters

NameType
numberOrBnnumber | BN
mintMintInfo

Returns

number

Defined in

packages/spl-token-bonding/src/utils.ts:58


toU128

โ–ธ toU128(num): BN

Parameters

NameTypeDescription
numnumber | BN

Returns

BN

Defined in

packages/spl-token-bonding/src/utils.ts:41