Fragmetric SDK for Node.js and Browser
@fragmetric-labs/sdk@dev
is intended to test early features on devnet and may not work with programs deployed on mainnet.RestakingProgram
is the main entry point for interacting with the Fragmetric Liquid Restaking Program.
It manages RPC configuration, global transaction settings, and more.
It also serves as the root of a hierarchical structure called the context graph,
where each node—called a context—represents a specific part of the program and provides structured access to accounts and transaction templates.
The entire SDK interface is exposed through this context graph.
restaking.fragSOL
can resolve()
on-chain and off-chain aggregated data, as shown above, which includes:
restaking.fragSOL.user(...)
instantiates a new user instance using a public key.
The user
can then call resolve()
to fetch its on-chain account data, including:
null
if the user is new.@solana/web3.js@2
),
so transaction-related interfaces are compatible with @solana/kit
.
Transaction templates like user.deposit
provide the following pipeline:
assemble
serialize
Uint8Array
).
Applies configured signers.serializeToBase64
@solana/web3.js@1
, you can use it like this:simulate
send
sendAndConfirm
parse
execute
executeChained
cancellable
: can be canceled by the userprocessing
: being processed by the protocolclaimable
: ready for final withdrawalwrap
, unwrap
and transfer
.