@aastar/core 0.16.8 → 0.16.11

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.
Files changed (60) hide show
  1. package/dist/abis/PaymasterV4_2.json +1193 -0
  2. package/dist/abis/SuperPaymaster.json +1 -1
  3. package/dist/abis/aPNTs.json +1160 -0
  4. package/dist/abis/abi.config.json +3 -3
  5. package/dist/abis/index.d.ts +15 -104
  6. package/dist/abis/index.js +22 -46
  7. package/dist/actions/account.d.ts +0 -15
  8. package/dist/actions/account.js +143 -108
  9. package/dist/actions/aggregator.d.ts +68 -7
  10. package/dist/actions/aggregator.js +328 -28
  11. package/dist/actions/dvt.d.ts +33 -5
  12. package/dist/actions/dvt.js +238 -38
  13. package/dist/actions/entryPoint.d.ts +3 -63
  14. package/dist/actions/entryPoint.js +52 -184
  15. package/dist/actions/factory.d.ts +48 -115
  16. package/dist/actions/factory.js +638 -438
  17. package/dist/actions/faucet.d.ts +23 -27
  18. package/dist/actions/faucet.js +150 -289
  19. package/dist/actions/index.d.ts +1 -2
  20. package/dist/actions/index.js +2 -4
  21. package/dist/actions/paymaster.d.ts +147 -0
  22. package/dist/actions/paymaster.js +706 -0
  23. package/dist/actions/paymasterV4.d.ts +26 -95
  24. package/dist/actions/paymasterV4.js +28 -121
  25. package/dist/actions/registry.d.ts +116 -165
  26. package/dist/actions/registry.js +855 -654
  27. package/dist/actions/reputation.d.ts +74 -52
  28. package/dist/actions/reputation.js +548 -242
  29. package/dist/actions/sbt.d.ts +90 -100
  30. package/dist/actions/sbt.js +801 -518
  31. package/dist/actions/staking.d.ts +45 -32
  32. package/dist/actions/staking.js +431 -260
  33. package/dist/actions/superPaymaster.d.ts +140 -158
  34. package/dist/actions/superPaymaster.js +965 -631
  35. package/dist/actions/tokens.d.ts +130 -108
  36. package/dist/actions/tokens.js +470 -414
  37. package/dist/actions/validators.d.ts +0 -73
  38. package/dist/actions/validators.js +0 -94
  39. package/dist/clients/BaseClient.d.ts +3 -3
  40. package/dist/clients/BundlerClient.d.ts +55 -0
  41. package/dist/clients/BundlerClient.js +92 -0
  42. package/dist/communities.js +2 -2
  43. package/dist/constants.js +1 -28
  44. package/dist/contract-addresses.d.ts +5 -14
  45. package/dist/contract-addresses.js +3 -9
  46. package/dist/contract-versions.d.ts +138 -0
  47. package/dist/contract-versions.js +328 -0
  48. package/dist/contracts.d.ts +6 -24
  49. package/dist/contracts.js +2 -2
  50. package/dist/errors/index.d.ts +57 -0
  51. package/dist/errors/index.js +123 -0
  52. package/dist/index.d.ts +2 -1
  53. package/dist/index.js +2 -1
  54. package/dist/requirementChecker.d.ts +35 -1
  55. package/dist/requirementChecker.js +39 -1
  56. package/dist/roles.d.ts +50 -61
  57. package/dist/roles.js +50 -61
  58. package/dist/validators/index.d.ts +35 -0
  59. package/dist/validators/index.js +60 -0
  60. package/package.json +5 -13
@@ -8,39 +8,33 @@ export type StakingActions = {
8
8
  payer: Address;
9
9
  account?: Account | Address;
10
10
  }) => Promise<Hash>;
