Search
Preparing search index...
The search index is not available
@frakt-protocol/frakt-sdk
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@frakt-protocol/frakt-sdk
loans
Namespace loans
Index
Functions
anchor
RawBNs
And
Pubkeys
To
Nums
And
Strings
approve
Loan
By
Admin
calculation
Reward
Cardinal
close
Loan
By
Admin
create
And
Send
V0
Tx
decode
Loan
decode
Lot
Ticket
decoded
Collection
Info
decoded
Deposit
decoded
Farmer
decoded
Lending
Stake
decoded
Loan
decoded
Price
Based
Liquidity
Pool
decoded
Time
Based
Liquidity
Pool
deposit
Liquidity
find
Rule
SetPDA
find
Token
Record
Pda
get
All
Program
Accounts
get
Cardinal
Accounts
get
Metaplex
Edition
Pda
get
Metaplex
Metadata
get
Most
Optimal
Loans
Closest
To
Needed
Sol
In
Bulk
harvest
Liquidity
initialize
Collection
Info
initialize
Price
Based
Liquidity
Pool
liquidate
Loan
To
Raffles
objectBNs
And
Pubkeys
To
Nums
payback
Loan
Ix
payback
Loan
With
Grace
Ix
propose
Loan
Ix
put
Loan
To
Liquidation
Raffles
reject
Loan
By
Admin
return
Anchor
Program
return
From
Grace
To
Active
stake
Cardinal
Ix
stop
Liquidation
Raffles
unstake
Cardinal
Ix
unstake
Liquidity
update
Collection
Info
update
Price
Based
Liquidity
Pool
user
Return
Loan
From
Escrow
Functions
anchor
RawBNs
And
Pubkeys
To
Nums
And
Strings
anchor
RawBNs
And
Pubkeys
To
Nums
And
Strings
(
rawAccount
:
any
)
:
any
Parameters
rawAccount:
any
Returns
any
approve
Loan
By
Admin
approve
Loan
By
Admin
(
params
:
{
admin
:
PublicKey
;
collectionInfo
:
PublicKey
;
connection
:
Connection
;
discount
:
number
|
BN
;
liquidityPool
:
PublicKey
;
loan
:
PublicKey
;
nftPrice
:
number
|
BN
;
programId
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ix
:
TransactionInstruction
}
>
Parameters
params:
{
admin
:
PublicKey
;
collectionInfo
:
PublicKey
;
connection
:
Connection
;
discount
:
number
|
BN
;
liquidityPool
:
PublicKey
;
loan
:
PublicKey
;
nftPrice
:
number
|
BN
;
programId
:
PublicKey
;
user
:
PublicKey
}
admin
:
PublicKey
collection
Info
:
PublicKey
connection
:
Connection
discount
:
number
|
BN
liquidity
Pool
:
PublicKey
loan
:
PublicKey
nft
Price
:
number
|
BN
program
Id
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ix
:
TransactionInstruction
}
>
calculation
Reward
Cardinal
calculation
Reward
Cardinal
(
params
:
{
currentSeconds
:
number
;
rewardDistributor
:
RewardDistributorView
;
rewardEntry
:
RewardEntryView
;
stakeEntry
:
StakeEntryView
}
)
:
number
Parameters
params:
{
currentSeconds
:
number
;
rewardDistributor
:
RewardDistributorView
;
rewardEntry
:
RewardEntryView
;
stakeEntry
:
StakeEntryView
}
current
Seconds
:
number
reward
Distributor
:
RewardDistributorView
reward
Entry
:
RewardEntryView
stake
Entry
:
StakeEntryView
Returns
number
close
Loan
By
Admin
close
Loan
By
Admin
(
params
:
{
admin
:
PublicKey
;
connection
:
Connection
;
loan
:
PublicKey
;
programId
:
PublicKey
;
sendTxn
:
any
}
)
:
Promise
<
{
ix
:
TransactionInstruction
}
>
Parameters
params:
{
admin
:
PublicKey
;
connection
:
Connection
;
loan
:
PublicKey
;
programId
:
PublicKey
;
sendTxn
:
any
}
admin
:
PublicKey
connection
:
Connection
loan
:
PublicKey
program
Id
:
PublicKey
send
Txn
:
function
send
Txn
(
transaction
:
Transaction
)
:
Promise
<
void
>
Parameters
transaction:
Transaction
Returns
Promise
<
void
>
Returns
Promise
<
{
ix
:
TransactionInstruction
}
>
create
And
Send
V0
Tx
create
And
Send
V0
Tx
(
connection
:
Connection
, txInstructions
:
TransactionInstruction
[]
, signer
:
Signer
, additionalSigners
:
Signer
[]
, lookupTablePubkey
:
PublicKey
, skipPreflight
?:
boolean
)
:
Promise
<
void
>
Parameters
connection:
Connection
txInstructions:
TransactionInstruction
[]
signer:
Signer
additionalSigners:
Signer
[]
lookupTablePubkey:
PublicKey
Optional
skipPreflight:
boolean
Returns
Promise
<
void
>
decode
Loan
decode
Loan
(
buffer
:
Buffer
, connection
:
Connection
, programId
:
PublicKey
)
:
any
Parameters
buffer:
Buffer
connection:
Connection
programId:
PublicKey
Returns
any
decode
Lot
Ticket
decode
Lot
Ticket
(
buffer
:
Buffer
, lotTicketPubkey
:
PublicKey
, connection
:
Connection
, programId
:
PublicKey
)
:
LotTicketView
Parameters
buffer:
Buffer
lotTicketPubkey:
PublicKey
connection:
Connection
programId:
PublicKey
Returns
LotTicketView
decoded
Collection
Info
decoded
Collection
Info
(
decodedCollection
:
any
, address
:
PublicKey
)
:
CollectionInfoView
Parameters
decodedCollection:
any
address:
PublicKey
Returns
CollectionInfoView
decoded
Deposit
decoded
Deposit
(
decodedDeposit
:
any
, address
:
PublicKey
)
:
DepositView
Parameters
decodedDeposit:
any
address:
PublicKey
Returns
DepositView
decoded
Farmer
decoded
Farmer
(
decodedFarmer
:
any
, address
:
PublicKey
)
:
FarmerView
Parameters
decodedFarmer:
any
address:
PublicKey
Returns
FarmerView
decoded
Lending
Stake
decoded
Lending
Stake
(
decodedLendingStake
:
any
, address
:
PublicKey
)
:
LendingStakeView
Parameters
decodedLendingStake:
any
address:
PublicKey
Returns
LendingStakeView
decoded
Loan
decoded
Loan
(
decodedLoan
:
any
, address
:
PublicKey
)
:
LoanView
Parameters
decodedLoan:
any
address:
PublicKey
Returns
LoanView
decoded
Price
Based
Liquidity
Pool
decoded
Price
Based
Liquidity
Pool
(
decodedLiquidityPool
:
any
, address
:
PublicKey
)
:
PriceBasedLiquidityPoolView
Parameters
decodedLiquidityPool:
any
address:
PublicKey
Returns
PriceBasedLiquidityPoolView
decoded
Time
Based
Liquidity
Pool
decoded
Time
Based
Liquidity
Pool
(
decodedLiquidityPool
:
any
, address
:
PublicKey
)
:
TimeBasedLiquidityPoolView
Parameters
decodedLiquidityPool:
any
address:
PublicKey
Returns
TimeBasedLiquidityPoolView
deposit
Liquidity
deposit
Liquidity
(
params
:
{
amount
:
number
;
connection
:
Connection
;
liquidityPool
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
deposit
:
PublicKey
;
ix
:
TransactionInstruction
}
>
Parameters
params:
{
amount
:
number
;
connection
:
Connection
;
liquidityPool
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
amount
:
number
connection
:
Connection
liquidity
Pool
:
PublicKey
program
Id
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
deposit
:
PublicKey
;
ix
:
TransactionInstruction
}
>
find
Rule
SetPDA
find
Rule
SetPDA
(
payer
:
PublicKey
, name
:
string
)
:
Promise
<
PublicKey
>
Parameters
payer:
PublicKey
name:
string
Returns
Promise
<
PublicKey
>
find
Token
Record
Pda
find
Token
Record
Pda
(
mintPubkey
:
PublicKey
, token
:
PublicKey
)
:
PublicKey
Parameters
mintPubkey:
PublicKey
token:
PublicKey
Returns
PublicKey
get
All
Program
Accounts
get
All
Program
Accounts
(
programId
:
PublicKey
, connection
:
Connection
)
:
Promise
<
{
collectionInfos
:
CollectionInfoView
[]
;
deposits
:
DepositView
[]
;
lendingStakes
:
LendingStakeView
[]
;
liquidationLots
:
LiquidationLotView
[]
;
loans
:
LoanView
[]
;
priceBasedLiquidityPools
:
PriceBasedLiquidityPoolView
[]
;
timeBasedLiquidityPools
:
TimeBasedLiquidityPoolView
[]
}
>
Parameters
programId:
PublicKey
connection:
Connection
Returns
Promise
<
{
collectionInfos
:
CollectionInfoView
[]
;
deposits
:
DepositView
[]
;
lendingStakes
:
LendingStakeView
[]
;
liquidationLots
:
LiquidationLotView
[]
;
loans
:
LoanView
[]
;
priceBasedLiquidityPools
:
PriceBasedLiquidityPoolView
[]
;
timeBasedLiquidityPools
:
TimeBasedLiquidityPoolView
[]
}
>
get
Cardinal
Accounts
get
Cardinal
Accounts
(
params
:
{
cardinalProgramId
:
PublicKey
;
connection
:
Connection
}
)
:
Promise
<
{
rewardDistributors
:
RewardDistributorView
[]
;
rewardEntries
:
RewardEntryView
[]
;
stakeEntries
:
StakeEntryView
[]
;
stakePools
:
StakePoolView
[]
}
>
Parameters
params:
{
cardinalProgramId
:
PublicKey
;
connection
:
Connection
}
cardinal
Program
Id
:
PublicKey
connection
:
Connection
Returns
Promise
<
{
rewardDistributors
:
RewardDistributorView
[]
;
rewardEntries
:
RewardEntryView
[]
;
stakeEntries
:
StakeEntryView
[]
;
stakePools
:
StakePoolView
[]
}
>
get
Metaplex
Edition
Pda
get
Metaplex
Edition
Pda
(
mintPubkey
:
PublicKey
)
:
PublicKey
Parameters
mintPubkey:
PublicKey
Returns
PublicKey
get
Metaplex
Metadata
get
Metaplex
Metadata
(
mintPubkey
:
PublicKey
)
:
PublicKey
Parameters
mintPubkey:
PublicKey
Returns
PublicKey
get
Most
Optimal
Loans
Closest
To
Needed
Sol
In
Bulk
get
Most
Optimal
Loans
Closest
To
Needed
Sol
In
Bulk
(
__namedParameters
:
{
neededSol
:
number
;
possibleLoans
:
{
interest
:
number
;
loanValue
:
number
;
nftMint
:
string
}
[]
}
)
:
{
interest
:
number
;
loanValue
:
number
;
nftMint
:
string
}
[]
Parameters
__namedParameters:
{
neededSol
:
number
;
possibleLoans
:
{
interest
:
number
;
loanValue
:
number
;
nftMint
:
string
}
[]
}
needed
Sol
:
number
possible
Loans
:
{
interest
:
number
;
loanValue
:
number
;
nftMint
:
string
}
[]
Returns
{
interest
:
number
;
loanValue
:
number
;
nftMint
:
string
}
[]
harvest
Liquidity
harvest
Liquidity
(
params
:
{
adminPubkey
:
PublicKey
;
connection
:
Connection
;
liquidityPool
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ix
:
TransactionInstruction
}
>
Parameters
params:
{
adminPubkey
:
PublicKey
;
connection
:
Connection
;
liquidityPool
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
admin
Pubkey
:
PublicKey
connection
:
Connection
liquidity
Pool
:
PublicKey
program
Id
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ix
:
TransactionInstruction
}
>
initialize
Collection
Info
initialize
Collection
Info
(
params
:
{
admin
:
PublicKey
;
collaterizationRate
:
number
|
BN
;
connection
:
Connection
;
creatorAddress
:
PublicKey
;
expirationTime
:
number
|
BN
;
isPriceBased
:
boolean
;
liquidityPool
:
PublicKey
;
loanToValue
:
number
|
BN
;
pricingLookupAddress
:
PublicKey
;
programId
:
PublicKey
;
royaltyAddress
:
PublicKey
;
royaltyFeePrice
:
number
|
BN
;
royaltyFeeTime
:
number
|
BN
}
)
:
Promise
<
{
collectionInfo
:
Signer
;
ix
:
TransactionInstruction
}
>
Parameters
params:
{
admin
:
PublicKey
;
collaterizationRate
:
number
|
BN
;
connection
:
Connection
;
creatorAddress
:
PublicKey
;
expirationTime
:
number
|
BN
;
isPriceBased
:
boolean
;
liquidityPool
:
PublicKey
;
loanToValue
:
number
|
BN
;
pricingLookupAddress
:
PublicKey
;
programId
:
PublicKey
;
royaltyAddress
:
PublicKey
;
royaltyFeePrice
:
number
|
BN
;
royaltyFeeTime
:
number
|
BN
}
admin
:
PublicKey
collaterization
Rate
:
number
|
BN
connection
:
Connection
creator
Address
:
PublicKey
expiration
Time
:
number
|
BN
is
Price
Based
:
boolean
liquidity
Pool
:
PublicKey
loan
To
Value
:
number
|
BN
pricing
Lookup
Address
:
PublicKey
program
Id
:
PublicKey
royalty
Address
:
PublicKey
royalty
Fee
Price
:
number
|
BN
royalty
Fee
Time
:
number
|
BN
Returns
Promise
<
{
collectionInfo
:
Signer
;
ix
:
TransactionInstruction
}
>
initialize
Price
Based
Liquidity
Pool
initialize
Price
Based
Liquidity
Pool
(
params
:
{
admin
:
PublicKey
;
baseBorrowRate
:
number
;
borrowCommission
:
number
;
connection
:
Connection
;
depositCommission
:
number
;
id
:
number
;
programId
:
PublicKey
;
reserveFactor
:
number
;
utilizationRateOptimal
:
number
;
variableSlope1
:
number
;
variableSlope2
:
number
}
)
:
Promise
<
{
ix
:
TransactionInstruction
;
liquidityPool
:
Signer
}
>
Parameters
params:
{
admin
:
PublicKey
;
baseBorrowRate
:
number
;
borrowCommission
:
number
;
connection
:
Connection
;
depositCommission
:
number
;
id
:
number
;
programId
:
PublicKey
;
reserveFactor
:
number
;
utilizationRateOptimal
:
number
;
variableSlope1
:
number
;
variableSlope2
:
number
}
admin
:
PublicKey
base
Borrow
Rate
:
number
borrow
Commission
:
number
connection
:
Connection
deposit
Commission
:
number
id
:
number
program
Id
:
PublicKey
reserve
Factor
:
number
utilization
Rate
Optimal
:
number
variable
Slope1
:
number
variable
Slope2
:
number
Returns
Promise
<
{
ix
:
TransactionInstruction
;
liquidityPool
:
Signer
}
>
liquidate
Loan
To
Raffles
liquidate
Loan
To
Raffles
(
params
:
{
connection
:
Connection
;
gracePeriod
:
number
;
liquidator
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
;
liquidationLot
:
Signer
}
>
Parameters
params:
{
connection
:
Connection
;
gracePeriod
:
number
;
liquidator
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
connection
:
Connection
grace
Period
:
number
liquidator
:
PublicKey
loan
:
PublicKey
nft
Mint
:
PublicKey
program
Id
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
;
liquidationLot
:
Signer
}
>
objectBNs
And
Pubkeys
To
Nums
objectBNs
And
Pubkeys
To
Nums
(
obj
:
any
)
:
any
Parameters
obj:
any
Returns
any
payback
Loan
Ix
payback
Loan
Ix
(
params
:
{
admin
:
PublicKey
;
collectionInfo
:
PublicKey
;
connection
:
Connection
;
liquidityPool
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
nftUserTokenAccount
?:
PublicKey
;
paybackAmount
?:
BN
;
programId
:
PublicKey
;
royaltyAddress
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
Parameters
params:
{
admin
:
PublicKey
;
collectionInfo
:
PublicKey
;
connection
:
Connection
;
liquidityPool
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
nftUserTokenAccount
?:
PublicKey
;
paybackAmount
?:
BN
;
programId
:
PublicKey
;
royaltyAddress
:
PublicKey
;
user
:
PublicKey
}
admin
:
PublicKey
collection
Info
:
PublicKey
connection
:
Connection
liquidity
Pool
:
PublicKey
loan
:
PublicKey
nft
Mint
:
PublicKey
Optional
nft
User
Token
Account
?:
PublicKey
Optional
payback
Amount
?:
BN
program
Id
:
PublicKey
royalty
Address
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
payback
Loan
With
Grace
Ix
payback
Loan
With
Grace
Ix
(
params
:
{
admin
:
PublicKey
;
collectionInfo
:
PublicKey
;
connection
:
Connection
;
liquidationLot
:
PublicKey
;
liquidityPool
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
royaltyAddress
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
Parameters
params:
{
admin
:
PublicKey
;
collectionInfo
:
PublicKey
;
connection
:
Connection
;
liquidationLot
:
PublicKey
;
liquidityPool
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
royaltyAddress
:
PublicKey
;
user
:
PublicKey
}
admin
:
PublicKey
collection
Info
:
PublicKey
connection
:
Connection
liquidation
Lot
:
PublicKey
liquidity
Pool
:
PublicKey
loan
:
PublicKey
nft
Mint
:
PublicKey
program
Id
:
PublicKey
royalty
Address
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
propose
Loan
Ix
propose
Loan
Ix
(
params
:
{
admin
:
PublicKey
;
connection
:
Connection
;
isPriceBased
:
boolean
;
loanToValue
:
BN
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
proposedNftPrice
:
BN
;
user
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
;
loan
:
Signer
}
>
Parameters
params:
{
admin
:
PublicKey
;
connection
:
Connection
;
isPriceBased
:
boolean
;
loanToValue
:
BN
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
proposedNftPrice
:
BN
;
user
:
PublicKey
}
admin
:
PublicKey
connection
:
Connection
is
Price
Based
:
boolean
loan
To
Value
:
BN
nft
Mint
:
PublicKey
program
Id
:
PublicKey
proposed
Nft
Price
:
BN
user
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
;
loan
:
Signer
}
>
put
Loan
To
Liquidation
Raffles
put
Loan
To
Liquidation
Raffles
(
params
:
{
admin
:
PublicKey
;
connection
:
Connection
;
gracePeriod
:
number
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
;
liquidationLot
:
Signer
}
>
Parameters
params:
{
admin
:
PublicKey
;
connection
:
Connection
;
gracePeriod
:
number
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
}
admin
:
PublicKey
connection
:
Connection
grace
Period
:
number
loan
:
PublicKey
nft
Mint
:
PublicKey
program
Id
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
;
liquidationLot
:
Signer
}
>
reject
Loan
By
Admin
reject
Loan
By
Admin
(
params
:
{
admin
:
PublicKey
;
connection
:
Connection
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
nftUserTokenAccount
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
Parameters
params:
{
admin
:
PublicKey
;
connection
:
Connection
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
nftUserTokenAccount
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
admin
:
PublicKey
connection
:
Connection
loan
:
PublicKey
nft
Mint
:
PublicKey
nft
User
Token
Account
:
PublicKey
program
Id
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
return
Anchor
Program
return
Anchor
Program
(
programId
:
PublicKey
, connection
:
Connection
)
:
Program
<
Idl
>
Parameters
programId:
PublicKey
connection:
Connection
Returns
Program
<
Idl
>
return
From
Grace
To
Active
return
From
Grace
To
Active
(
params
:
{
admin
:
PublicKey
;
connection
:
Connection
;
liquidationLot
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
Parameters
params:
{
admin
:
PublicKey
;
connection
:
Connection
;
liquidationLot
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
admin
:
PublicKey
connection
:
Connection
liquidation
Lot
:
PublicKey
loan
:
PublicKey
nft
Mint
:
PublicKey
program
Id
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
stake
Cardinal
Ix
stake
Cardinal
Ix
(
params
:
{
cardinalRewardsCenter
:
PublicKey
;
connection
:
Connection
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
payer
:
PublicKey
;
paymentPubkey1
:
PublicKey
;
paymentPubkey2
:
PublicKey
;
programId
:
PublicKey
;
rewardMint
:
PublicKey
;
stakePool
:
PublicKey
;
stakeRewardsPaymentInfo
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
additionalComputeBudgetInstructionIx
:
TransactionInstruction
;
stakeIx
:
TransactionInstruction
}
>
Parameters
params:
{
cardinalRewardsCenter
:
PublicKey
;
connection
:
Connection
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
payer
:
PublicKey
;
paymentPubkey1
:
PublicKey
;
paymentPubkey2
:
PublicKey
;
programId
:
PublicKey
;
rewardMint
:
PublicKey
;
stakePool
:
PublicKey
;
stakeRewardsPaymentInfo
:
PublicKey
;
user
:
PublicKey
}
cardinal
Rewards
Center
:
PublicKey
connection
:
Connection
loan
:
PublicKey
nft
Mint
:
PublicKey
payer
:
PublicKey
payment
Pubkey1
:
PublicKey
payment
Pubkey2
:
PublicKey
program
Id
:
PublicKey
reward
Mint
:
PublicKey
stake
Pool
:
PublicKey
stake
Rewards
Payment
Info
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
additionalComputeBudgetInstructionIx
:
TransactionInstruction
;
stakeIx
:
TransactionInstruction
}
>
stop
Liquidation
Raffles
stop
Liquidation
Raffles
(
params
:
{
admin
:
PublicKey
;
connection
:
Connection
;
liquidationLot
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
Parameters
params:
{
admin
:
PublicKey
;
connection
:
Connection
;
liquidationLot
:
PublicKey
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
}
admin
:
PublicKey
connection
:
Connection
liquidation
Lot
:
PublicKey
loan
:
PublicKey
nft
Mint
:
PublicKey
program
Id
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
unstake
Cardinal
Ix
unstake
Cardinal
Ix
(
params
:
{
cardinalRewardsCenter
:
PublicKey
;
connection
:
Connection
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
payer
:
PublicKey
;
paymentPubkey1
:
PublicKey
;
paymentPubkey2
:
PublicKey
;
programId
:
PublicKey
;
rewardMint
:
PublicKey
;
stakePool
:
PublicKey
;
unstakeRewardsPaymentInfo
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
additionalComputeBudgetInstructionIx
:
TransactionInstruction
;
unstakeIx
:
TransactionInstruction
}
>
Parameters
params:
{
cardinalRewardsCenter
:
PublicKey
;
connection
:
Connection
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
payer
:
PublicKey
;
paymentPubkey1
:
PublicKey
;
paymentPubkey2
:
PublicKey
;
programId
:
PublicKey
;
rewardMint
:
PublicKey
;
stakePool
:
PublicKey
;
unstakeRewardsPaymentInfo
:
PublicKey
;
user
:
PublicKey
}
cardinal
Rewards
Center
:
PublicKey
connection
:
Connection
loan
:
PublicKey
nft
Mint
:
PublicKey
payer
:
PublicKey
payment
Pubkey1
:
PublicKey
payment
Pubkey2
:
PublicKey
program
Id
:
PublicKey
reward
Mint
:
PublicKey
stake
Pool
:
PublicKey
unstake
Rewards
Payment
Info
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
additionalComputeBudgetInstructionIx
:
TransactionInstruction
;
unstakeIx
:
TransactionInstruction
}
>
unstake
Liquidity
unstake
Liquidity
(
params
:
{
adminPubkey
:
PublicKey
;
amount
:
number
|
BN
;
connection
:
Connection
;
liquidityPool
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ix
:
TransactionInstruction
}
>
Parameters
params:
{
adminPubkey
:
PublicKey
;
amount
:
number
|
BN
;
connection
:
Connection
;
liquidityPool
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
admin
Pubkey
:
PublicKey
amount
:
number
|
BN
connection
:
Connection
liquidity
Pool
:
PublicKey
program
Id
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ix
:
TransactionInstruction
}
>
update
Collection
Info
update
Collection
Info
(
params
:
{
admin
:
PublicKey
;
collaterizationRate
:
number
|
BN
;
collectionInfo
:
PublicKey
;
connection
:
Connection
;
creatorAddress
:
PublicKey
;
expirationTime
:
number
|
BN
;
isPriceBased
:
boolean
;
liquidityPool
:
PublicKey
;
loanToValue
:
number
|
BN
;
pricingLookupAddress
:
PublicKey
;
programId
:
PublicKey
;
royaltyAddress
:
PublicKey
;
royaltyFeePrice
:
number
|
BN
;
royaltyFeeTime
:
number
|
BN
}
)
:
Promise
<
{
ix
:
TransactionInstruction
}
>
Parameters
params:
{
admin
:
PublicKey
;
collaterizationRate
:
number
|
BN
;
collectionInfo
:
PublicKey
;
connection
:
Connection
;
creatorAddress
:
PublicKey
;
expirationTime
:
number
|
BN
;
isPriceBased
:
boolean
;
liquidityPool
:
PublicKey
;
loanToValue
:
number
|
BN
;
pricingLookupAddress
:
PublicKey
;
programId
:
PublicKey
;
royaltyAddress
:
PublicKey
;
royaltyFeePrice
:
number
|
BN
;
royaltyFeeTime
:
number
|
BN
}
admin
:
PublicKey
collaterization
Rate
:
number
|
BN
collection
Info
:
PublicKey
connection
:
Connection
creator
Address
:
PublicKey
expiration
Time
:
number
|
BN
is
Price
Based
:
boolean
liquidity
Pool
:
PublicKey
loan
To
Value
:
number
|
BN
pricing
Lookup
Address
:
PublicKey
program
Id
:
PublicKey
royalty
Address
:
PublicKey
royalty
Fee
Price
:
number
|
BN
royalty
Fee
Time
:
number
|
BN
Returns
Promise
<
{
ix
:
TransactionInstruction
}
>
update
Price
Based
Liquidity
Pool
update
Price
Based
Liquidity
Pool
(
params
:
{
admin
:
PublicKey
;
baseBorrowRate
:
number
;
borrowCommission
:
number
;
connection
:
Connection
;
depositCommission
:
number
;
id
:
number
;
liquidityPool
:
PublicKey
;
programId
:
PublicKey
;
reserveFactor
:
number
;
utilizationRateOptimal
:
number
;
variableSlope1
:
number
;
variableSlope2
:
number
}
)
:
Promise
<
{
ix
:
TransactionInstruction
}
>
Parameters
params:
{
admin
:
PublicKey
;
baseBorrowRate
:
number
;
borrowCommission
:
number
;
connection
:
Connection
;
depositCommission
:
number
;
id
:
number
;
liquidityPool
:
PublicKey
;
programId
:
PublicKey
;
reserveFactor
:
number
;
utilizationRateOptimal
:
number
;
variableSlope1
:
number
;
variableSlope2
:
number
}
admin
:
PublicKey
base
Borrow
Rate
:
number
borrow
Commission
:
number
connection
:
Connection
deposit
Commission
:
number
id
:
number
liquidity
Pool
:
PublicKey
program
Id
:
PublicKey
reserve
Factor
:
number
utilization
Rate
Optimal
:
number
variable
Slope1
:
number
variable
Slope2
:
number
Returns
Promise
<
{
ix
:
TransactionInstruction
}
>
user
Return
Loan
From
Escrow
user
Return
Loan
From
Escrow
(
params
:
{
connection
:
Connection
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
)
:
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
Parameters
params:
{
connection
:
Connection
;
loan
:
PublicKey
;
nftMint
:
PublicKey
;
programId
:
PublicKey
;
user
:
PublicKey
}
connection
:
Connection
loan
:
PublicKey
nft
Mint
:
PublicKey
program
Id
:
PublicKey
user
:
PublicKey
Returns
Promise
<
{
ixs
:
TransactionInstruction
[]
}
>
Exports
Internals
loans
utils
Externals
BN
web3
anchor
RawBNs
And
Pubkeys
To
Nums
And
Strings
approve
Loan
By
Admin
calculation
Reward
Cardinal
close
Loan
By
Admin
create
And
Send
V0
Tx
decode
Loan
decode
Lot
Ticket
decoded
Collection
Info
decoded
Deposit
decoded
Farmer
decoded
Lending
Stake
decoded
Loan
decoded
Price
Based
Liquidity
Pool
decoded
Time
Based
Liquidity
Pool
deposit
Liquidity
find
Rule
SetPDA
find
Token
Record
Pda
get
All
Program
Accounts
get
Cardinal
Accounts
get
Metaplex
Edition
Pda
get
Metaplex
Metadata
get
Most
Optimal
Loans
Closest
To
Needed
Sol
In
Bulk
harvest
Liquidity
initialize
Collection
Info
initialize
Price
Based
Liquidity
Pool
liquidate
Loan
To
Raffles
objectBNs
And
Pubkeys
To
Nums
payback
Loan
Ix
payback
Loan
With
Grace
Ix
propose
Loan
Ix
put
Loan
To
Liquidation
Raffles
reject
Loan
By
Admin
return
Anchor
Program
return
From
Grace
To
Active
stake
Cardinal
Ix
stop
Liquidation
Raffles
unstake
Cardinal
Ix
unstake
Liquidity
update
Collection
Info
update
Price
Based
Liquidity
Pool
user
Return
Loan
From
Escrow
Generated using
TypeDoc