@wireio/stake 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/stake.browser.js +5 -5
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +3 -4
- package/lib/stake.js +5 -5
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +5 -5
- package/lib/stake.m.js.map +1 -1
- package/package.json +1 -1
- package/src/networks/ethereum/utils.ts +1 -1
- package/src/networks/solana/solana.ts +2 -1
- package/src/networks/solana/types.ts +2 -3
- package/src/networks/solana/utils.ts +5 -5
- package/src/types.ts +1 -1
package/lib/stake.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ interface TrancheSnapshot {
|
|
|
104
104
|
/** Current tranche supply state (1e8 scale) */
|
|
105
105
|
currentTrancheSupply: bigint;
|
|
106
106
|
initialTrancheSupply: bigint;
|
|
107
|
-
|
|
107
|
+
totalWarrantsSold: bigint;
|
|
108
108
|
/** Native token → USD price if available (SOL/USD, ETH/USD, etc, 1e8 scale) */
|
|
109
109
|
nativePriceUsd?: bigint;
|
|
110
110
|
/** Optional timestamp (sec) for the last recorded native price */
|
|
@@ -582,7 +582,7 @@ type GlobalState = {
|
|
|
582
582
|
type UserWarrantRecord = {
|
|
583
583
|
user: PublicKey$1;
|
|
584
584
|
totalSolDeposited: BN;
|
|
585
|
-
|
|
585
|
+
totalWarrantsPurchased: BN;
|
|
586
586
|
lastTrancheNumber: BN;
|
|
587
587
|
lastTranchePriceUsd: BN;
|
|
588
588
|
bump: number;
|
|
@@ -592,7 +592,6 @@ type TrancheState = {
|
|
|
592
592
|
currentTrancheNumber: BN;
|
|
593
593
|
currentTrancheSupply: BN;
|
|
594
594
|
currentTranchePriceUsd: BN;
|
|
595
|
-
totalPretokensSold?: BN;
|
|
596
595
|
totalWarrantsSold?: BN;
|
|
597
596
|
initialTrancheSupply: BN;
|
|
598
597
|
supplyGrowthBps: number;
|
|
@@ -5324,7 +5323,7 @@ declare function buildSolanaTrancheLadder(options: {
|
|
|
5324
5323
|
currentTranche: number;
|
|
5325
5324
|
initialTrancheSupply: bigint;
|
|
5326
5325
|
currentTrancheSupply: bigint;
|
|
5327
|
-
|
|
5326
|
+
totalWarrantsSold: bigint;
|
|
5328
5327
|
currentPriceUsd: bigint;
|
|
5329
5328
|
supplyGrowthBps: number;
|
|
5330
5329
|
priceGrowthBps: number;
|
package/lib/stake.js
CHANGED
|
@@ -5967,7 +5967,7 @@ function buildSolanaTrancheSnapshot(options) {
|
|
|
5967
5967
|
const currentTranche = trancheState.currentTrancheNumber.toNumber();
|
|
5968
5968
|
const currentTrancheSupply = toBigint(trancheState.currentTrancheSupply);
|
|
5969
5969
|
const initialTrancheSupply = toBigint(trancheState.initialTrancheSupply);
|
|
5970
|
-
const
|
|
5970
|
+
const totalWarrantsSold = toBigint(trancheState.totalWarrantsSold);
|
|
5971
5971
|
const currentPriceUsd = toBigint(trancheState.currentTranchePriceUsd);
|
|
5972
5972
|
const supplyGrowthBps = trancheState.supplyGrowthBps;
|
|
5973
5973
|
const priceGrowthBps = trancheState.priceGrowthBps;
|
|
@@ -5977,7 +5977,7 @@ function buildSolanaTrancheSnapshot(options) {
|
|
|
5977
5977
|
currentTranche,
|
|
5978
5978
|
initialTrancheSupply,
|
|
5979
5979
|
currentTrancheSupply,
|
|
5980
|
-
|
|
5980
|
+
totalWarrantsSold,
|
|
5981
5981
|
currentPriceUsd,
|
|
5982
5982
|
supplyGrowthBps,
|
|
5983
5983
|
priceGrowthBps,
|
|
@@ -5994,7 +5994,7 @@ function buildSolanaTrancheSnapshot(options) {
|
|
|
5994
5994
|
priceGrowthBps,
|
|
5995
5995
|
currentTrancheSupply,
|
|
5996
5996
|
initialTrancheSupply,
|
|
5997
|
-
|
|
5997
|
+
totalWarrantsSold,
|
|
5998
5998
|
nativePriceUsd: solPriceUsd,
|
|
5999
5999
|
nativePriceTimestamp,
|
|
6000
6000
|
ladder
|
|
@@ -7031,7 +7031,7 @@ class SolanaStakingClient {
|
|
|
7031
7031
|
const trancheState = (_g = snapshot == null ? void 0 : snapshot.trancheState) != null ? _g : null;
|
|
7032
7032
|
const globalState = (_h = snapshot == null ? void 0 : snapshot.globalState) != null ? _h : null;
|
|
7033
7033
|
const stakedAmountStr = (_j = (_i = wireReceipt == null ? void 0 : wireReceipt.stakedLiqsol) == null ? void 0 : _i.toString()) != null ? _j : "0";
|
|
7034
|
-
const wireSharesStr = (_l = (_k = userWarrantRecord == null ? void 0 : userWarrantRecord.
|
|
7034
|
+
const wireSharesStr = (_l = (_k = userWarrantRecord == null ? void 0 : userWarrantRecord.totalWarrantsPurchased) == null ? void 0 : _k.toString()) != null ? _l : "0";
|
|
7035
7035
|
return {
|
|
7036
7036
|
native: {
|
|
7037
7037
|
amount: BigInt(nativeLamports),
|
|
@@ -26270,7 +26270,7 @@ function buildEthereumTrancheSnapshot(options) {
|
|
|
26270
26270
|
priceGrowthBps,
|
|
26271
26271
|
currentTrancheSupply,
|
|
26272
26272
|
initialTrancheSupply,
|
|
26273
|
-
|
|
26273
|
+
totalWarrantsSold: totalTrancheSupply,
|
|
26274
26274
|
nativePriceUsd: ethPriceUsd,
|
|
26275
26275
|
nativePriceTimestamp,
|
|
26276
26276
|
ladder
|