11
- unlockStake: (args: {
11
+ topUpStake: (args: {
12
12
  user: Address;
13
13
  roleId: Hex;
14
+ stakeAmount: bigint;
15
+ payer: Address;
14
16
  account?: Account | Address;
15
17
  }) => Promise<Hash>;
16
- unlockAndTransfer: (args: {
18
+ unlockStake: (args: {
17
19
  user: Address;
18
20
  roleId: Hex;
19
21
  account?: Account | Address;
20
22
  }) => Promise<Hash>;
21
- stake: (args: {
22
- amount: bigint;
23
- account?: Account | Address;
24
- }) => Promise<Hash>;
25
- topUpStake: (args: {
26
- amount: bigint;
27
- account?: Account | Address;
28
- }) => Promise<Hash>;
29
- unstake: (args: {
30
- amount: bigint;
23
+ unlockAndTransfer: (args: {
24
+ user: Address;
25
+ roleId: Hex;
31
26
  account?: Account | Address;
32
27
  }) => Promise<Hash>;
33
28
  slash: (args: {
34
29
  user: Address;
35
- roleId: Hex;
36
30
  amount: bigint;
37
31
  reason: string;
38
32
  account?: Account | Address;
39
33
  }) => Promise<Hash>;
40
34
  slashByDVT: (args: {
41
- user: Address;
35
+ operator: Address;
42
36
  roleId: Hex;
43
- amount: bigint;
37
+ penaltyAmount: bigint;
44
38
  reason: string;
45
39
  account?: Account | Address;
46
40
  }) => Promise<Hash>;
@@ -52,7 +46,12 @@ export type StakingActions = {
52
46
  getStakeInfo: (args: {
53
47
  operator: Address;
54
48
  roleId: Hex;
55
- }) => Promise<any>;
49
+ }) => Promise<{
50
+ amount: bigint;
51
+ slashedAmount: bigint;
52
+ stakedAt: bigint;
53
+ unstakeRequestedAt: bigint;
54
+ }>;
56
55
  getStakingBalance: (args: {
57
56
  user: Address;
58
57
  }) => Promise<bigint>;
@@ -62,7 +61,13 @@ export type StakingActions = {
62
61
  }) => Promise<bigint>;
63
62
  getUserRoleLocks: (args: {
64
63
  user: Address;
65
- }) => Promise<any[]>;
64
+ }) => Promise<Array<{
65
+ amount: bigint;
66
+ entryBurn: bigint;
67
+ lockedAt: number;
68
+ roleId: Hex;
69
+ metadata: Hex;
70
+ }>>;
66
71
  hasRoleLock: (args: {
67
72
  user: Address;
68
73
  roleId: Hex;
@@ -73,18 +78,18 @@ export type StakingActions = {
73
78
  previewExitFee: (args: {
74
79
  user: Address;
75
80
  roleId: Hex;
76
- }) => Promise<bigint>;
81
+ }) => Promise<{
82
+ fee: bigint;
83
+ netAmount: bigint;
84
+ }>;
77
85
  setRegistry: (args: {
78
86
  registry: Address;
79
87
  account?: Account | Address;
80
88
  }) => Promise<Hash>;
81
- transferOwnership: (args: {
82
- newOwner: Address;
83
- account?: Account | Address;
84
- }) => Promise<Hash>;
85
89
  setRoleExitFee: (args: {
86
90
  roleId: Hex;
87
91
  feePercent: bigint;
92
+ minFee: bigint;
88
93
  account?: Account | Address;
89
94
  }) => Promise<Hash>;
90
95
  setTreasury: (args: {
@@ -93,14 +98,28 @@ export type StakingActions = {
93
98
  }) => Promise<Hash>;
94
99
  stakes: (args: {
95
100
  user: Address;
96
- }) => Promise<any>;
101
+ }) => Promise<{
102
+ amount: bigint;
103
+ slashedAmount: bigint;
104
+ stakedAt: bigint;
105
+ unstakeRequestedAt: bigint;
106
+ }>;
97
107
  roleLocks: (args: {
98
108
  user: Address;
99
109
  roleId: Hex;
100
- }) => Promise<any>;
110
+ }) => Promise<{
111
+ amount: bigint;
112
+ entryBurn: bigint;
113
+ lockedAt: number;
114
+ roleId: Hex;
115
+ metadata: Hex;
116
+ }>;
101
117
  roleExitConfigs: (args: {
102
118
  roleId: Hex;
103
- }) => Promise<any>;
119
+ }) => Promise<{
120
+ feePercent: bigint;
121
+ minFee: bigint;
122
+ }>;
104
123
  userActiveRoles: (args: {
105
124
  user: Address;
106
125
  index: bigint;
@@ -108,17 +127,11 @@ export type StakingActions = {
108
127
  authorizedSlashers: (args: {
109
128
  slasher: Address;
110
129
  }) => Promise<boolean>;
111
- getStake: (args: {
112
- account: Address;
113
- }) => Promise<bigint>;
114
- balanceOf: (args: {
115
- account: Address;
116
- }) => Promise<bigint>;
117
130
  totalStaked: () => Promise<bigint>;
118
131
  getTotalStaked: () => Promise<bigint>;
119
132
  treasury: () => Promise<Address>;
120
133
  owner: () => Promise<Address>;
121
- transferStakingOwnership: (args: {
134
+ transferOwnership: (args: {
122
135
  newOwner: Address;
123
136
  account?: Account | Address;
124
137
  }) => Promise<Hash>;