@dropsy/airdrop 0.4.1 → 0.4.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.
- package/dist/index.d.mts +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +18 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -40
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -466,12 +466,14 @@ type ClaimAirdropInstructionData = {
|
|
|
466
466
|
proof: Array<ReadonlyUint8Array>;
|
|
467
467
|
amount: bigint;
|
|
468
468
|
claimMapIndex: number;
|
|
469
|
+
airdropId: bigint;
|
|
469
470
|
};
|
|
470
471
|
type ClaimAirdropInstructionDataArgs = {
|
|
471
472
|
index: number | bigint;
|
|
472
473
|
proof: Array<ReadonlyUint8Array>;
|
|
473
474
|
amount: number | bigint;
|
|
474
475
|
claimMapIndex: number;
|
|
476
|
+
airdropId: number | bigint;
|
|
475
477
|
};
|
|
476
478
|
declare function getClaimAirdropInstructionDataEncoder(): Encoder<ClaimAirdropInstructionDataArgs>;
|
|
477
479
|
declare function getClaimAirdropInstructionDataDecoder(): Decoder<ClaimAirdropInstructionData>;
|
|
@@ -496,6 +498,7 @@ type ClaimAirdropAsyncInput<TAccountSourceTokenAccount extends string = string,
|
|
|
496
498
|
proof: ClaimAirdropInstructionDataArgs["proof"];
|
|
497
499
|
amount: ClaimAirdropInstructionDataArgs["amount"];
|
|
498
500
|
claimMapIndex: ClaimAirdropInstructionDataArgs["claimMapIndex"];
|
|
501
|
+
airdropId: ClaimAirdropInstructionDataArgs["airdropId"];
|
|
499
502
|
};
|
|
500
503
|
declare function getClaimAirdropInstructionAsync<TAccountSourceTokenAccount extends string, TAccountDestinationTokenAccount extends string, TAccountClaimer extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TAccountAirdropConfig extends string, TAccountProtocolTreasury extends string, TAccountAirdropMaster extends string, TAccountTreasury extends string, TAccountMasterCreator extends string, TAccountAirdrop extends string, TAccountAuthority extends string, TAccountBitmap extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: ClaimAirdropAsyncInput<TAccountSourceTokenAccount, TAccountDestinationTokenAccount, TAccountClaimer, TAccountMint, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountAirdropConfig, TAccountProtocolTreasury, TAccountAirdropMaster, TAccountTreasury, TAccountMasterCreator, TAccountAirdrop, TAccountAuthority, TAccountBitmap>, config?: {
|
|
501
504
|
programAddress?: TProgramAddress;
|
|
@@ -520,6 +523,7 @@ type ClaimAirdropInput<TAccountSourceTokenAccount extends string = string, TAcco
|
|
|
520
523
|
proof: ClaimAirdropInstructionDataArgs["proof"];
|
|
521
524
|
amount: ClaimAirdropInstructionDataArgs["amount"];
|
|
522
525
|
claimMapIndex: ClaimAirdropInstructionDataArgs["claimMapIndex"];
|
|
526
|
+
airdropId: ClaimAirdropInstructionDataArgs["airdropId"];
|
|
523
527
|
};
|
|
524
528
|
declare function getClaimAirdropInstruction<TAccountSourceTokenAccount extends string, TAccountDestinationTokenAccount extends string, TAccountClaimer extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TAccountAirdropConfig extends string, TAccountProtocolTreasury extends string, TAccountAirdropMaster extends string, TAccountTreasury extends string, TAccountMasterCreator extends string, TAccountAirdrop extends string, TAccountAuthority extends string, TAccountBitmap extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: ClaimAirdropInput<TAccountSourceTokenAccount, TAccountDestinationTokenAccount, TAccountClaimer, TAccountMint, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountAirdropConfig, TAccountProtocolTreasury, TAccountAirdropMaster, TAccountTreasury, TAccountMasterCreator, TAccountAirdrop, TAccountAuthority, TAccountBitmap>, config?: {
|
|
525
529
|
programAddress?: TProgramAddress;
|
|
@@ -673,10 +677,12 @@ type CreateBitmapInstructionData = {
|
|
|
673
677
|
discriminator: ReadonlyUint8Array;
|
|
674
678
|
id: number;
|
|
675
679
|
total: number;
|
|
680
|
+
airdropId: bigint;
|
|
676
681
|
};
|
|
677
682
|
type CreateBitmapInstructionDataArgs = {
|
|
678
683
|
id: number;
|
|
679
684
|
total: number;
|
|
685
|
+
airdropId: number | bigint;
|
|
680
686
|
};
|
|
681
687
|
declare function getCreateBitmapInstructionDataEncoder(): FixedSizeEncoder<CreateBitmapInstructionDataArgs>;
|
|
682
688
|
declare function getCreateBitmapInstructionDataDecoder(): FixedSizeDecoder<CreateBitmapInstructionData>;
|
|
@@ -694,6 +700,7 @@ type CreateBitmapAsyncInput<TAccountAirdropConfig extends string = string, TAcco
|
|
|
694
700
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
695
701
|
id: CreateBitmapInstructionDataArgs["id"];
|
|
696
702
|
total: CreateBitmapInstructionDataArgs["total"];
|
|
703
|
+
airdropId: CreateBitmapInstructionDataArgs["airdropId"];
|
|
697
704
|
};
|
|
698
705
|
declare function getCreateBitmapInstructionAsync<TAccountAirdropConfig extends string, TAccountProtocolTreasury extends string, TAccountAirdropMaster extends string, TAccountTreasury extends string, TAccountMasterCreator extends string, TAccountBitmap extends string, TAccountAirdrop extends string, TAccountMint extends string, TAccountAuthority extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: CreateBitmapAsyncInput<TAccountAirdropConfig, TAccountProtocolTreasury, TAccountAirdropMaster, TAccountTreasury, TAccountMasterCreator, TAccountBitmap, TAccountAirdrop, TAccountMint, TAccountAuthority, TAccountSystemProgram>, config?: {
|
|
699
706
|
programAddress?: TProgramAddress;
|
|
@@ -711,6 +718,7 @@ type CreateBitmapInput<TAccountAirdropConfig extends string = string, TAccountPr
|
|
|
711
718
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
712
719
|
id: CreateBitmapInstructionDataArgs["id"];
|
|
713
720
|
total: CreateBitmapInstructionDataArgs["total"];
|
|
721
|
+
airdropId: CreateBitmapInstructionDataArgs["airdropId"];
|
|
714
722
|
};
|
|
715
723
|
declare function getCreateBitmapInstruction<TAccountAirdropConfig extends string, TAccountProtocolTreasury extends string, TAccountAirdropMaster extends string, TAccountTreasury extends string, TAccountMasterCreator extends string, TAccountBitmap extends string, TAccountAirdrop extends string, TAccountMint extends string, TAccountAuthority extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: CreateBitmapInput<TAccountAirdropConfig, TAccountProtocolTreasury, TAccountAirdropMaster, TAccountTreasury, TAccountMasterCreator, TAccountBitmap, TAccountAirdrop, TAccountMint, TAccountAuthority, TAccountSystemProgram>, config?: {
|
|
716
724
|
programAddress?: TProgramAddress;
|
|
@@ -757,9 +765,11 @@ type DepositTokensInstruction<TProgram extends string = typeof DROPSY_AIRDROP_PR
|
|
|
757
765
|
type DepositTokensInstructionData = {
|
|
758
766
|
discriminator: ReadonlyUint8Array;
|
|
759
767
|
amount: bigint;
|
|
768
|
+
airdropId: bigint;
|
|
760
769
|
};
|
|
761
770
|
type DepositTokensInstructionDataArgs = {
|
|
762
771
|
amount: number | bigint;
|
|
772
|
+
airdropId: number | bigint;
|
|
763
773
|
};
|
|
764
774
|
declare function getDepositTokensInstructionDataEncoder(): FixedSizeEncoder<DepositTokensInstructionDataArgs>;
|
|
765
775
|
declare function getDepositTokensInstructionDataDecoder(): FixedSizeDecoder<DepositTokensInstructionData>;
|
|
@@ -774,6 +784,7 @@ type DepositTokensAsyncInput<TAccountSourceTokenAccount extends string = string,
|
|
|
774
784
|
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
775
785
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
776
786
|
amount: DepositTokensInstructionDataArgs["amount"];
|
|
787
|
+
airdropId: DepositTokensInstructionDataArgs["airdropId"];
|
|
777
788
|
};
|
|
778
789
|
declare function getDepositTokensInstructionAsync<TAccountSourceTokenAccount extends string, TAccountVault extends string, TAccountAirdrop extends string, TAccountMint extends string, TAccountAuthority extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: DepositTokensAsyncInput<TAccountSourceTokenAccount, TAccountVault, TAccountAirdrop, TAccountMint, TAccountAuthority, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
779
790
|
programAddress?: TProgramAddress;
|
|
@@ -788,6 +799,7 @@ type DepositTokensInput<TAccountSourceTokenAccount extends string = string, TAcc
|
|
|
788
799
|
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
789
800
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
790
801
|
amount: DepositTokensInstructionDataArgs["amount"];
|
|
802
|
+
airdropId: DepositTokensInstructionDataArgs["airdropId"];
|
|
791
803
|
};
|
|
792
804
|
declare function getDepositTokensInstruction<TAccountSourceTokenAccount extends string, TAccountVault extends string, TAccountAirdrop extends string, TAccountMint extends string, TAccountAuthority extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: DepositTokensInput<TAccountSourceTokenAccount, TAccountVault, TAccountAirdrop, TAccountMint, TAccountAuthority, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
793
805
|
programAddress?: TProgramAddress;
|
|
@@ -818,7 +830,7 @@ declare function parseDepositTokensInstruction<TProgram extends string, TAccount
|
|
|
818
830
|
|
|
819
831
|
declare const INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
820
832
|
declare function getInitializeAirdropConfigDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
821
|
-
type InitializeAirdropConfigInstruction<TProgram extends string = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS, TAccountConfig extends string | AccountMeta<string> = string, TAccountProtocolTreasury extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = "
|
|
833
|
+
type InitializeAirdropConfigInstruction<TProgram extends string = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS, TAccountConfig extends string | AccountMeta<string> = string, TAccountProtocolTreasury extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
822
834
|
TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
|
|
823
835
|
TAccountProtocolTreasury extends string ? ReadonlyAccount<TAccountProtocolTreasury> : TAccountProtocolTreasury,
|
|
824
836
|
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
package/dist/index.d.ts
CHANGED
|
@@ -466,12 +466,14 @@ type ClaimAirdropInstructionData = {
|
|
|
466
466
|
proof: Array<ReadonlyUint8Array>;
|
|
467
467
|
amount: bigint;
|
|
468
468
|
claimMapIndex: number;
|
|
469
|
+
airdropId: bigint;
|
|
469
470
|
};
|
|
470
471
|
type ClaimAirdropInstructionDataArgs = {
|
|
471
472
|
index: number | bigint;
|
|
472
473
|
proof: Array<ReadonlyUint8Array>;
|
|
473
474
|
amount: number | bigint;
|
|
474
475
|
claimMapIndex: number;
|
|
476
|
+
airdropId: number | bigint;
|
|
475
477
|
};
|
|
476
478
|
declare function getClaimAirdropInstructionDataEncoder(): Encoder<ClaimAirdropInstructionDataArgs>;
|
|
477
479
|
declare function getClaimAirdropInstructionDataDecoder(): Decoder<ClaimAirdropInstructionData>;
|
|
@@ -496,6 +498,7 @@ type ClaimAirdropAsyncInput<TAccountSourceTokenAccount extends string = string,
|
|
|
496
498
|
proof: ClaimAirdropInstructionDataArgs["proof"];
|
|
497
499
|
amount: ClaimAirdropInstructionDataArgs["amount"];
|
|
498
500
|
claimMapIndex: ClaimAirdropInstructionDataArgs["claimMapIndex"];
|
|
501
|
+
airdropId: ClaimAirdropInstructionDataArgs["airdropId"];
|
|
499
502
|
};
|
|
500
503
|
declare function getClaimAirdropInstructionAsync<TAccountSourceTokenAccount extends string, TAccountDestinationTokenAccount extends string, TAccountClaimer extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TAccountAirdropConfig extends string, TAccountProtocolTreasury extends string, TAccountAirdropMaster extends string, TAccountTreasury extends string, TAccountMasterCreator extends string, TAccountAirdrop extends string, TAccountAuthority extends string, TAccountBitmap extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: ClaimAirdropAsyncInput<TAccountSourceTokenAccount, TAccountDestinationTokenAccount, TAccountClaimer, TAccountMint, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountAirdropConfig, TAccountProtocolTreasury, TAccountAirdropMaster, TAccountTreasury, TAccountMasterCreator, TAccountAirdrop, TAccountAuthority, TAccountBitmap>, config?: {
|
|
501
504
|
programAddress?: TProgramAddress;
|
|
@@ -520,6 +523,7 @@ type ClaimAirdropInput<TAccountSourceTokenAccount extends string = string, TAcco
|
|
|
520
523
|
proof: ClaimAirdropInstructionDataArgs["proof"];
|
|
521
524
|
amount: ClaimAirdropInstructionDataArgs["amount"];
|
|
522
525
|
claimMapIndex: ClaimAirdropInstructionDataArgs["claimMapIndex"];
|
|
526
|
+
airdropId: ClaimAirdropInstructionDataArgs["airdropId"];
|
|
523
527
|
};
|
|
524
528
|
declare function getClaimAirdropInstruction<TAccountSourceTokenAccount extends string, TAccountDestinationTokenAccount extends string, TAccountClaimer extends string, TAccountMint extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TAccountAirdropConfig extends string, TAccountProtocolTreasury extends string, TAccountAirdropMaster extends string, TAccountTreasury extends string, TAccountMasterCreator extends string, TAccountAirdrop extends string, TAccountAuthority extends string, TAccountBitmap extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: ClaimAirdropInput<TAccountSourceTokenAccount, TAccountDestinationTokenAccount, TAccountClaimer, TAccountMint, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram, TAccountAirdropConfig, TAccountProtocolTreasury, TAccountAirdropMaster, TAccountTreasury, TAccountMasterCreator, TAccountAirdrop, TAccountAuthority, TAccountBitmap>, config?: {
|
|
525
529
|
programAddress?: TProgramAddress;
|
|
@@ -673,10 +677,12 @@ type CreateBitmapInstructionData = {
|
|
|
673
677
|
discriminator: ReadonlyUint8Array;
|
|
674
678
|
id: number;
|
|
675
679
|
total: number;
|
|
680
|
+
airdropId: bigint;
|
|
676
681
|
};
|
|
677
682
|
type CreateBitmapInstructionDataArgs = {
|
|
678
683
|
id: number;
|
|
679
684
|
total: number;
|
|
685
|
+
airdropId: number | bigint;
|
|
680
686
|
};
|
|
681
687
|
declare function getCreateBitmapInstructionDataEncoder(): FixedSizeEncoder<CreateBitmapInstructionDataArgs>;
|
|
682
688
|
declare function getCreateBitmapInstructionDataDecoder(): FixedSizeDecoder<CreateBitmapInstructionData>;
|
|
@@ -694,6 +700,7 @@ type CreateBitmapAsyncInput<TAccountAirdropConfig extends string = string, TAcco
|
|
|
694
700
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
695
701
|
id: CreateBitmapInstructionDataArgs["id"];
|
|
696
702
|
total: CreateBitmapInstructionDataArgs["total"];
|
|
703
|
+
airdropId: CreateBitmapInstructionDataArgs["airdropId"];
|
|
697
704
|
};
|
|
698
705
|
declare function getCreateBitmapInstructionAsync<TAccountAirdropConfig extends string, TAccountProtocolTreasury extends string, TAccountAirdropMaster extends string, TAccountTreasury extends string, TAccountMasterCreator extends string, TAccountBitmap extends string, TAccountAirdrop extends string, TAccountMint extends string, TAccountAuthority extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: CreateBitmapAsyncInput<TAccountAirdropConfig, TAccountProtocolTreasury, TAccountAirdropMaster, TAccountTreasury, TAccountMasterCreator, TAccountBitmap, TAccountAirdrop, TAccountMint, TAccountAuthority, TAccountSystemProgram>, config?: {
|
|
699
706
|
programAddress?: TProgramAddress;
|
|
@@ -711,6 +718,7 @@ type CreateBitmapInput<TAccountAirdropConfig extends string = string, TAccountPr
|
|
|
711
718
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
712
719
|
id: CreateBitmapInstructionDataArgs["id"];
|
|
713
720
|
total: CreateBitmapInstructionDataArgs["total"];
|
|
721
|
+
airdropId: CreateBitmapInstructionDataArgs["airdropId"];
|
|
714
722
|
};
|
|
715
723
|
declare function getCreateBitmapInstruction<TAccountAirdropConfig extends string, TAccountProtocolTreasury extends string, TAccountAirdropMaster extends string, TAccountTreasury extends string, TAccountMasterCreator extends string, TAccountBitmap extends string, TAccountAirdrop extends string, TAccountMint extends string, TAccountAuthority extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: CreateBitmapInput<TAccountAirdropConfig, TAccountProtocolTreasury, TAccountAirdropMaster, TAccountTreasury, TAccountMasterCreator, TAccountBitmap, TAccountAirdrop, TAccountMint, TAccountAuthority, TAccountSystemProgram>, config?: {
|
|
716
724
|
programAddress?: TProgramAddress;
|
|
@@ -757,9 +765,11 @@ type DepositTokensInstruction<TProgram extends string = typeof DROPSY_AIRDROP_PR
|
|
|
757
765
|
type DepositTokensInstructionData = {
|
|
758
766
|
discriminator: ReadonlyUint8Array;
|
|
759
767
|
amount: bigint;
|
|
768
|
+
airdropId: bigint;
|
|
760
769
|
};
|
|
761
770
|
type DepositTokensInstructionDataArgs = {
|
|
762
771
|
amount: number | bigint;
|
|
772
|
+
airdropId: number | bigint;
|
|
763
773
|
};
|
|
764
774
|
declare function getDepositTokensInstructionDataEncoder(): FixedSizeEncoder<DepositTokensInstructionDataArgs>;
|
|
765
775
|
declare function getDepositTokensInstructionDataDecoder(): FixedSizeDecoder<DepositTokensInstructionData>;
|
|
@@ -774,6 +784,7 @@ type DepositTokensAsyncInput<TAccountSourceTokenAccount extends string = string,
|
|
|
774
784
|
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
775
785
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
776
786
|
amount: DepositTokensInstructionDataArgs["amount"];
|
|
787
|
+
airdropId: DepositTokensInstructionDataArgs["airdropId"];
|
|
777
788
|
};
|
|
778
789
|
declare function getDepositTokensInstructionAsync<TAccountSourceTokenAccount extends string, TAccountVault extends string, TAccountAirdrop extends string, TAccountMint extends string, TAccountAuthority extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: DepositTokensAsyncInput<TAccountSourceTokenAccount, TAccountVault, TAccountAirdrop, TAccountMint, TAccountAuthority, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
779
790
|
programAddress?: TProgramAddress;
|
|
@@ -788,6 +799,7 @@ type DepositTokensInput<TAccountSourceTokenAccount extends string = string, TAcc
|
|
|
788
799
|
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
789
800
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
790
801
|
amount: DepositTokensInstructionDataArgs["amount"];
|
|
802
|
+
airdropId: DepositTokensInstructionDataArgs["airdropId"];
|
|
791
803
|
};
|
|
792
804
|
declare function getDepositTokensInstruction<TAccountSourceTokenAccount extends string, TAccountVault extends string, TAccountAirdrop extends string, TAccountMint extends string, TAccountAuthority extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountSystemProgram extends string, TProgramAddress extends Address = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS>(input: DepositTokensInput<TAccountSourceTokenAccount, TAccountVault, TAccountAirdrop, TAccountMint, TAccountAuthority, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountSystemProgram>, config?: {
|
|
793
805
|
programAddress?: TProgramAddress;
|
|
@@ -818,7 +830,7 @@ declare function parseDepositTokensInstruction<TProgram extends string, TAccount
|
|
|
818
830
|
|
|
819
831
|
declare const INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
820
832
|
declare function getInitializeAirdropConfigDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
821
|
-
type InitializeAirdropConfigInstruction<TProgram extends string = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS, TAccountConfig extends string | AccountMeta<string> = string, TAccountProtocolTreasury extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = "
|
|
833
|
+
type InitializeAirdropConfigInstruction<TProgram extends string = typeof DROPSY_AIRDROP_PROGRAM_ADDRESS, TAccountConfig extends string | AccountMeta<string> = string, TAccountProtocolTreasury extends string | AccountMeta<string> = string, TAccountAuthority extends string | AccountMeta<string> = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
822
834
|
TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
|
|
823
835
|
TAccountProtocolTreasury extends string ? ReadonlyAccount<TAccountProtocolTreasury> : TAccountProtocolTreasury,
|
|
824
836
|
TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
|
package/dist/index.js
CHANGED
|
@@ -644,7 +644,8 @@ function getClaimAirdropInstructionDataEncoder() {
|
|
|
644
644
|
["index", (0, import_kit6.getU64Encoder)()],
|
|
645
645
|
["proof", (0, import_kit6.getArrayEncoder)((0, import_kit6.fixEncoderSize)((0, import_kit6.getBytesEncoder)(), 32))],
|
|
646
646
|
["amount", (0, import_kit6.getU64Encoder)()],
|
|
647
|
-
["claimMapIndex", (0, import_kit6.getU16Encoder)()]
|
|
647
|
+
["claimMapIndex", (0, import_kit6.getU16Encoder)()],
|
|
648
|
+
["airdropId", (0, import_kit6.getU64Encoder)()]
|
|
648
649
|
]),
|
|
649
650
|
(value) => ({ ...value, discriminator: CLAIM_AIRDROP_DISCRIMINATOR })
|
|
650
651
|
);
|
|
@@ -655,7 +656,8 @@ function getClaimAirdropInstructionDataDecoder() {
|
|
|
655
656
|
["index", (0, import_kit6.getU64Decoder)()],
|
|
656
657
|
["proof", (0, import_kit6.getArrayDecoder)((0, import_kit6.fixDecoderSize)((0, import_kit6.getBytesDecoder)(), 32))],
|
|
657
658
|
["amount", (0, import_kit6.getU64Decoder)()],
|
|
658
|
-
["claimMapIndex", (0, import_kit6.getU16Decoder)()]
|
|
659
|
+
["claimMapIndex", (0, import_kit6.getU16Decoder)()],
|
|
660
|
+
["airdropId", (0, import_kit6.getU64Decoder)()]
|
|
659
661
|
]);
|
|
660
662
|
}
|
|
661
663
|
function getClaimAirdropInstructionDataCodec() {
|
|
@@ -1120,7 +1122,8 @@ function getCreateBitmapInstructionDataEncoder() {
|
|
|
1120
1122
|
(0, import_kit8.getStructEncoder)([
|
|
1121
1123
|
["discriminator", (0, import_kit8.fixEncoderSize)((0, import_kit8.getBytesEncoder)(), 8)],
|
|
1122
1124
|
["id", (0, import_kit8.getU16Encoder)()],
|
|
1123
|
-
["total", (0, import_kit8.getU32Encoder)()]
|
|
1125
|
+
["total", (0, import_kit8.getU32Encoder)()],
|
|
1126
|
+
["airdropId", (0, import_kit8.getU64Encoder)()]
|
|
1124
1127
|
]),
|
|
1125
1128
|
(value) => ({ ...value, discriminator: CREATE_BITMAP_DISCRIMINATOR })
|
|
1126
1129
|
);
|
|
@@ -1129,7 +1132,8 @@ function getCreateBitmapInstructionDataDecoder() {
|
|
|
1129
1132
|
return (0, import_kit8.getStructDecoder)([
|
|
1130
1133
|
["discriminator", (0, import_kit8.fixDecoderSize)((0, import_kit8.getBytesDecoder)(), 8)],
|
|
1131
1134
|
["id", (0, import_kit8.getU16Decoder)()],
|
|
1132
|
-
["total", (0, import_kit8.getU32Decoder)()]
|
|
1135
|
+
["total", (0, import_kit8.getU32Decoder)()],
|
|
1136
|
+
["airdropId", (0, import_kit8.getU64Decoder)()]
|
|
1133
1137
|
]);
|
|
1134
1138
|
}
|
|
1135
1139
|
function getCreateBitmapInstructionDataCodec() {
|
|
@@ -1216,7 +1220,8 @@ async function getCreateBitmapInstructionAsync(input, config) {
|
|
|
1216
1220
|
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1217
1221
|
),
|
|
1218
1222
|
(0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.authority.value)),
|
|
1219
|
-
(0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.mint.value))
|
|
1223
|
+
(0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.mint.value)),
|
|
1224
|
+
(0, import_kit8.getU64Encoder)().encode(expectSome(args.airdropId))
|
|
1220
1225
|
]
|
|
1221
1226
|
});
|
|
1222
1227
|
}
|
|
@@ -1344,7 +1349,8 @@ function getDepositTokensInstructionDataEncoder() {
|
|
|
1344
1349
|
return (0, import_kit9.transformEncoder)(
|
|
1345
1350
|
(0, import_kit9.getStructEncoder)([
|
|
1346
1351
|
["discriminator", (0, import_kit9.fixEncoderSize)((0, import_kit9.getBytesEncoder)(), 8)],
|
|
1347
|
-
["amount", (0, import_kit9.getU64Encoder)()]
|
|
1352
|
+
["amount", (0, import_kit9.getU64Encoder)()],
|
|
1353
|
+
["airdropId", (0, import_kit9.getU64Encoder)()]
|
|
1348
1354
|
]),
|
|
1349
1355
|
(value) => ({ ...value, discriminator: DEPOSIT_TOKENS_DISCRIMINATOR })
|
|
1350
1356
|
);
|
|
@@ -1352,7 +1358,8 @@ function getDepositTokensInstructionDataEncoder() {
|
|
|
1352
1358
|
function getDepositTokensInstructionDataDecoder() {
|
|
1353
1359
|
return (0, import_kit9.getStructDecoder)([
|
|
1354
1360
|
["discriminator", (0, import_kit9.fixDecoderSize)((0, import_kit9.getBytesDecoder)(), 8)],
|
|
1355
|
-
["amount", (0, import_kit9.getU64Decoder)()]
|
|
1361
|
+
["amount", (0, import_kit9.getU64Decoder)()],
|
|
1362
|
+
["airdropId", (0, import_kit9.getU64Decoder)()]
|
|
1356
1363
|
]);
|
|
1357
1364
|
}
|
|
1358
1365
|
function getDepositTokensInstructionDataCodec() {
|
|
@@ -1389,7 +1396,8 @@ async function getDepositTokensInstructionAsync(input, config) {
|
|
|
1389
1396
|
new Uint8Array([97, 105, 114, 100, 114, 111, 112])
|
|
1390
1397
|
),
|
|
1391
1398
|
(0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.authority.value)),
|
|
1392
|
-
(0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.mint.value))
|
|
1399
|
+
(0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.mint.value)),
|
|
1400
|
+
(0, import_kit9.getU64Encoder)().encode(expectSome(args.airdropId))
|
|
1393
1401
|
]
|
|
1394
1402
|
});
|
|
1395
1403
|
}
|
|
@@ -1601,7 +1609,7 @@ async function getInitializeAirdropConfigInstructionAsync(input, config) {
|
|
|
1601
1609
|
});
|
|
1602
1610
|
}
|
|
1603
1611
|
if (!accounts.authority.value) {
|
|
1604
|
-
accounts.authority.value = "
|
|
1612
|
+
accounts.authority.value = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F";
|
|
1605
1613
|
}
|
|
1606
1614
|
if (!accounts.systemProgram.value) {
|
|
1607
1615
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
@@ -1634,7 +1642,7 @@ function getInitializeAirdropConfigInstruction(input, config) {
|
|
|
1634
1642
|
const accounts = originalAccounts;
|
|
1635
1643
|
const args = { ...input };
|
|
1636
1644
|
if (!accounts.authority.value) {
|
|
1637
|
-
accounts.authority.value = "
|
|
1645
|
+
accounts.authority.value = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F";
|
|
1638
1646
|
}
|
|
1639
1647
|
if (!accounts.systemProgram.value) {
|
|
1640
1648
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|