@streamflow/distributor 11.4.0 → 12.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 +1248 -146
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/solana/descriptor/aligned_distributor.d.cts +58 -6
- package/dist/cjs/solana/descriptor/merkle_distributor.d.cts +1087 -127
- package/dist/cjs/solana/index.cjs +1248 -146
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/cjs/solana/index.d.cts +26 -2
- package/dist/esm/index.js +1248 -146
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/descriptor/aligned_distributor.d.ts +58 -6
- package/dist/esm/solana/descriptor/idl/aligned_distributor.json +58 -6
- package/dist/esm/solana/descriptor/idl/merkle_distributor.json +1088 -128
- package/dist/esm/solana/descriptor/merkle_distributor.d.ts +1087 -127
- package/dist/esm/solana/index.d.ts +26 -2
- package/dist/esm/solana/index.js +1248 -146
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -34,6 +34,8 @@ type ClaimLockedAccounts = IdlAccountsOfMethod<MerkleDistributor$1, "claimLocked
|
|
|
34
34
|
type ClawbackAccounts = IdlAccountsOfMethod<MerkleDistributor$1, "clawback">;
|
|
35
35
|
type CloseClaimAccounts = IdlAccountsOfMethod<MerkleDistributor$1, "closeClaim">;
|
|
36
36
|
type CloseClaimArgs = IdlInstruction<MerkleDistributor$1, "closeClaim">["args"];
|
|
37
|
+
type RequestClawbackAccounts = IdlAccountsOfMethod<MerkleDistributor$1, "requestClawback">;
|
|
38
|
+
type WithdrawClawbackRequestAccounts = IdlAccountsOfMethod<MerkleDistributor$1, "withdrawClawbackRequest">;
|
|
37
39
|
/**
|
|
38
40
|
* @type
|
|
39
41
|
* @inheritdoc
|
|
@@ -62,6 +64,10 @@ interface ICreateDistributorData {
|
|
|
62
64
|
claimsClosableByAdmin: boolean;
|
|
63
65
|
claimsClosableByClaimant?: boolean;
|
|
64
66
|
claimsLimit?: number;
|
|
67
|
+
partnerLink?: {
|
|
68
|
+
address: string;
|
|
69
|
+
isSigner: boolean;
|
|
70
|
+
};
|
|
65
71
|
}
|
|
66
72
|
interface AlignedDistributorData {
|
|
67
73
|
sender: string;
|
|
@@ -117,6 +123,8 @@ interface ICloseClaimData extends Partial<Omit<IClaimData, "id">> {
|
|
|
117
123
|
interface IClawbackData {
|
|
118
124
|
id: string;
|
|
119
125
|
}
|
|
126
|
+
type IRequestClawbackData = IClawbackData;
|
|
127
|
+
type IWithdrawClawbackRequestData = IClawbackData;
|
|
120
128
|
interface IGetClaimData {
|
|
121
129
|
id: string;
|
|
122
130
|
recipient: string;
|
|
@@ -349,6 +357,18 @@ declare abstract class BaseDistributorClient {
|
|
|
349
357
|
prepareCloseClaimInstructions(data: ICloseClaimData, extParams: ITransactionExtResolved<IInteractExt>): Promise<TransactionInstruction[]>;
|
|
350
358
|
prepareClawbackInstructions(data: IClawbackData, extParams: ITransactionExtResolved<IInteractExt>): Promise<TransactionInstruction[]>;
|
|
351
359
|
clawback(data: IClawbackData, extParams: IInteractExt): Promise<ITransactionResult>;
|
|
360
|
+
/**
|
|
361
|
+
* Requests delayed clawback by the configured fee partner authority.
|
|
362
|
+
* Once the request is recorded on-chain, clawback can be executed after the
|
|
363
|
+
* configured delay elapses.
|
|
364
|
+
*/
|
|
365
|
+
requestClawback(data: IRequestClawbackData, extParams: IInteractExt): Promise<ITransactionResult>;
|
|
366
|
+
prepareRequestClawbackInstructions(data: IRequestClawbackData, extParams: ITransactionExtResolved<IInteractExt>): Promise<TransactionInstruction[]>;
|
|
367
|
+
/**
|
|
368
|
+
* Withdraws a previously submitted clawback request, cancelling the delayed clawback flow.
|
|
369
|
+
*/
|
|
370
|
+
withdrawClawbackRequest(data: IWithdrawClawbackRequestData, extParams: IInteractExt): Promise<ITransactionResult>;
|
|
371
|
+
prepareWithdrawClawbackRequestInstructions(data: IWithdrawClawbackRequestData, extParams: ITransactionExtResolved<IInteractExt>): Promise<TransactionInstruction[]>;
|
|
352
372
|
getClaim(claimStatus: string | PublicKey): Promise<AnyClaimStatus | null>;
|
|
353
373
|
getClaims(data: IGetClaimData[]): Promise<(AnyClaimStatus | null)[]>;
|
|
354
374
|
getDistributors(data: IGetDistributors): Promise<(MerkleDistributor | null)[]>;
|
|
@@ -570,9 +590,11 @@ type index_ICreateExt = ICreateExt;
|
|
|
570
590
|
type index_IGetClaimData = IGetClaimData;
|
|
571
591
|
type index_IGetDistributors = IGetDistributors;
|
|
572
592
|
type index_IInteractExt = IInteractExt;
|
|
593
|
+
type index_IRequestClawbackData = IRequestClawbackData;
|
|
573
594
|
type index_ISearchDistributors = ISearchDistributors;
|
|
574
595
|
type index_ISetClawbackReceiverData = ISetClawbackReceiverData;
|
|
575
596
|
type index_ISetDataAdmin = ISetDataAdmin;
|
|
597
|
+
type index_IWithdrawClawbackRequestData = IWithdrawClawbackRequestData;
|
|
576
598
|
declare const index_MAXIMUM_FEE_FALLBACK: typeof MAXIMUM_FEE_FALLBACK;
|
|
577
599
|
declare const index_MINIMUM_FEE_FALLBACK: typeof MINIMUM_FEE_FALLBACK;
|
|
578
600
|
type index_MerkleDistributor = MerkleDistributor;
|
|
@@ -586,10 +608,12 @@ type index_NewDistributorAccounts = NewDistributorAccounts;
|
|
|
586
608
|
type index_NewDistributorArgs = NewDistributorArgs;
|
|
587
609
|
type index_OracleType = OracleType;
|
|
588
610
|
type index_OracleTypeName = OracleTypeName;
|
|
611
|
+
type index_RequestClawbackAccounts = RequestClawbackAccounts;
|
|
589
612
|
type index_SolanaAlignedDistributorClient = SolanaAlignedDistributorClient;
|
|
590
613
|
declare const index_SolanaAlignedDistributorClient: typeof SolanaAlignedDistributorClient;
|
|
591
614
|
type index_SolanaDistributorClient = SolanaDistributorClient;
|
|
592
615
|
declare const index_SolanaDistributorClient: typeof SolanaDistributorClient;
|
|
616
|
+
type index_WithdrawClawbackRequestAccounts = WithdrawClawbackRequestAccounts;
|
|
593
617
|
declare const index_applyFeeLogic: typeof applyFeeLogic;
|
|
594
618
|
declare const index_calculateAirdropFeeLamports: typeof calculateAirdropFeeLamports;
|
|
595
619
|
declare const index_calculateAmountWithTransferFees: typeof calculateAmountWithTransferFees;
|
|
@@ -607,7 +631,7 @@ declare const index_resolveAirdropFeeLamportsUsingApi: typeof resolveAirdropFeeL
|
|
|
607
631
|
declare const index_toLamportsSOL: typeof toLamportsSOL;
|
|
608
632
|
declare const index_wrappedSignAndExecuteTransaction: typeof wrappedSignAndExecuteTransaction;
|
|
609
633
|
declare namespace index {
|
|
610
|
-
export { type index_AirdropFeeClient as AirdropFeeClient, type index_AirdropFeeDynamic as AirdropFeeDynamic, type index_AirdropFeeQueryOptionsOverrides as AirdropFeeQueryOptionsOverrides, type index_AirdropFeeResponse as AirdropFeeResponse, type index_AirdropFeeServiceResponse as AirdropFeeServiceResponse, type index_AlignedDistributorData as AlignedDistributorData, index_AnchorErrorCode as AnchorErrorCode, type index_AnyClaimStatus as AnyClaimStatus, type index_ClaimLockedAccounts as ClaimLockedAccounts, type index_ClaimLockedV2Accounts as ClaimLockedV2Accounts, type index_ClaimStatus as ClaimStatus, type index_ClawbackAccounts as ClawbackAccounts, type index_CloseClaimAccounts as CloseClaimAccounts, type index_CloseClaimArgs as CloseClaimArgs, type index_CompressedClaimStatus as CompressedClaimStatus, index_ContractErrorCode as ContractErrorCode, index_FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR as FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR, index_FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR as FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR, type index_FeeConfig as FeeConfig, type index_Fees as Fees, 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_ICreateExt as ICreateExt, type index_IGetClaimData as IGetClaimData, type index_IGetDistributors as IGetDistributors, type index_IInteractExt as IInteractExt, type index_ISearchDistributors as ISearchDistributors, type index_ISetClawbackReceiverData as ISetClawbackReceiverData, type index_ISetDataAdmin as ISetDataAdmin, index_MAXIMUM_FEE_FALLBACK as MAXIMUM_FEE_FALLBACK, index_MINIMUM_FEE_FALLBACK as MINIMUM_FEE_FALLBACK, type index_MerkleDistributor as MerkleDistributor, type index_MerkleDistributorAccountTypes as MerkleDistributorAccountTypes, type index_MerkleDistributorAccounts as MerkleDistributorAccounts, type index_MerkleDistributorProgram as MerkleDistributorProgram, 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, index_SolanaAlignedDistributorClient as SolanaAlignedDistributorClient, index_SolanaDistributorClient as SolanaDistributorClient, index_applyFeeLogic as applyFeeLogic, index_calculateAirdropFeeLamports as calculateAirdropFeeLamports, index_calculateAmountWithTransferFees as calculateAmountWithTransferFees, index_calculateClaimableLamportsFromPrices as calculateClaimableLamportsFromPrices, index_calculateDynamicFeeFromSolParams as calculateDynamicFeeFromSolParams, index_constants as constants, index_fetchAirdropFee as fetchAirdropFee, 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_resolveAirdropFeeLamportsUsingApi as resolveAirdropFeeLamportsUsingApi, index_toLamportsSOL as toLamportsSOL, index_wrappedSignAndExecuteTransaction as wrappedSignAndExecuteTransaction };
|
|
634
|
+
export { type index_AirdropFeeClient as AirdropFeeClient, type index_AirdropFeeDynamic as AirdropFeeDynamic, type index_AirdropFeeQueryOptionsOverrides as AirdropFeeQueryOptionsOverrides, type index_AirdropFeeResponse as AirdropFeeResponse, type index_AirdropFeeServiceResponse as AirdropFeeServiceResponse, type index_AlignedDistributorData as AlignedDistributorData, index_AnchorErrorCode as AnchorErrorCode, type index_AnyClaimStatus as AnyClaimStatus, type index_ClaimLockedAccounts as ClaimLockedAccounts, type index_ClaimLockedV2Accounts as ClaimLockedV2Accounts, type index_ClaimStatus as ClaimStatus, type index_ClawbackAccounts as ClawbackAccounts, type index_CloseClaimAccounts as CloseClaimAccounts, type index_CloseClaimArgs as CloseClaimArgs, type index_CompressedClaimStatus as CompressedClaimStatus, index_ContractErrorCode as ContractErrorCode, index_FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR as FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR, index_FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR as FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR, type index_FeeConfig as FeeConfig, type index_Fees as Fees, 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_ICreateExt as ICreateExt, type index_IGetClaimData as IGetClaimData, type index_IGetDistributors as IGetDistributors, type index_IInteractExt as IInteractExt, type index_IRequestClawbackData as IRequestClawbackData, type index_ISearchDistributors as ISearchDistributors, type index_ISetClawbackReceiverData as ISetClawbackReceiverData, type index_ISetDataAdmin as ISetDataAdmin, type index_IWithdrawClawbackRequestData as IWithdrawClawbackRequestData, index_MAXIMUM_FEE_FALLBACK as MAXIMUM_FEE_FALLBACK, index_MINIMUM_FEE_FALLBACK as MINIMUM_FEE_FALLBACK, type index_MerkleDistributor as MerkleDistributor, type index_MerkleDistributorAccountTypes as MerkleDistributorAccountTypes, type index_MerkleDistributorAccounts as MerkleDistributorAccounts, type index_MerkleDistributorProgram as MerkleDistributorProgram, 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_RequestClawbackAccounts as RequestClawbackAccounts, index_SolanaAlignedDistributorClient as SolanaAlignedDistributorClient, index_SolanaDistributorClient as SolanaDistributorClient, type index_WithdrawClawbackRequestAccounts as WithdrawClawbackRequestAccounts, index_applyFeeLogic as applyFeeLogic, index_calculateAirdropFeeLamports as calculateAirdropFeeLamports, index_calculateAmountWithTransferFees as calculateAmountWithTransferFees, index_calculateClaimableLamportsFromPrices as calculateClaimableLamportsFromPrices, index_calculateDynamicFeeFromSolParams as calculateDynamicFeeFromSolParams, index_constants as constants, index_fetchAirdropFee as fetchAirdropFee, 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_resolveAirdropFeeLamportsUsingApi as resolveAirdropFeeLamportsUsingApi, index_toLamportsSOL as toLamportsSOL, index_wrappedSignAndExecuteTransaction as wrappedSignAndExecuteTransaction };
|
|
611
635
|
}
|
|
612
636
|
|
|
613
|
-
export { type AirdropFeeClient, type AirdropFeeDynamic, type AirdropFeeQueryOptionsOverrides, type AirdropFeeResponse, type AirdropFeeServiceResponse, type AlignedDistributorData, AnchorErrorCode, type AnyClaimStatus, type ClaimLockedAccounts, type ClaimLockedV2Accounts, type ClaimStatus, type ClawbackAccounts, type CloseClaimAccounts, type CloseClaimArgs, type CompressedClaimStatus, ContractErrorCode, FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR, FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR, type FeeConfig, type Fees, type IClaimData, type IClawbackData, type ICloseClaimData, type ICreateAlignedDistributorData, type ICreateDistributorData, type ICreateDistributorResult, type ICreateExt, type IGetClaimData, type IGetDistributors, type IInteractExt, type ISearchDistributors, type ISetClawbackReceiverData, type ISetDataAdmin, MAXIMUM_FEE_FALLBACK, MINIMUM_FEE_FALLBACK, type MerkleDistributor, type MerkleDistributorAccountTypes, type MerkleDistributorAccounts, type MerkleDistributorProgram, type NewAlignedDistributorArgs, type NewClaimAccounts, type NewClaimArgs, type NewDistributorAccounts, type NewDistributorArgs, type OracleType, type OracleTypeName, SolanaAlignedDistributorClient, SolanaDistributorClient, applyFeeLogic, calculateAirdropFeeLamports, calculateAmountWithTransferFees, calculateClaimableLamportsFromPrices, calculateDynamicFeeFromSolParams, constants, fetchAirdropFee, getAlignedDistributorPda, getClaimantStatusPda, getDistributorPda, getEventAuthorityPda, getTestOraclePda, index as i, isCompressedClaimStatus, resolveAirdropFeeLamportsUsingApi, toLamportsSOL, wrappedSignAndExecuteTransaction };
|
|
637
|
+
export { type AirdropFeeClient, type AirdropFeeDynamic, type AirdropFeeQueryOptionsOverrides, type AirdropFeeResponse, type AirdropFeeServiceResponse, type AlignedDistributorData, AnchorErrorCode, type AnyClaimStatus, type ClaimLockedAccounts, type ClaimLockedV2Accounts, type ClaimStatus, type ClawbackAccounts, type CloseClaimAccounts, type CloseClaimArgs, type CompressedClaimStatus, ContractErrorCode, FEE_ALLOCATION_FACTOR_FALLBACK_DENOMINATOR, FEE_ALLOCATION_FACTOR_FALLBACK_NUMERATOR, type FeeConfig, type Fees, type IClaimData, type IClawbackData, type ICloseClaimData, type ICreateAlignedDistributorData, type ICreateDistributorData, type ICreateDistributorResult, type ICreateExt, type IGetClaimData, type IGetDistributors, type IInteractExt, type IRequestClawbackData, type ISearchDistributors, type ISetClawbackReceiverData, type ISetDataAdmin, type IWithdrawClawbackRequestData, MAXIMUM_FEE_FALLBACK, MINIMUM_FEE_FALLBACK, type MerkleDistributor, type MerkleDistributorAccountTypes, type MerkleDistributorAccounts, type MerkleDistributorProgram, type NewAlignedDistributorArgs, type NewClaimAccounts, type NewClaimArgs, type NewDistributorAccounts, type NewDistributorArgs, type OracleType, type OracleTypeName, type RequestClawbackAccounts, SolanaAlignedDistributorClient, SolanaDistributorClient, type WithdrawClawbackRequestAccounts, applyFeeLogic, calculateAirdropFeeLamports, calculateAmountWithTransferFees, calculateClaimableLamportsFromPrices, calculateDynamicFeeFromSolParams, constants, fetchAirdropFee, getAlignedDistributorPda, getClaimantStatusPda, getDistributorPda, getEventAuthorityPda, getTestOraclePda, index as i, isCompressedClaimStatus, resolveAirdropFeeLamportsUsingApi, toLamportsSOL, wrappedSignAndExecuteTransaction };
|