@dropsy/airdrop 0.4.1 → 0.4.2

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 CHANGED
@@ -673,10 +673,12 @@ type CreateBitmapInstructionData = {
673
673
  discriminator: ReadonlyUint8Array;
674
674
  id: number;
675
675
  total: number;
676
+ airdropId: bigint;
676
677
  };
677
678
  type CreateBitmapInstructionDataArgs = {
678
679
  id: number;
679
680
  total: number;
681
+ airdropId: number | bigint;
680
682
  };
681
683
  declare function getCreateBitmapInstructionDataEncoder(): FixedSizeEncoder<CreateBitmapInstructionDataArgs>;
682
684
  declare function getCreateBitmapInstructionDataDecoder(): FixedSizeDecoder<CreateBitmapInstructionData>;
@@ -694,6 +696,7 @@ type CreateBitmapAsyncInput<TAccountAirdropConfig extends string = string, TAcco
694
696
  systemProgram?: Address<TAccountSystemProgram>;
695
697
  id: CreateBitmapInstructionDataArgs["id"];
696
698
  total: CreateBitmapInstructionDataArgs["total"];
699
+ airdropId: CreateBitmapInstructionDataArgs["airdropId"];
697
700
  };
698
701
  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
702
  programAddress?: TProgramAddress;
@@ -711,6 +714,7 @@ type CreateBitmapInput<TAccountAirdropConfig extends string = string, TAccountPr
711
714
  systemProgram?: Address<TAccountSystemProgram>;
712
715
  id: CreateBitmapInstructionDataArgs["id"];
713
716
  total: CreateBitmapInstructionDataArgs["total"];
717
+ airdropId: CreateBitmapInstructionDataArgs["airdropId"];
714
718
  };
715
719
  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
720
  programAddress?: TProgramAddress;
@@ -757,9 +761,11 @@ type DepositTokensInstruction<TProgram extends string = typeof DROPSY_AIRDROP_PR
757
761
  type DepositTokensInstructionData = {
758
762
  discriminator: ReadonlyUint8Array;
759
763
  amount: bigint;
764
+ airdropId: bigint;
760
765
  };
761
766
  type DepositTokensInstructionDataArgs = {
762
767
  amount: number | bigint;
768
+ airdropId: number | bigint;
763
769
  };
764
770
  declare function getDepositTokensInstructionDataEncoder(): FixedSizeEncoder<DepositTokensInstructionDataArgs>;
765
771
  declare function getDepositTokensInstructionDataDecoder(): FixedSizeDecoder<DepositTokensInstructionData>;
@@ -774,6 +780,7 @@ type DepositTokensAsyncInput<TAccountSourceTokenAccount extends string = string,
774
780
  associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
775
781
  systemProgram?: Address<TAccountSystemProgram>;
776
782
  amount: DepositTokensInstructionDataArgs["amount"];
783
+ airdropId: DepositTokensInstructionDataArgs["airdropId"];
777
784
  };
778
785
  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
786
  programAddress?: TProgramAddress;
@@ -788,6 +795,7 @@ type DepositTokensInput<TAccountSourceTokenAccount extends string = string, TAcc
788
795
  associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
789
796
  systemProgram?: Address<TAccountSystemProgram>;
790
797
  amount: DepositTokensInstructionDataArgs["amount"];
798
+ airdropId: DepositTokensInstructionDataArgs["airdropId"];
791
799
  };
792
800
  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
801
  programAddress?: TProgramAddress;
@@ -818,7 +826,7 @@ declare function parseDepositTokensInstruction<TProgram extends string, TAccount
818
826
 
819
827
  declare const INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
820
828
  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> = "79xcTj8QDPhqg7Bwvoz9CrckmGyo2JJXU9duVqJbCLxc", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
829
+ 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
830
  TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
823
831
  TAccountProtocolTreasury extends string ? ReadonlyAccount<TAccountProtocolTreasury> : TAccountProtocolTreasury,
824
832
  TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
package/dist/index.d.ts CHANGED
@@ -673,10 +673,12 @@ type CreateBitmapInstructionData = {
673
673
  discriminator: ReadonlyUint8Array;
674
674
  id: number;
675
675
  total: number;
676
+ airdropId: bigint;
676
677
  };
677
678
  type CreateBitmapInstructionDataArgs = {
678
679
  id: number;
679
680
  total: number;
681
+ airdropId: number | bigint;
680
682
  };
681
683
  declare function getCreateBitmapInstructionDataEncoder(): FixedSizeEncoder<CreateBitmapInstructionDataArgs>;
