@streamflow/stream 7.4.13 → 7.4.15

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.
@@ -80,6 +80,11 @@ class AlignedContract extends Contract {
80
80
  this.sender = alignedProxy.sender.toBase58();
81
81
  this.canceledAt = alignedProxy.streamCanceledTime.toNumber();
82
82
  this.proxyAddress = stream.sender.toBase58();
83
+ this.initialAmountPerPeriod = alignedProxy.initialAmountPerPeriod;
84
+ this.initialPrice = (0, utils_js_1.getNumberFromBN)(alignedProxy.initialPrice, constants_js_1.ALIGNED_PRECISION_FACTOR_POW);
85
+ this.lastPrice = (0, utils_js_1.getNumberFromBN)(alignedProxy.lastPrice, constants_js_1.ALIGNED_PRECISION_FACTOR_POW);
86
+ this.lastAmountUpdateTime = alignedProxy.lastAmountUpdateTime.toNumber();
87
+ this.initialNetAmount = alignedProxy.initialNetAmount;
83
88
  // need to call this again since minPrice and maxPrice are used in determining the type
84
89
  this.type = (0, contractUtils_js_1.buildStreamType)(this);
85
90
  this.isAligned = true;
@@ -205,6 +205,11 @@ export type AlignedStreamData = {
205
205
  oracleType: OracleTypeName;
206
206
  priceOracle: string | undefined;
207
207
  tickSize: number;
208
+ initialAmountPerPeriod: BN;
209
+ initialPrice: number;
210
+ lastPrice: number;
211
+ lastAmountUpdateTime: number;
212
+ initialNetAmount: BN;
208
213
  };
209
214
  export type AlignedStream = LinearStream & AlignedStreamData;
210
215
  export type Stream = LinearStream | AlignedStream;
@@ -109,6 +109,11 @@ export declare class AlignedContract extends Contract implements AlignedStream {
109
109
  proxyAddress: string;
110
110
  priceOracle: string | undefined;
111
111
  oracleType: OracleTypeName;
112
+ initialAmountPerPeriod: BN;
113
+ initialPrice: number;
114
+ lastPrice: number;
115
+ lastAmountUpdateTime: number;
116
+ initialNetAmount: BN;
112
117
  constructor(stream: DecodedStream, alignedProxy: AlignedUnlocksContract);
113
118
  }
114
119
  export interface DecodedStream {
@@ -113,6 +113,11 @@ export class AlignedContract extends Contract {
113
113
  proxyAddress;
114
114
  priceOracle;
115
115
  oracleType;
116
+ initialAmountPerPeriod;
117
+ initialPrice;
118
+ lastPrice;
119
+ lastAmountUpdateTime;
120
+ initialNetAmount;
116
121
  constructor(stream, alignedProxy) {
117
122
  super(stream);
118
123
  this.minPrice = getNumberFromBN(alignedProxy.minPrice, ALIGNED_PRECISION_FACTOR_POW);
@@ -125,6 +130,11 @@ export class AlignedContract extends Contract {
125
130
  this.sender = alignedProxy.sender.toBase58();
126
131
  this.canceledAt = alignedProxy.streamCanceledTime.toNumber();
127
132
  this.proxyAddress = stream.sender.toBase58();
133
+ this.initialAmountPerPeriod = alignedProxy.initialAmountPerPeriod;
134
+ this.initialPrice = getNumberFromBN(alignedProxy.initialPrice, ALIGNED_PRECISION_FACTOR_POW);
135
+ this.lastPrice = getNumberFromBN(alignedProxy.lastPrice, ALIGNED_PRECISION_FACTOR_POW);
136
+ this.lastAmountUpdateTime = alignedProxy.lastAmountUpdateTime.toNumber();
137
+ this.initialNetAmount = alignedProxy.initialNetAmount;
128
138
  // need to call this again since minPrice and maxPrice are used in determining the type
129
139
  this.type = buildStreamType(this);
130
140
  this.isAligned = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamflow/stream",
3
- "version": "7.4.13",
3
+ "version": "7.4.15",
4
4
  "description": "JavaScript SDK to interact with Streamflow protocol.",
5
5
  "homepage": "https://github.com/streamflow-finance/js-sdk/",
6
6
  "main": "./dist/esm/index.js",
@@ -47,9 +47,9 @@
47
47
  "lint": "eslint --fix .",
48
48
  "prepublishOnly": "pnpm run lint && pnpm run test run && pnpm run build"
49
49
  },
50
- "gitHead": "1fdd4be9210a469bac52e97f969b679774a9aefd",
50
+ "gitHead": "3fb3977003767687e7a7b00bd69565b6bf5a1b63",
51
51
  "devDependencies": {
52
- "@streamflow/eslint-config": "7.4.13",
52
+ "@streamflow/eslint-config": "7.4.15",
53
53
  "@types/bn.js": "5.1.1",
54
54
  "@types/ethereum-checksum-address": "^0.0.0",
55
55
  "date-fns": "2.28.0",
@@ -64,7 +64,7 @@
64
64
  "@solana/spl-token": "0.4.9",
65
65
  "@solana/wallet-adapter-base": "0.9.19",
66
66
  "@solana/web3.js": "1.95.4",
67
- "@streamflow/common": "7.4.13",
67
+ "@streamflow/common": "7.4.15",
68
68
  "@suiet/wallet-kit": "^0.3.3",
69
69
  "aptos": "1.21.0",
70
70
  "bn.js": "5.2.1",