@streamflow/distributor 7.4.5 → 7.4.7
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.
|
@@ -21,6 +21,9 @@ class BaseDistributorClient {
|
|
|
21
21
|
this.programId = programId !== "" ? new web3_js_1.PublicKey(programId) : new web3_js_1.PublicKey(constants_1.DISTRIBUTOR_PROGRAM_ID[cluster]);
|
|
22
22
|
this.sendThrottler = sendThrottler ?? (0, solana_1.buildSendThrottler)(sendRate);
|
|
23
23
|
}
|
|
24
|
+
getConnection() {
|
|
25
|
+
return this.connection;
|
|
26
|
+
}
|
|
24
27
|
getCommitment() {
|
|
25
28
|
return typeof this.commitment == "string" ? this.commitment : this.commitment.commitment;
|
|
26
29
|
}
|
|
@@ -21,6 +21,7 @@ export default abstract class BaseDistributorClient {
|
|
|
21
21
|
constructor({ clusterUrl, cluster, commitment, programId, sendRate, sendThrottler, }: IInitOptions);
|
|
22
22
|
protected abstract getNewDistributorInstruction(data: ICreateDistributorData | ICreateAlignedDistributorData, accounts: NewDistributorAccounts): Promise<TransactionInstruction>;
|
|
23
23
|
protected abstract getClawbackInstruction(account: ClawbackAccounts): Promise<TransactionInstruction>;
|
|
24
|
+
getConnection(): Connection;
|
|
24
25
|
getCommitment(): Commitment | undefined;
|
|
25
26
|
getDistributorProgramId(): PublicKey;
|
|
26
27
|
prepareCreateInstructions(data: ICreateDistributorData | ICreateAlignedDistributorData, extParams: ICreateSolanaExt): Promise<{
|
|
@@ -20,6 +20,9 @@ export default class BaseDistributorClient {
|
|
|
20
20
|
this.programId = programId !== "" ? new PublicKey(programId) : new PublicKey(DISTRIBUTOR_PROGRAM_ID[cluster]);
|
|
21
21
|
this.sendThrottler = sendThrottler ?? buildSendThrottler(sendRate);
|
|
22
22
|
}
|
|
23
|
+
getConnection() {
|
|
24
|
+
return this.connection;
|
|
25
|
+
}
|
|
23
26
|
getCommitment() {
|
|
24
27
|
return typeof this.commitment == "string" ? this.commitment : this.commitment.commitment;
|
|
25
28
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
2
|
+
import { Program } from "@coral-xyz/anchor";
|
|
2
3
|
import { ICreateAlignedDistributorData, AlignedDistributorData, NewAlignedDistributorArgs } from "../types";
|
|
3
4
|
import { ClawbackAccounts, NewDistributorAccounts } from "../generated/instructions";
|
|
4
5
|
import BaseDistributorClient, { IInitOptions } from "./BaseDistributorClient.js";
|
|
6
|
+
import { AlignedDistributor as AlignedAirdropsProgramType } from "../descriptor/aligned_distributor.js";
|
|
5
7
|
export default class SolanaAlignedDistributorClient extends BaseDistributorClient {
|
|
6
|
-
|
|
8
|
+
alignedProxyProgram: Program<AlignedAirdropsProgramType>;
|
|
7
9
|
constructor({ clusterUrl, cluster, commitment, programId, sendRate, sendThrottler }: IInitOptions);
|
|
8
10
|
getAlignedDistributorProgramId(): PublicKey;
|
|
9
11
|
getAlignedDistributorAddress(distributorAddress: string): PublicKey;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamflow/distributor",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.7",
|
|
4
4
|
"description": "JavaScript SDK to interact with Streamflow Airdrop protocol.",
|
|
5
5
|
"homepage": "https://github.com/streamflow-finance/js-sdk/",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"lint": "eslint --fix .",
|
|
27
27
|
"prepublishOnly": "npm run lint && npm run build"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "547087120cbe214f96bf08adca92466a5d449edf",
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@streamflow/eslint-config": "7.4.
|
|
31
|
+
"@streamflow/eslint-config": "7.4.7",
|
|
32
32
|
"@types/bn.js": "5.1.1",
|
|
33
33
|
"date-fns": "2.28.0",
|
|
34
34
|
"typescript": "^5.6.3"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@solana/spl-token": "0.4.9",
|
|
41
41
|
"@solana/wallet-adapter-base": "0.9.19",
|
|
42
42
|
"@solana/web3.js": "1.95.4",
|
|
43
|
-
"@streamflow/common": "7.4.
|
|
43
|
+
"@streamflow/common": "7.4.7",
|
|
44
44
|
"bn.js": "5.2.1",
|
|
45
45
|
"borsh": "^2.0.0",
|
|
46
46
|
"bs58": "5.0.0",
|