@streamflow/stream 5.9.1 → 5.9.3
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.
|
@@ -36,11 +36,11 @@ export default class SolanaStreamClient extends BaseStreamClient {
|
|
|
36
36
|
/**
|
|
37
37
|
* Attempts withdrawing from the specified stream.
|
|
38
38
|
*/
|
|
39
|
-
withdraw({ id, amount }: IWithdrawData, { invoker }: IInteractStreamSolanaExt): Promise<ITransactionResult>;
|
|
39
|
+
withdraw({ id, amount }: IWithdrawData, { invoker, checkTokenAccounts }: IInteractStreamSolanaExt): Promise<ITransactionResult>;
|
|
40
40
|
/**
|
|
41
41
|
* Attempts canceling the specified stream.
|
|
42
42
|
*/
|
|
43
|
-
cancel({ id }: ICancelData, { invoker }: IInteractStreamSolanaExt): Promise<ITransactionResult>;
|
|
43
|
+
cancel({ id }: ICancelData, { invoker, checkTokenAccounts }: IInteractStreamSolanaExt): Promise<ITransactionResult>;
|
|
44
44
|
/**
|
|
45
45
|
* Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract).
|
|
46
46
|
* Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator.
|
|
@@ -496,7 +496,7 @@ var SolanaStreamClient = /** @class */ (function (_super) {
|
|
|
496
496
|
*/
|
|
497
497
|
SolanaStreamClient.prototype.withdraw = function (_a, _b) {
|
|
498
498
|
var id = _a.id, amount = _a.amount;
|
|
499
|
-
var invoker = _b.invoker;
|
|
499
|
+
var invoker = _b.invoker, checkTokenAccounts = _b.checkTokenAccounts;
|
|
500
500
|
return __awaiter(this, void 0, void 0, function () {
|
|
501
501
|
var ixs, streamPublicKey, escrow, data, streamflowTreasuryTokens, partnerTokens, commitment, hash, tx, signature;
|
|
502
502
|
var _c;
|
|
@@ -521,7 +521,7 @@ var SolanaStreamClient = /** @class */ (function (_super) {
|
|
|
521
521
|
return [4 /*yield*/, (0, utils_1.ata)(data.mint, data.partner)];
|
|
522
522
|
case 3:
|
|
523
523
|
partnerTokens = _d.sent();
|
|
524
|
-
return [4 /*yield*/, this.checkAssociatedTokenAccounts(data, { invoker: invoker }, ixs)];
|
|
524
|
+
return [4 /*yield*/, this.checkAssociatedTokenAccounts(data, { invoker: invoker, checkTokenAccounts: checkTokenAccounts }, ixs)];
|
|
525
525
|
case 4:
|
|
526
526
|
_d.sent();
|
|
527
527
|
ixs.push((0, instructions_1.withdrawStreamInstruction)(amount, this.programId, {
|
|
@@ -559,7 +559,7 @@ var SolanaStreamClient = /** @class */ (function (_super) {
|
|
|
559
559
|
*/
|
|
560
560
|
SolanaStreamClient.prototype.cancel = function (_a, _b) {
|
|
561
561
|
var id = _a.id;
|
|
562
|
-
var invoker = _b.invoker;
|
|
562
|
+
var invoker = _b.invoker, checkTokenAccounts = _b.checkTokenAccounts;
|
|
563
563
|
return __awaiter(this, void 0, void 0, function () {
|
|
564
564
|
var streamPublicKey, escrowAcc, data, streamflowTreasuryTokens, partnerTokens, ixs, commitment, hash, tx, signature;
|
|
565
565
|
var _c;
|
|
@@ -584,7 +584,7 @@ var SolanaStreamClient = /** @class */ (function (_super) {
|
|
|
584
584
|
case 3:
|
|
585
585
|
partnerTokens = _d.sent();
|
|
586
586
|
ixs = [];
|
|
587
|
-
return [4 /*yield*/, this.checkAssociatedTokenAccounts(data, { invoker: invoker }, ixs)];
|
|
587
|
+
return [4 /*yield*/, this.checkAssociatedTokenAccounts(data, { invoker: invoker, checkTokenAccounts: checkTokenAccounts }, ixs)];
|
|
588
588
|
case 4:
|
|
589
589
|
_d.sent();
|
|
590
590
|
ixs.push((0, instructions_1.cancelStreamInstruction)(this.programId, {
|
|
@@ -1047,7 +1047,7 @@ var SolanaStreamClient = /** @class */ (function (_super) {
|
|
|
1047
1047
|
response = _b.sent();
|
|
1048
1048
|
for (i = 0; i < response.length; i++) {
|
|
1049
1049
|
if (!response[i]) {
|
|
1050
|
-
ixs.push((0, spl_token_2.createAssociatedTokenAccountInstruction)(invoker.publicKey, accountArrays[i][
|
|
1050
|
+
ixs.push((0, spl_token_2.createAssociatedTokenAccountInstruction)(invoker.publicKey, accountArrays[i][1], accountArrays[i][0], data.mint, spl_token_1.TOKEN_PROGRAM_ID, spl_token_1.ASSOCIATED_TOKEN_PROGRAM_ID));
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
1053
|
return [2 /*return*/];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamflow/stream",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.3",
|
|
4
4
|
"description": "JavaScript SDK to interact with Streamflow protocol.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"homepage": "https://github.com/streamflow-finance/js-sdk/",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"lint": "eslint .",
|
|
12
12
|
"prepublishOnly": "npm run lint && npm test && npm run build"
|
|
13
13
|
},
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "bbd68ea8fa88b935fdee2aca406add9bcb584a2d",
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/bn.js": "5.1.1",
|
|
17
17
|
"@types/ethereum-checksum-address": "^0.0.0",
|