@streamflow/distributor 8.0.2-alpha.p287.a3616ff → 8.1.0
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 +4 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/solana/index.cjs +4 -0
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +8 -4
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/index.d.ts +8 -4
- package/dist/esm/solana/index.js +4 -1
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -12,6 +12,7 @@ import { TransferFeeConfig } from '@solana/spl-token';
|
|
|
12
12
|
type MerkleDistributorAccountTypes = IdlTypes<MerkleDistributor$1>;
|
|
13
13
|
type ClaimStatus = MerkleDistributorAccountTypes["claimStatus"];
|
|
14
14
|
type CompressedClaimStatus = MerkleDistributorAccountTypes["compressedClaimStatus"];
|
|
15
|
+
type AnyClaimStatus = ClaimStatus | CompressedClaimStatus;
|
|
15
16
|
type OracleType = IdlTypes<AlignedDistributor>["oracleType"];
|
|
16
17
|
type OracleTypeName = "none" | "pyth" | "switchboard" | "test";
|
|
17
18
|
interface IInteractSolanaExt extends ITransactionSolanaExt {
|
|
@@ -652,8 +653,8 @@ declare abstract class BaseDistributorClient {
|
|
|
652
653
|
prepareCloseClaimInstructions(data: ICloseClaimData, extParams: ITransactionSolanaExtResolved<IInteractSolanaExt>): Promise<TransactionInstruction[]>;
|
|
653
654
|
prepareClawbackInstructions(data: IClawbackData, extParams: ITransactionSolanaExtResolved<IInteractSolanaExt>): Promise<TransactionInstruction[]>;
|
|
654
655
|
clawback(data: IClawbackData, extParams: IInteractSolanaExt): Promise<ITransactionResult>;
|
|
655
|
-
getClaim(claimStatus: string | PublicKey): Promise<
|
|
656
|
-
getClaims(data: IGetClaimData[]): Promise<(
|
|
656
|
+
getClaim(claimStatus: string | PublicKey): Promise<ClaimStatus | CompressedClaimStatus | null>;
|
|
657
|
+
getClaims(data: IGetClaimData[]): Promise<(ClaimStatus | CompressedClaimStatus | null)[]>;
|
|
657
658
|
getDistributors(data: IGetDistributors): Promise<(MerkleDistributor | null)[]>;
|
|
658
659
|
searchDistributors(data: ISearchDistributors): Promise<IProgramAccount<MerkleDistributor>[]>;
|
|
659
660
|
protected prepareClaimFeeInstruction(payer: PublicKey, fee?: bigint): TransactionInstruction;
|
|
@@ -1314,6 +1315,7 @@ declare const getTestOraclePda: (programId: PublicKey, mint: PublicKey, creator:
|
|
|
1314
1315
|
declare function getDistributorPda(programId: PublicKey, mint: PublicKey, version: number): PublicKey;
|
|
1315
1316
|
declare function getClaimantStatusPda(programId: PublicKey, distributor: PublicKey, claimant: PublicKey): PublicKey;
|
|
1316
1317
|
declare function getEventAuthorityPda(programId: PublicKey): PublicKey;
|
|
1318
|
+
declare const isCompressedClaimStatus: (status?: AnyClaimStatus | null) => status is CompressedClaimStatus;
|
|
1317
1319
|
declare function wrappedSignAndExecuteTransaction(...args: Parameters<typeof signAndExecuteTransaction>): Promise<string>;
|
|
1318
1320
|
declare function calculateAmountWithTransferFees(connection: Connection, transferFeeConfig: TransferFeeConfig, transferAmount: bigint): Promise<{
|
|
1319
1321
|
transferAmount: bigint;
|
|
@@ -1364,6 +1366,7 @@ declare namespace constants {
|
|
|
1364
1366
|
type index_AlignedDistributorData = AlignedDistributorData;
|
|
1365
1367
|
type index_AnchorErrorCode = AnchorErrorCode;
|
|
1366
1368
|
declare const index_AnchorErrorCode: typeof AnchorErrorCode;
|
|
1369
|
+
type index_AnyClaimStatus = AnyClaimStatus;
|
|
1367
1370
|
type index_ClaimLockedAccounts = ClaimLockedAccounts;
|
|
1368
1371
|
type index_ClaimStatus = ClaimStatus;
|
|
1369
1372
|
type index_ClawbackAccounts = ClawbackAccounts;
|
|
@@ -1414,13 +1417,14 @@ declare const index_getClaimantStatusPda: typeof getClaimantStatusPda;
|
|
|
1414
1417
|
declare const index_getDistributorPda: typeof getDistributorPda;
|
|
1415
1418
|
declare const index_getEventAuthorityPda: typeof getEventAuthorityPda;
|
|
1416
1419
|
declare const index_getTestOraclePda: typeof getTestOraclePda;
|
|
1420
|
+
declare const index_isCompressedClaimStatus: typeof isCompressedClaimStatus;
|
|
1417
1421
|
declare const index_newClaim: typeof newClaim;
|
|
1418
1422
|
declare const index_newDistributor: typeof newDistributor;
|
|
1419
1423
|
declare const index_setAdmin: typeof setAdmin;
|
|
1420
1424
|
declare const index_setClawbackReceiver: typeof setClawbackReceiver;
|
|
1421
1425
|
declare const index_wrappedSignAndExecuteTransaction: typeof wrappedSignAndExecuteTransaction;
|
|
1422
1426
|
declare namespace index {
|
|
1423
|
-
export { type index_AlignedDistributorData as AlignedDistributorData, index_AnchorErrorCode as AnchorErrorCode, type index_ClaimLockedAccounts as ClaimLockedAccounts, type index_ClaimStatus as ClaimStatus, type index_ClawbackAccounts as ClawbackAccounts, type index_CloseClaimAccounts as CloseClaimAccounts, type index_CompressedClaimStatus as CompressedClaimStatus, index_ContractErrorCode as ContractErrorCode, type index_IClaimData as IClaimData, type index_IClawbackData as IClawbackData, type index_ICloseClaimData as ICloseClaimData, type index_ICreateAlignedDistributorData as ICreateAlignedDistributorData, type index_ICreateDistributorData as ICreateDistributorData, type index_ICreateDistributorResult as ICreateDistributorResult, type index_ICreateSolanaExt as ICreateSolanaExt, type index_IGetClaimData as IGetClaimData, type index_IGetDistributors as IGetDistributors, type index_IInteractSolanaExt as IInteractSolanaExt, type index_ISearchDistributors as ISearchDistributors, type index_ISetClawbackReceiverData as ISetClawbackReceiverData, type index_ISetDataAdmin as ISetDataAdmin, index_MerkleDistributor as MerkleDistributor, type index_MerkleDistributorAccountTypes as MerkleDistributorAccountTypes, type index_MerkleDistributorFields as MerkleDistributorFields, type index_MerkleDistributorJSON as MerkleDistributorJSON, type index_NewAlignedDistributorArgs as NewAlignedDistributorArgs, type index_NewClaimAccounts as NewClaimAccounts, type index_NewClaimArgs as NewClaimArgs, type index_NewDistributorAccounts as NewDistributorAccounts, type index_NewDistributorArgs as NewDistributorArgs, type index_OracleType as OracleType, type index_OracleTypeName as OracleTypeName, type index_SetAdminAccounts as SetAdminAccounts, type index_SetClawbackReceiverAccounts as SetClawbackReceiverAccounts, index_SolanaAlignedDistributorClient as SolanaAlignedDistributorClient, index_SolanaDistributorClient as SolanaDistributorClient, index_calculateAmountWithTransferFees as calculateAmountWithTransferFees, index_claimLocked as claimLocked, index_clawback as clawback, index_closeClaim as closeClaim, index_constants as constants, index_fromCode as fromCode, index_fromTxError as fromTxError, index_getAlignedDistributorPda as getAlignedDistributorPda, index_getClaimantStatusPda as getClaimantStatusPda, index_getDistributorPda as getDistributorPda, index_getEventAuthorityPda as getEventAuthorityPda, index_getTestOraclePda as getTestOraclePda, index_newClaim as newClaim, index_newDistributor as newDistributor, index_setAdmin as setAdmin, index_setClawbackReceiver as setClawbackReceiver, index_wrappedSignAndExecuteTransaction as wrappedSignAndExecuteTransaction };
|
|
1427
|
+
export { type index_AlignedDistributorData as AlignedDistributorData, index_AnchorErrorCode as AnchorErrorCode, type index_AnyClaimStatus as AnyClaimStatus, type index_ClaimLockedAccounts as ClaimLockedAccounts, type index_ClaimStatus as ClaimStatus, type index_ClawbackAccounts as ClawbackAccounts, type index_CloseClaimAccounts as CloseClaimAccounts, type index_CompressedClaimStatus as CompressedClaimStatus, index_ContractErrorCode as ContractErrorCode, type index_IClaimData as IClaimData, type index_IClawbackData as IClawbackData, type index_ICloseClaimData as ICloseClaimData, type index_ICreateAlignedDistributorData as ICreateAlignedDistributorData, type index_ICreateDistributorData as ICreateDistributorData, type index_ICreateDistributorResult as ICreateDistributorResult, type index_ICreateSolanaExt as ICreateSolanaExt, type index_IGetClaimData as IGetClaimData, type index_IGetDistributors as IGetDistributors, type index_IInteractSolanaExt as IInteractSolanaExt, type index_ISearchDistributors as ISearchDistributors, type index_ISetClawbackReceiverData as ISetClawbackReceiverData, type index_ISetDataAdmin as ISetDataAdmin, index_MerkleDistributor as MerkleDistributor, type index_MerkleDistributorAccountTypes as MerkleDistributorAccountTypes, type index_MerkleDistributorFields as MerkleDistributorFields, type index_MerkleDistributorJSON as MerkleDistributorJSON, type index_NewAlignedDistributorArgs as NewAlignedDistributorArgs, type index_NewClaimAccounts as NewClaimAccounts, type index_NewClaimArgs as NewClaimArgs, type index_NewDistributorAccounts as NewDistributorAccounts, type index_NewDistributorArgs as NewDistributorArgs, type index_OracleType as OracleType, type index_OracleTypeName as OracleTypeName, type index_SetAdminAccounts as SetAdminAccounts, type index_SetClawbackReceiverAccounts as SetClawbackReceiverAccounts, index_SolanaAlignedDistributorClient as SolanaAlignedDistributorClient, index_SolanaDistributorClient as SolanaDistributorClient, index_calculateAmountWithTransferFees as calculateAmountWithTransferFees, index_claimLocked as claimLocked, index_clawback as clawback, index_closeClaim as closeClaim, index_constants as constants, index_fromCode as fromCode, index_fromTxError as fromTxError, index_getAlignedDistributorPda as getAlignedDistributorPda, index_getClaimantStatusPda as getClaimantStatusPda, index_getDistributorPda as getDistributorPda, index_getEventAuthorityPda as getEventAuthorityPda, index_getTestOraclePda as getTestOraclePda, index_isCompressedClaimStatus as isCompressedClaimStatus, index_newClaim as newClaim, index_newDistributor as newDistributor, index_setAdmin as setAdmin, index_setClawbackReceiver as setClawbackReceiver, index_wrappedSignAndExecuteTransaction as wrappedSignAndExecuteTransaction };
|
|
1424
1428
|
}
|
|
1425
1429
|
|
|
1426
|
-
export { type AlignedDistributorData, AnchorErrorCode, type ClaimLockedAccounts, type ClaimStatus, type ClawbackAccounts, type CloseClaimAccounts, type CompressedClaimStatus, ContractErrorCode, type IClaimData, type IClawbackData, type ICloseClaimData, type ICreateAlignedDistributorData, type ICreateDistributorData, type ICreateDistributorResult, type ICreateSolanaExt, type IGetClaimData, type IGetDistributors, type IInteractSolanaExt, type ISearchDistributors, type ISetClawbackReceiverData, type ISetDataAdmin, MerkleDistributor, type MerkleDistributorAccountTypes, type MerkleDistributorFields, type MerkleDistributorJSON, type NewAlignedDistributorArgs, type NewClaimAccounts, type NewClaimArgs, type NewDistributorAccounts, type NewDistributorArgs, type OracleType, type OracleTypeName, type SetAdminAccounts, type SetClawbackReceiverAccounts, SolanaAlignedDistributorClient, SolanaDistributorClient, calculateAmountWithTransferFees, claimLocked, clawback, closeClaim, constants, fromCode, fromTxError, getAlignedDistributorPda, getClaimantStatusPda, getDistributorPda, getEventAuthorityPda, getTestOraclePda, index as i, newClaim, newDistributor, setAdmin, setClawbackReceiver, wrappedSignAndExecuteTransaction };
|
|
1430
|
+
export { type AlignedDistributorData, AnchorErrorCode, type AnyClaimStatus, type ClaimLockedAccounts, type ClaimStatus, type ClawbackAccounts, type CloseClaimAccounts, type CompressedClaimStatus, ContractErrorCode, type IClaimData, type IClawbackData, type ICloseClaimData, type ICreateAlignedDistributorData, type ICreateDistributorData, type ICreateDistributorResult, type ICreateSolanaExt, type IGetClaimData, type IGetDistributors, type IInteractSolanaExt, type ISearchDistributors, type ISetClawbackReceiverData, type ISetDataAdmin, MerkleDistributor, type MerkleDistributorAccountTypes, type MerkleDistributorFields, type MerkleDistributorJSON, type NewAlignedDistributorArgs, type NewClaimAccounts, type NewClaimArgs, type NewDistributorAccounts, type NewDistributorArgs, type OracleType, type OracleTypeName, type SetAdminAccounts, type SetClawbackReceiverAccounts, SolanaAlignedDistributorClient, SolanaDistributorClient, calculateAmountWithTransferFees, claimLocked, clawback, closeClaim, constants, fromCode, fromTxError, getAlignedDistributorPda, getClaimantStatusPda, getDistributorPda, getEventAuthorityPda, getTestOraclePda, index as i, isCompressedClaimStatus, newClaim, newDistributor, setAdmin, setClawbackReceiver, wrappedSignAndExecuteTransaction };
|
package/dist/esm/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __export(solana_exports, {
|
|
|
35
35
|
getDistributorPda: () => getDistributorPda,
|
|
36
36
|
getEventAuthorityPda: () => getEventAuthorityPda,
|
|
37
37
|
getTestOraclePda: () => getTestOraclePda,
|
|
38
|
+
isCompressedClaimStatus: () => isCompressedClaimStatus,
|
|
38
39
|
newClaim: () => newClaim,
|
|
39
40
|
newDistributor: () => newDistributor,
|
|
40
41
|
setAdmin: () => setAdmin,
|
|
@@ -2838,6 +2839,9 @@ function getEventAuthorityPda(programId) {
|
|
|
2838
2839
|
const seeds = [Buffer$1.from("__event_authority")];
|
|
2839
2840
|
return PublicKey.findProgramAddressSync(seeds, programId)[0];
|
|
2840
2841
|
}
|
|
2842
|
+
var isCompressedClaimStatus = (status) => {
|
|
2843
|
+
return !!status && "state" in status;
|
|
2844
|
+
};
|
|
2841
2845
|
async function wrappedSignAndExecuteTransaction(...args) {
|
|
2842
2846
|
try {
|
|
2843
2847
|
return await signAndExecuteTransaction(...args);
|