682
684
  declare function getCreateBitmapInstructionDataDecoder(): FixedSizeDecoder<CreateBitmapInstructionData>;
@@ -694,6 +696,7 @@ type CreateBitmapAsyncInput<TAccountAirdropConfig extends string = string, TAcco
694
696
  systemProgram?: Address<TAccountSystemProgram>;
695
697
  id: CreateBitmapInstructionDataArgs["id"];
696
698
  total: CreateBitmapInstructionDataArgs["total"];
699
+ airdropId: CreateBitmapInstructionDataArgs["airdropId"];
697
700
  };
698
701
  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
702
  programAddress?: TProgramAddress;
@@ -711,6 +714,7 @@ type CreateBitmapInput<TAccountAirdropConfig extends string = string, TAccountPr
711
714
  systemProgram?: Address<TAccountSystemProgram>;
712
715
  id: CreateBitmapInstructionDataArgs["id"];
713
716
  total: CreateBitmapInstructionDataArgs["total"];
717
+ airdropId: CreateBitmapInstructionDataArgs["airdropId"];
714
718
  };
715
719
  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
720
  programAddress?: TProgramAddress;
@@ -757,9 +761,11 @@ type DepositTokensInstruction<TProgram extends string = typeof DROPSY_AIRDROP_PR
757
761
  type DepositTokensInstructionData = {
758
762
  discriminator: ReadonlyUint8Array;
759
763
  amount: bigint;
764
+ airdropId: bigint;
760
765
  };
761
766
  type DepositTokensInstructionDataArgs = {
762
767
  amount: number | bigint;
768
+ airdropId: number | bigint;
763
769
  };
764
770
  declare function getDepositTokensInstructionDataEncoder(): FixedSizeEncoder<DepositTokensInstructionDataArgs>;
765
771
  declare function getDepositTokensInstructionDataDecoder(): FixedSizeDecoder<DepositTokensInstructionData>;
@@ -774,6 +780,7 @@ type DepositTokensAsyncInput<TAccountSourceTokenAccount extends string = string,
774
780
  associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
775
781
  systemProgram?: Address<TAccountSystemProgram>;
776
782
  amount: DepositTokensInstructionDataArgs["amount"];
783
+ airdropId: DepositTokensInstructionDataArgs["airdropId"];
777
784
  };
778
785
  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
786
  programAddress?: TProgramAddress;
@@ -788,6 +795,7 @@ type DepositTokensInput<TAccountSourceTokenAccount extends string = string, TAcc
788
795
  associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
789
796
  systemProgram?: Address<TAccountSystemProgram>;
790
797
  amount: DepositTokensInstructionDataArgs["amount"];
798
+ airdropId: DepositTokensInstructionDataArgs["airdropId"];
791
799
  };
792
800
  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
801
  programAddress?: TProgramAddress;
@@ -818,7 +826,7 @@ declare function parseDepositTokensInstruction<TProgram extends string, TAccount
818
826
 
819
827
  declare const INITIALIZE_AIRDROP_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
820
828
  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> = "79xcTj8QDPhqg7Bwvoz9CrckmGyo2JJXU9duVqJbCLxc", TAccountSystemProgram extends string | AccountMeta<string> = "11111111111111111111111111111111", TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
829
+ 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
830
  TAccountConfig extends string ? WritableAccount<TAccountConfig> : TAccountConfig,
823
831
  TAccountProtocolTreasury extends string ? ReadonlyAccount<TAccountProtocolTreasury> : TAccountProtocolTreasury,
824
832
  TAccountAuthority extends string ? WritableSignerAccount<TAccountAuthority> & AccountSignerMeta<TAccountAuthority> : TAccountAuthority,
package/dist/index.js CHANGED
@@ -1120,7 +1120,8 @@ function getCreateBitmapInstructionDataEncoder() {
1120
1120
  (0, import_kit8.getStructEncoder)([
1121
1121
  ["discriminator", (0, import_kit8.fixEncoderSize)((0, import_kit8.getBytesEncoder)(), 8)],
1122
1122
  ["id", (0, import_kit8.getU16Encoder)()],
1123
- ["total", (0, import_kit8.getU32Encoder)()]
1123
+ ["total", (0, import_kit8.getU32Encoder)()],
1124
+ ["airdropId", (0, import_kit8.getU64Encoder)()]
1124
1125
  ]),
1125
1126
  (value) => ({ ...value, discriminator: CREATE_BITMAP_DISCRIMINATOR })
1126
1127
  );
