@streamflow/stream 10.0.0-alpha.p313.4470e29 → 10.0.0-alpha.p313.46c7838
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/dist/cjs/index.cjs +161 -48
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/solana/descriptor/streamflow_aligned_unlocks.d.cts +101 -1
- package/dist/cjs/solana/index.cjs +161 -48
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +14 -13
- package/dist/esm/index.js +161 -48
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/descriptor/idl/streamflow_aligned_unlocks.json +101 -1
- package/dist/esm/solana/descriptor/streamflow_aligned_unlocks.d.ts +101 -1
- package/dist/esm/solana/index.d.ts +14 -13
- package/dist/esm/solana/index.js +161 -48
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"address": "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "streamflow_aligned_unlocks",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.4.0",
|
|
6
6
|
"spec": "0.1.0",
|
|
7
7
|
"description": "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics"
|
|
8
8
|
},
|
|
@@ -876,6 +876,80 @@
|
|
|
876
876
|
],
|
|
877
877
|
"args": []
|
|
878
878
|
},
|
|
879
|
+
{
|
|
880
|
+
"name": "update_contract",
|
|
881
|
+
"discriminator": [
|
|
882
|
+
78,
|
|
883
|
+
184,
|
|
884
|
+
162,
|
|
885
|
+
174,
|
|
886
|
+
233,
|
|
887
|
+
5,
|
|
888
|
+
40,
|
|
889
|
+
82
|
|
890
|
+
],
|
|
891
|
+
"accounts": [
|
|
892
|
+
{
|
|
893
|
+
"name": "sender",
|
|
894
|
+
"writable": true,
|
|
895
|
+
"signer": true
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"name": "proxy_metadata",
|
|
899
|
+
"docs": [
|
|
900
|
+
"Proxy Contract"
|
|
901
|
+
],
|
|
902
|
+
"writable": true,
|
|
903
|
+
"pda": {
|
|
904
|
+
"seeds": [
|
|
905
|
+
{
|
|
906
|
+
"kind": "const",
|
|
907
|
+
"value": [
|
|
908
|
+
99,
|
|
909
|
+
111,
|
|
910
|
+
110,
|
|
911
|
+
116,
|
|
912
|
+
114,
|
|
913
|
+
97,
|
|
914
|
+
99,
|
|
915
|
+
116
|
|
916
|
+
]
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"kind": "account",
|
|
920
|
+
"path": "stream_metadata"
|
|
921
|
+
}
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "stream_metadata",
|
|
927
|
+
"writable": true
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"name": "withdrawor",
|
|
931
|
+
"writable": true
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
"name": "streamflow_program",
|
|
935
|
+
"address": "strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"name": "system_program",
|
|
939
|
+
"address": "11111111111111111111111111111111"
|
|
940
|
+
}
|
|
941
|
+
],
|
|
942
|
+
"args": [
|
|
943
|
+
{
|
|
944
|
+
"name": "params",
|
|
945
|
+
"type": {
|
|
946
|
+
"defined": {
|
|
947
|
+
"name": "UpdateContractParams"
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
]
|
|
952
|
+
},
|
|
879
953
|
{
|
|
880
954
|
"name": "update_test_oracle",
|
|
881
955
|
"discriminator": [
|
|
@@ -1471,6 +1545,32 @@
|
|
|
1471
1545
|
]
|
|
1472
1546
|
}
|
|
1473
1547
|
},
|
|
1548
|
+
{
|
|
1549
|
+
"name": "UpdateContractParams",
|
|
1550
|
+
"type": {
|
|
1551
|
+
"kind": "struct",
|
|
1552
|
+
"fields": [
|
|
1553
|
+
{
|
|
1554
|
+
"name": "transferable_by_sender",
|
|
1555
|
+
"type": {
|
|
1556
|
+
"option": "bool"
|
|
1557
|
+
}
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
"name": "transferable_by_recipient",
|
|
1561
|
+
"type": {
|
|
1562
|
+
"option": "bool"
|
|
1563
|
+
}
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
"name": "cancelable_by_sender",
|
|
1567
|
+
"type": {
|
|
1568
|
+
"option": "bool"
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
]
|
|
1572
|
+
}
|
|
1573
|
+
},
|
|
1474
1574
|
{
|
|
1475
1575
|
"name": "UpdateTestOracleParams",
|
|
1476
1576
|
"type": {
|
|
@@ -8,7 +8,7 @@ type StreamflowAlignedUnlocks = {
|
|
|
8
8
|
"address": "aSTRM2NKoKxNnkmLWk9sz3k74gKBk9t7bpPrTGxMszH";
|
|
9
9
|
"metadata": {
|
|
10
10
|
"name": "streamflowAlignedUnlocks";
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.4.0";
|
|
12
12
|
"spec": "0.1.0";
|
|
13
13
|
"description": "Proxy to update unlock amount within Streamflow vesting protocol according to Token performance and other metrics";
|
|
14
14
|
};
|
|
@@ -882,6 +882,80 @@ type StreamflowAlignedUnlocks = {
|
|
|
882
882
|
];
|
|
883
883
|
"args": [];
|
|
884
884
|
},
|
|
885
|
+
{
|
|
886
|
+
"name": "updateContract";
|
|
887
|
+
"discriminator": [
|
|
888
|
+
78,
|
|
889
|
+
184,
|
|
890
|
+
162,
|
|
891
|
+
174,
|
|
892
|
+
233,
|
|
893
|
+
5,
|
|
894
|
+
40,
|
|
895
|
+
82
|
|
896
|
+
];
|
|
897
|
+
"accounts": [
|
|
898
|
+
{
|
|
899
|
+
"name": "sender";
|
|
900
|
+
"writable": true;
|
|
901
|
+
"signer": true;
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"name": "proxyMetadata";
|
|
905
|
+
"docs": [
|
|
906
|
+
"Proxy Contract"
|
|
907
|
+
];
|
|
908
|
+
"writable": true;
|
|
909
|
+
"pda": {
|
|
910
|
+
"seeds": [
|
|
911
|
+
{
|
|
912
|
+
"kind": "const";
|
|
913
|
+
"value": [
|
|
914
|
+
99,
|
|
915
|
+
111,
|
|
916
|
+
110,
|
|
917
|
+
116,
|
|
918
|
+
114,
|
|
919
|
+
97,
|
|
920
|
+
99,
|
|
921
|
+
116
|
|
922
|
+
];
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
"kind": "account";
|
|
926
|
+
"path": "streamMetadata";
|
|
927
|
+
}
|
|
928
|
+
];
|
|
929
|
+
};
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"name": "streamMetadata";
|
|
933
|
+
"writable": true;
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "withdrawor";
|
|
937
|
+
"writable": true;
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"name": "streamflowProgram";
|
|
941
|
+
"address": "strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m";
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "systemProgram";
|
|
945
|
+
"address": "11111111111111111111111111111111";
|
|
946
|
+
}
|
|
947
|
+
];
|
|
948
|
+
"args": [
|
|
949
|
+
{
|
|
950
|
+
"name": "params";
|
|
951
|
+
"type": {
|
|
952
|
+
"defined": {
|
|
953
|
+
"name": "updateContractParams";
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
];
|
|
958
|
+
},
|
|
885
959
|
{
|
|
886
960
|
"name": "updateTestOracle";
|
|
887
961
|
"discriminator": [
|
|
@@ -1477,6 +1551,32 @@ type StreamflowAlignedUnlocks = {
|
|
|
1477
1551
|
];
|
|
1478
1552
|
};
|
|
1479
1553
|
},
|
|
1554
|
+
{
|
|
1555
|
+
"name": "updateContractParams";
|
|
1556
|
+
"type": {
|
|
1557
|
+
"kind": "struct";
|
|
1558
|
+
"fields": [
|
|
1559
|
+
{
|
|
1560
|
+
"name": "transferableBySender";
|
|
1561
|
+
"type": {
|
|
1562
|
+
"option": "bool";
|
|
1563
|
+
};
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
"name": "transferableByRecipient";
|
|
1567
|
+
"type": {
|
|
1568
|
+
"option": "bool";
|
|
1569
|
+
};
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
"name": "cancelableBySender";
|
|
1573
|
+
"type": {
|
|
1574
|
+
"option": "bool";
|
|
1575
|
+
};
|
|
1576
|
+
}
|
|
1577
|
+
];
|
|
1578
|
+
};
|
|
1579
|
+
},
|
|
1480
1580
|
{
|
|
1481
1581
|
"name": "updateTestOracleParams";
|
|
1482
1582
|
"type": {
|
|
@@ -553,7 +553,7 @@ declare class SolanaStreamClient {
|
|
|
553
553
|
* @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender wallet, metadata keys, and compute settings
|
|
554
554
|
* @returns Create stream instructions
|
|
555
555
|
*/
|
|
556
|
-
|
|
556
|
+
prepareCreateLinearStreamInstructions({ recipient, tokenId: mint, start, amount: depositedAmount, period, cliff, cliffAmount, amountPerPeriod, name, canPause, canUpdateRate, canTopup, cancelableBySender, cancelableByRecipient, transferableBySender, transferableByRecipient, automaticWithdrawal, withdrawalFrequency, partner, tokenProgramId: streamTokenProgramId, }: ICreateStreamData, { sender, metadataPubKeys, isNative, computePrice, computeLimit }: IPrepareCreateStreamExt): Promise<ICreateStreamInstructions>;
|
|
557
557
|
/**
|
|
558
558
|
* Creates a new stream/vesting contract using unchecked instruction.
|
|
559
559
|
*
|
|
@@ -583,7 +583,7 @@ declare class SolanaStreamClient {
|
|
|
583
583
|
* @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
|
|
584
584
|
* @returns Create multiple transaction instructions
|
|
585
585
|
*/
|
|
586
|
-
buildCreateMultipleTransactionInstructions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamExt): Promise<{
|
|
586
|
+
buildCreateMultipleTransactionInstructions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamExt, applyCustomAfterInstructions?: boolean): Promise<{
|
|
587
587
|
instructionsBatch: {
|
|
588
588
|
ixs: TransactionInstruction[];
|
|
589
589
|
metadata: Keypair | undefined;
|
|
@@ -619,7 +619,7 @@ declare class SolanaStreamClient {
|
|
|
619
619
|
* @param {IPrepareCreateStreamExt} extParams - Transaction configuration including sender public key, native token handling, and custom instructions
|
|
620
620
|
* @returns Multiple transaction information
|
|
621
621
|
*/
|
|
622
|
-
buildCreateMultipleTransactions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamExt): Promise<{
|
|
622
|
+
buildCreateMultipleTransactions(data: ICreateMultipleStreamData, extParams: IPrepareCreateStreamExt, applyCustomAfterInstructions?: boolean): Promise<{
|
|
623
623
|
transactions: BatchItem[];
|
|
624
624
|
metadatas: string[];
|
|
625
625
|
metadataToRecipient: MetadataRecipientHashMap;
|
|
@@ -637,7 +637,7 @@ declare class SolanaStreamClient {
|
|
|
637
637
|
* @param {ICreateStreamExt} extParams - Transaction configuration including sender wallet, metadata keys, and compute settings
|
|
638
638
|
* @returns Multiple transaction information
|
|
639
639
|
*/
|
|
640
|
-
createMultiple(data: ICreateMultipleStreamData, extParams: ICreateStreamExt): Promise<IMultiTransactionResult>;
|
|
640
|
+
createMultiple(data: ICreateMultipleStreamData[] | ICreateMultipleStreamData, extParams: ICreateStreamExt): Promise<IMultiTransactionResult>;
|
|
641
641
|
/**
|
|
642
642
|
* Creates multiple stream/vesting contracts, and send all transactions sequentially.
|
|
643
643
|
* All fees are paid by sender (escrow metadata account rent, escrow token account rent, recipient's associated token account rent, Streamflow's service fee).
|
|
@@ -646,7 +646,7 @@ declare class SolanaStreamClient {
|
|
|
646
646
|
* @param {ICreateStreamExt} extParams - Transaction configuration including sender wallet, metadata keys, and compute settings
|
|
647
647
|
* @returns Multiple transaction information
|
|
648
648
|
*/
|
|
649
|
-
createMultipleSequential(data: ICreateMultipleStreamData, extParams: ICreateStreamExt): Promise<IMultiTransactionResult>;
|
|
649
|
+
createMultipleSequential(data: ICreateMultipleStreamData[] | ICreateMultipleStreamData, extParams: ICreateStreamExt): Promise<IMultiTransactionResult>;
|
|
650
650
|
/**
|
|
651
651
|
* Attempts withdrawing from the specified stream.
|
|
652
652
|
* @param {IWithdrawData} withdrawData - Withdrawal parameters including stream ID and amount to withdraw
|
|
@@ -688,7 +688,7 @@ declare class SolanaStreamClient {
|
|
|
688
688
|
* @param {IPrepareStreamExt} extParams - Transaction configuration including invoker wallet, token account validation, and compute settings
|
|
689
689
|
* @returns Transaction instructions
|
|
690
690
|
*/
|
|
691
|
-
|
|
691
|
+
prepareCancelLinearStream({ id }: ICancelData, { invoker, checkTokenAccounts, computePrice, computeLimit }: IPrepareStreamExt): Promise<TransactionInstruction[]>;
|
|
692
692
|
/**
|
|
693
693
|
* Attempts changing the stream/vesting contract's recipient (effectively transferring the stream/vesting contract).
|
|
694
694
|
* Potential associated token account rent fee (to make it rent-exempt) is paid by the transaction initiator.
|
|
@@ -771,11 +771,11 @@ declare class SolanaStreamClient {
|
|
|
771
771
|
*/
|
|
772
772
|
getDefaultStreamflowFee(): Promise<number>;
|
|
773
773
|
/**
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
774
|
+
* Returns total fee percent, streamflow fees + partner fees
|
|
775
|
+
* @param getFeesData structure with address for which we need to derive fee, either sender or partner usually
|
|
776
|
+
* @param chainSpecificParams additional parameters required by chain client
|
|
777
|
+
* @returns fee as floating number, so if fee is 0.99%, it will return 0.99
|
|
778
|
+
*/
|
|
779
779
|
getTotalFee(getFeesData: IGetFeesData): Promise<number>;
|
|
780
780
|
/**
|
|
781
781
|
* Extracts error code from an error
|
|
@@ -784,9 +784,10 @@ declare class SolanaStreamClient {
|
|
|
784
784
|
*/
|
|
785
785
|
extractErrorCode(err: Error): string | null;
|
|
786
786
|
/**
|
|
787
|
-
|
|
788
|
-
|
|
787
|
+
* Utility function that checks whether the associated stream address is an aligned unlock contract, indicated by whether the sender/creator is a PDA
|
|
788
|
+
*/
|
|
789
789
|
isAlignedUnlock(streamPublicKey: PublicKey, senderPublicKey: PublicKey): boolean;
|
|
790
|
+
private flatBuildCreateMultipleTransactionInstructions;
|
|
790
791
|
/**
|
|
791
792
|
* Utility function to generate metadata for a Contract or return existing Pubkey
|
|
792
793
|
*/
|