@pump-fun/pump-sdk 1.9.3-devnet.1 → 1.9.4-devnet.1

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/src/idl/pump.ts CHANGED
@@ -1018,6 +1018,99 @@ export type Pump = {
1018
1018
  ],
1019
1019
  "args": []
1020
1020
  },
1021
+ {
1022
+ "name": "closeUserVolumeAccumulator",
1023
+ "discriminator": [
1024
+ 249,
1025
+ 69,
1026
+ 164,
1027
+ 218,
1028
+ 150,
1029
+ 103,
1030
+ 84,
1031
+ 138
1032
+ ],
1033
+ "accounts": [
1034
+ {
1035
+ "name": "user",
1036
+ "writable": true,
1037
+ "signer": true
1038
+ },
1039
+ {
1040
+ "name": "userVolumeAccumulator",
1041
+ "writable": true,
1042
+ "pda": {
1043
+ "seeds": [
1044
+ {
1045
+ "kind": "const",
1046
+ "value": [
1047
+ 117,
1048
+ 115,
1049
+ 101,
1050
+ 114,
1051
+ 95,
1052
+ 118,
1053
+ 111,
1054
+ 108,
1055
+ 117,
1056
+ 109,
1057
+ 101,
1058
+ 95,
1059
+ 97,
1060
+ 99,
1061
+ 99,
1062
+ 117,
1063
+ 109,
1064
+ 117,
1065
+ 108,
1066
+ 97,
1067
+ 116,
1068
+ 111,
1069
+ 114
1070
+ ]
1071
+ },
1072
+ {
1073
+ "kind": "account",
1074
+ "path": "user"
1075
+ }
1076
+ ]
1077
+ }
1078
+ },
1079
+ {
1080
+ "name": "eventAuthority",
1081
+ "pda": {
1082
+ "seeds": [
1083
+ {
1084
+ "kind": "const",
1085
+ "value": [
1086
+ 95,
1087
+ 95,
1088
+ 101,
1089
+ 118,
1090
+ 101,
1091
+ 110,
1092
+ 116,
1093
+ 95,
1094
+ 97,
1095
+ 117,
1096
+ 116,
1097
+ 104,
1098
+ 111,
1099
+ 114,
1100
+ 105,
1101
+ 116,
1102
+ 121
1103
+ ]
1104
+ }
1105
+ ]
1106
+ }
1107
+ },
1108
+ {
1109
+ "name": "program"
1110
+ }
1111
+ ],
1112
+ "args": []
1113
+ },
1021
1114
  {
1022
1115
  "name": "collectCreatorFee",
1023
1116
  "docs": [
@@ -1498,6 +1591,106 @@ export type Pump = {
1498
1591
  ],
1499
1592
  "args": []
1500
1593
  },
1594
+ {
1595
+ "name": "initUserVolumeAccumulator",
1596
+ "discriminator": [
1597
+ 94,
1598
+ 6,
1599
+ 202,
1600
+ 115,
1601
+ 255,
1602
+ 96,
1603
+ 232,
1604
+ 183
1605
+ ],
1606
+ "accounts": [
1607
+ {
1608
+ "name": "payer",
1609
+ "writable": true,
1610
+ "signer": true
1611
+ },
1612
+ {
1613
+ "name": "user"
1614
+ },
1615
+ {
1616
+ "name": "userVolumeAccumulator",
1617
+ "writable": true,
1618
+ "pda": {
1619
+ "seeds": [
1620
+ {
1621
+ "kind": "const",
1622
+ "value": [
1623
+ 117,
1624
+ 115,
1625
+ 101,
1626
+ 114,
1627
+ 95,
1628
+ 118,
1629
+ 111,
1630
+ 108,
1631
+ 117,
1632
+ 109,
1633
+ 101,
1634
+ 95,
1635
+ 97,
1636
+ 99,
1637
+ 99,
1638
+ 117,
1639
+ 109,
1640
+ 117,
1641
+ 108,
1642
+ 97,
1643
+ 116,
1644
+ 111,
1645
+ 114
1646
+ ]
1647
+ },
1648
+ {
1649
+ "kind": "account",
1650
+ "path": "user"
1651
+ }
1652
+ ]
1653
+ }
1654
+ },
1655
+ {
1656
+ "name": "systemProgram",
1657
+ "address": "11111111111111111111111111111111"
1658
+ },
1659
+ {
1660
+ "name": "eventAuthority",
1661
+ "pda": {
1662
+ "seeds": [
1663
+ {
1664
+ "kind": "const",
1665
+ "value": [
1666
+ 95,
1667
+ 95,
1668
+ 101,
1669
+ 118,
1670
+ 101,
1671
+ 110,
1672
+ 116,
1673
+ 95,
1674
+ 97,
1675
+ 117,
1676
+ 116,
1677
+ 104,
1678
+ 111,
1679
+ 114,
1680
+ 105,
1681
+ 116,
1682
+ 121
1683
+ ]
1684
+ }
1685
+ ]
1686
+ }
1687
+ },
1688
+ {
1689
+ "name": "program"
1690
+ }
1691
+ ],
1692
+ "args": []
1693
+ },
1501
1694
  {
1502
1695
  "name": "initialize",
1503
1696
  "docs": [
@@ -3141,6 +3334,19 @@ export type Pump = {
3141
3334
  232
3142
3335
  ]
3143
3336
  },
3337
+ {
3338
+ "name": "closeUserVolumeAccumulatorEvent",
3339
+ "discriminator": [
3340
+ 146,
3341
+ 159,
3342
+ 189,
3343
+ 172,
3344
+ 146,
3345
+ 88,
3346
+ 56,
3347
+ 244
3348
+ ]
3349
+ },
3144
3350
  {
3145
3351
  "name": "collectCreatorFeeEvent",
3146
3352
  "discriminator": [
@@ -3206,6 +3412,19 @@ export type Pump = {
3206
3412
  124
3207
3413
  ]
3208
3414
  },
3415
+ {
3416
+ "name": "initUserVolumeAccumulatorEvent",
3417
+ "discriminator": [
3418
+ 134,
3419
+ 36,
3420
+ 13,
3421
+ 72,
3422
+ 232,
3423
+ 101,
3424
+ 130,
3425
+ 216
3426
+ ]
3427
+ },
3209
3428
  {
3210
3429
  "name": "setCreatorEvent",
3211
3430
  "discriminator": [
@@ -3619,6 +3838,22 @@ export type Pump = {
3619
3838
  ]
3620
3839
  }
3621
3840
  },
3841
+ {
3842
+ "name": "closeUserVolumeAccumulatorEvent",
3843
+ "type": {
3844
+ "kind": "struct",
3845
+ "fields": [
3846
+ {
3847
+ "name": "user",
3848
+ "type": "pubkey"
3849
+ },
3850
+ {
3851
+ "name": "timestamp",
3852
+ "type": "i64"
3853
+ }
3854
+ ]
3855
+ }
3856
+ },
3622
3857
  {
3623
3858
  "name": "collectCreatorFeeEvent",
3624
3859
  "type": {
@@ -3908,6 +4143,26 @@ export type Pump = {
3908
4143
  ]
3909
4144
  }
3910
4145
  },
4146
+ {
4147
+ "name": "initUserVolumeAccumulatorEvent",
4148
+ "type": {
4149
+ "kind": "struct",
4150
+ "fields": [
4151
+ {
4152
+ "name": "payer",
4153
+ "type": "pubkey"
4154
+ },
4155
+ {
4156
+ "name": "user",
4157
+ "type": "pubkey"
4158
+ },
4159
+ {
4160
+ "name": "timestamp",
4161
+ "type": "i64"
4162
+ }
4163
+ ]
4164
+ }
4165
+ },
3911
4166
  {
3912
4167
  "name": "setCreatorEvent",
3913
4168
  "type": {
package/src/sdk.ts CHANGED
@@ -714,6 +714,28 @@ export class PumpSdk {
714
714
  })
715
715
  .instruction();
716
716
  }
717
+
718
+ async initUserVolumeAccumulator({
719
+ payer,
720
+ user,
721
+ }: {
722
+ payer: PublicKey;
723
+ user: PublicKey;
724
+ }): Promise<TransactionInstruction> {
725
+ return await this.offlinePumpProgram.methods
726
+ .initUserVolumeAccumulator()
727
+ .accountsPartial({ payer, user })
728
+ .instruction();
729
+ }
730
+
731
+ async closeUserVolumeAccumulator(
732
+ user: PublicKey,
733
+ ): Promise<TransactionInstruction> {
734
+ return await this.offlinePumpProgram.methods
735
+ .closeUserVolumeAccumulator()
736
+ .accountsPartial({ user })
737
+ .instruction();
738
+ }
717
739
  }
718
740
 
719
741
  function getFeeRecipient(global: Global): PublicKey {