@@ -1129,7 +1130,8 @@ function getCreateBitmapInstructionDataDecoder() {
1129
1130
  return (0, import_kit8.getStructDecoder)([
1130
1131
  ["discriminator", (0, import_kit8.fixDecoderSize)((0, import_kit8.getBytesDecoder)(), 8)],
1131
1132
  ["id", (0, import_kit8.getU16Decoder)()],
1132
- ["total", (0, import_kit8.getU32Decoder)()]
1133
+ ["total", (0, import_kit8.getU32Decoder)()],
1134
+ ["airdropId", (0, import_kit8.getU64Decoder)()]
1133
1135
  ]);
1134
1136
  }
1135
1137
  function getCreateBitmapInstructionDataCodec() {
@@ -1216,7 +1218,8 @@ async function getCreateBitmapInstructionAsync(input, config) {
1216
1218
  new Uint8Array([97, 105, 114, 100, 114, 111, 112])
1217
1219
  ),
1218
1220
  (0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.authority.value)),
1219
- (0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.mint.value))
1221
+ (0, import_kit8.getAddressEncoder)().encode(expectAddress(accounts.mint.value)),
1222
+ (0, import_kit8.getU64Encoder)().encode(expectSome(args.airdropId))
1220
1223
  ]
1221
1224
  });
1222
1225
  }
@@ -1344,7 +1347,8 @@ function getDepositTokensInstructionDataEncoder() {
1344
1347
  return (0, import_kit9.transformEncoder)(
1345
1348
  (0, import_kit9.getStructEncoder)([
1346
1349
  ["discriminator", (0, import_kit9.fixEncoderSize)((0, import_kit9.getBytesEncoder)(), 8)],
1347
- ["amount", (0, import_kit9.getU64Encoder)()]
1350
+ ["amount", (0, import_kit9.getU64Encoder)()],
1351
+ ["airdropId", (0, import_kit9.getU64Encoder)()]
1348
1352
  ]),
1349
1353
  (value) => ({ ...value, discriminator: DEPOSIT_TOKENS_DISCRIMINATOR })
1350
1354
  );
@@ -1352,7 +1356,8 @@ function getDepositTokensInstructionDataEncoder() {
1352
1356
  function getDepositTokensInstructionDataDecoder() {
1353
1357
  return (0, import_kit9.getStructDecoder)([
1354
1358
  ["discriminator", (0, import_kit9.fixDecoderSize)((0, import_kit9.getBytesDecoder)(), 8)],
1355
- ["amount", (0, import_kit9.getU64Decoder)()]
1359
+ ["amount", (0, import_kit9.getU64Decoder)()],
1360
+ ["airdropId", (0, import_kit9.getU64Decoder)()]
1356
1361
  ]);
1357
1362
  }
1358
1363
  function getDepositTokensInstructionDataCodec() {
@@ -1389,7 +1394,8 @@ async function getDepositTokensInstructionAsync(input, config) {
1389
1394
  new Uint8Array([97, 105, 114, 100, 114, 111, 112])
1390
1395
  ),
1391
1396
  (0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.authority.value)),
1392
- (0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.mint.value))
1397
+ (0, import_kit9.getAddressEncoder)().encode(expectAddress(accounts.mint.value)),
1398
+ (0, import_kit9.getU64Encoder)().encode(expectSome(args.airdropId))
1393
1399
  ]
1394
1400
  });
1395
1401
  }
@@ -1601,7 +1607,7 @@ async function getInitializeAirdropConfigInstructionAsync(input, config) {
1601
1607
  });
1602
1608
  }
1603
1609
  if (!accounts.authority.value) {
1604
- accounts.authority.value = "79xcTj8QDPhqg7Bwvoz9CrckmGyo2JJXU9duVqJbCLxc";
1610
+ accounts.authority.value = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F";
1605
1611
  }
1606
1612
  if (!accounts.systemProgram.value) {
1607
1613
  accounts.systemProgram.value = "11111111111111111111111111111111";
@@ -1634,7 +1640,7 @@ function getInitializeAirdropConfigInstruction(input, config) {
1634
1640
  const accounts = originalAccounts;
1635
1641
  const args = { ...input };
1636
1642
  if (!accounts.authority.value) {
1637
- accounts.authority.value = "79xcTj8QDPhqg7Bwvoz9CrckmGyo2JJXU9duVqJbCLxc";
1643
+ accounts.authority.value = "5gB7WLoBWELAvRDYPUvGj7e7BHEv65j6YDhissdMTQ4F";
1638
1644
  }
1639
1645
  if (!accounts.systemProgram.value) {
1640
1646
  accounts.systemProgram.value = "11111111111111111111111111111111";