-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: #149 --- ### SDK: Return current position --- SDK exposes the current staker's balances with two values: stBTC shares balance (Obtained from: stBTC.balanceOf(address)) tBTC assets balance (Obtained from: stBTC.assetsBalanceOf(address) - depends on #221)
- Loading branch information
Showing
9 changed files
with
1,848 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { TBTCDepositor } from "./tbtc-depositor" | ||
import { StBTC } from "./stbtc" | ||
|
||
export * from "./tbtc-depositor" | ||
export * from "./chain-identifier" | ||
export * from "./stbtc" | ||
export * from "./depositor-proxy" | ||
|
||
/** | ||
* Represents all contracts that allow interaction with the Acre network. | ||
*/ | ||
export type AcreContracts = { | ||
tbtcDepositor: TBTCDepositor | ||
stBTC: StBTC | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ChainIdentifier } from "./chain-identifier" | ||
|
||
export interface StBTC { | ||
/** | ||
* @param identifier The generic chain identifier. | ||
* @returns Value of the basis for calculating final BTC balance. | ||
*/ | ||
balanceOf(identifier: ChainIdentifier): Promise<bigint> | ||
|
||
/** | ||
* @param identifier The generic chain identifier. | ||
* @returns Maximum withdraw value. | ||
*/ | ||
assetsBalanceOf(identifier: ChainIdentifier): Promise<bigint> | ||
} |
Oops, something went wrong.