Search
Preparing search index...
The search index is not available
@saberhq/saber-periphery - v1.1.3
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@saberhq/saber-periphery - v1.1.3
ActionPlan
Class ActionPlan
Hierarchy
ActionPlan
Index
Constructors
constructor
Properties
actions
input
Amount
minimum
Amount
Out
program
router
Methods
add
Action
buildTX
buildTXWith
Ephemeral
Input
manualSSWithdraw
One
Constructors
constructor
new
Action
Plan
(
router
:
Router
, inputAmount
:
TokenAmount
, minimumAmountOut
:
TokenAmount
, actions
?:
Action
[]
)
:
ActionPlan
Parameters
router:
Router
inputAmount:
TokenAmount
minimumAmountOut:
TokenAmount
actions:
Action
[]
= []
Returns
ActionPlan
Properties
Readonly
actions
actions
:
Action
[]
= []
Readonly
input
Amount
input
Amount
:
TokenAmount
Readonly
minimum
Amount
Out
minimum
Amount
Out
:
TokenAmount
Readonly
program
program
:
AnchorProgram
<
ContinuationRouterIDL
,
{
continuation
:
AnchorTypeDef
<
{
name
:
"Continuation"
;
type
:
{
fields
:
[
{
name
:
"owner"
;
type
:
"publicKey"
}
,
{
name
:
"payer"
;
type
:
"publicKey"
}
,
{
name
:
"initialAmountIn"
;
type
:
{
defined
:
"TokenAmount"
}
}
,
{
name
:
"input"
;
type
:
"publicKey"
}
,
{
name
:
"amountIn"
;
type
:
{
defined
:
"TokenAmount"
}
}
,
{
name
:
"stepsLeft"
;
type
:
"u16"
}
,
{
name
:
"output"
;
type
:
"publicKey"
}
]
;
kind
:
"struct"
}
}
&
{
name
:
"Continuation"
}
,
AnchorDefined
<
ContinuationRouterIDL
,
Record
<
string
,
never
>
>
>
}
,
AnchorDefined
<
ContinuationRouterIDL
,
Record
<
string
,
never
>
>
,
MakeInstructions
<
[
{
accounts
:
[
{
isMut
:
true
;
isSigner
:
true
;
name
:
"payer"
}
,
{
isMut
:
true
;
isSigner
:
false
;
name
:
"ata"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"authority"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"mint"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"rent"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"systemProgram"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"tokenProgram"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"associatedTokenProgram"
}
]
;
args
:
[
]
;
name
:
"createAtaIfNotExists"
}
,
{
accounts
:
[
{
isMut
:
true
;
isSigner
:
false
;
name
:
"continuation"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"random"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"input"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"output"
}
,
{
isMut
:
false
;
isSigner
:
true
;
name
:
"owner"
}
,
{
isMut
:
true
;
isSigner
:
true
;
name
:
"payer"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"rent"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"systemProgram"
}
]
;
args
:
[
{
name
:
"amountIn"
;
type
:
"u64"
}
,
{
name
:
"minimumAmountOut"
;
type
:
"u64"
}
,
{
name
:
"numSteps"
;
type
:
"u16"
}
]
;
name
:
"begin"
}
,
{
accounts
:
[
{
isMut
:
true
;
isSigner
:
false
;
name
:
"continuation"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"input"
}
,
{
isMut
:
false
;
isSigner
:
false
;
name
:
"output"
}
,
{
isMut
:
false
;
isSigner
:
true
;
name
:
"owner"
}
]
;
args
:
[
{
name
:
"amountIn"
;
type
:
"u64"
}
,
{
name
:
"minimumAmountOut"
;
type
:
"u64"
}
,
{
name
:
"numSteps"
;
type
:
"u16"
}
]
;
name
:
"beginV2"
}
]
,
AnchorDefined
<
ContinuationRouterIDL
,
Record
<
string
,
never
>
>
>
,
MakeInstructions
<
unknown
,
AnchorDefined
<
ContinuationRouterIDL
,
Record
<
string
,
never
>
>
>
>
Readonly
router
router
:
Router
Methods
add
Action
add
Action
(
...
actions
:
Action
[]
)
:
ActionPlan
Parameters
Rest
...
actions:
Action
[]
Returns
ActionPlan
buildTX
buildTX
(
)
:
Promise
<
TransactionEnvelope
>
Returns
Promise
<
TransactionEnvelope
>
buildTXWith
Ephemeral
Input
buildTXWith
Ephemeral
Input
(
ephemeralInput
:
PublicKey
)
:
Promise
<
TransactionEnvelope
>
Parameters
ephemeralInput:
PublicKey
Returns
Promise
<
TransactionEnvelope
>
manualSSWithdraw
One
manualSSWithdraw
One
(
)
:
Promise
<
TransactionEnvelope
>
Returns
Promise
<
TransactionEnvelope
>
Exports
Action
Plan
constructor
actions
input
Amount
minimum
Amount
Out
program
router
add
Action
buildTX
buildTXWith
Ephemeral
Input
manualSSWithdraw
One
Generated using
TypeDoc