@aastar/core 0.16.7
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/LICENSE +21 -0
- package/dist/abis/BLSAggregator.json +686 -0
- package/dist/abis/BLSValidator.json +42 -0
- package/dist/abis/DVTValidator.json +368 -0
- package/dist/abis/Eip7702Support.json +24 -0
- package/dist/abis/EntryPoint.json +1382 -0
- package/dist/abis/GToken.json +513 -0
- package/dist/abis/GTokenStaking.json +949 -0
- package/dist/abis/LegacyAccount.json +625 -0
- package/dist/abis/MySBT.json +1518 -0
- package/dist/abis/Paymaster.json +1143 -0
- package/dist/abis/PaymasterFactory.json +640 -0
- package/dist/abis/Registry.json +1942 -0
- package/dist/abis/ReputationSystem.json +699 -0
- package/dist/abis/SenderCreator.json +99 -0
- package/dist/abis/Simple7702Account.json +395 -0
- package/dist/abis/SimpleAccount.json +560 -0
- package/dist/abis/SimpleAccountFactory.json +111 -0
- package/dist/abis/SimpleAccountFactoryV08.json +87 -0
- package/dist/abis/SimpleAccountV08.json +557 -0
- package/dist/abis/SuperPaymaster.json +1781 -0
- package/dist/abis/UserOperationLib.json +57 -0
- package/dist/abis/abi.config.json +24 -0
- package/dist/abis/index.d.ts +1126 -0
- package/dist/abis/index.js +91 -0
- package/dist/abis/xPNTsFactory.json +718 -0
- package/dist/abis/xPNTsToken.json +1280 -0
- package/dist/actions/StateValidator.d.ts +68 -0
- package/dist/actions/StateValidator.js +187 -0
- package/dist/actions/StateValidator.test.d.ts +1 -0
- package/dist/actions/StateValidator.test.js +144 -0
- package/dist/actions/account.d.ts +55 -0
- package/dist/actions/account.js +133 -0
- package/dist/actions/account.test.d.ts +1 -0
- package/dist/actions/account.test.js +118 -0
- package/dist/actions/aggregator.d.ts +17 -0
- package/dist/actions/aggregator.js +31 -0
- package/dist/actions/aggregator.test.d.ts +1 -0
- package/dist/actions/aggregator.test.js +67 -0
- package/dist/actions/dvt.d.ts +30 -0
- package/dist/actions/dvt.js +41 -0
- package/dist/actions/dvt.test.d.ts +1 -0
- package/dist/actions/dvt.test.js +98 -0
- package/dist/actions/entryPoint.d.ts +90 -0
- package/dist/actions/entryPoint.js +211 -0
- package/dist/actions/entryPoint.test.d.ts +1 -0
- package/dist/actions/entryPoint.test.js +139 -0
- package/dist/actions/factory.d.ts +215 -0
- package/dist/actions/factory.js +442 -0
- package/dist/actions/factory.test.d.ts +1 -0
- package/dist/actions/factory.test.js +197 -0
- package/dist/actions/faucet.d.ts +48 -0
- package/dist/actions/faucet.js +337 -0
- package/dist/actions/faucet.test.d.ts +1 -0
- package/dist/actions/faucet.test.js +120 -0
- package/dist/actions/gtokenExtended.d.ts +39 -0
- package/dist/actions/gtokenExtended.js +115 -0
- package/dist/actions/gtokenExtended.test.d.ts +1 -0
- package/dist/actions/gtokenExtended.test.js +118 -0
- package/dist/actions/index.d.ts +15 -0
- package/dist/actions/index.js +17 -0
- package/dist/actions/paymasterV4.d.ts +170 -0
- package/dist/actions/paymasterV4.js +334 -0
- package/dist/actions/paymasterV4.test.d.ts +1 -0
- package/dist/actions/paymasterV4.test.js +159 -0
- package/dist/actions/registry.d.ts +246 -0
- package/dist/actions/registry.js +667 -0
- package/dist/actions/registry.test.d.ts +1 -0
- package/dist/actions/registry.test.js +360 -0
- package/dist/actions/reputation.d.ts +129 -0
- package/dist/actions/reputation.js +281 -0
- package/dist/actions/reputation.test.d.ts +1 -0
- package/dist/actions/reputation.test.js +169 -0
- package/dist/actions/sbt.d.ts +191 -0
- package/dist/actions/sbt.js +533 -0
- package/dist/actions/sbt.test.d.ts +1 -0
- package/dist/actions/sbt.test.js +256 -0
- package/dist/actions/staking.d.ts +132 -0
- package/dist/actions/staking.js +330 -0
- package/dist/actions/staking.test.d.ts +1 -0
- package/dist/actions/staking.test.js +223 -0
- package/dist/actions/superPaymaster.d.ts +237 -0
- package/dist/actions/superPaymaster.js +644 -0
- package/dist/actions/superPaymaster.test.d.ts +1 -0
- package/dist/actions/superPaymaster.test.js +287 -0
- package/dist/actions/tokens.d.ts +229 -0
- package/dist/actions/tokens.js +415 -0
- package/dist/actions/tokens.test.d.ts +1 -0
- package/dist/actions/tokens.test.js +53 -0
- package/dist/actions/validators.d.ts +194 -0
- package/dist/actions/validators.js +433 -0
- package/dist/actions/validators.test.d.ts +1 -0
- package/dist/actions/validators.test.js +215 -0
- package/dist/branding.d.ts +30 -0
- package/dist/branding.js +30 -0
- package/dist/clients/BaseClient.d.ts +25 -0
- package/dist/clients/BaseClient.js +66 -0
- package/dist/clients/types.d.ts +60 -0
- package/dist/clients/types.js +1 -0
- package/dist/clients.d.ts +5 -0
- package/dist/clients.js +11 -0
- package/dist/communities.d.ts +52 -0
- package/dist/communities.js +73 -0
- package/dist/config/ContractConfigManager.d.ts +20 -0
- package/dist/config/ContractConfigManager.js +48 -0
- package/dist/constants.d.ts +88 -0
- package/dist/constants.js +125 -0
- package/dist/contract-addresses.d.ts +110 -0
- package/dist/contract-addresses.js +99 -0
- package/dist/contracts.d.ts +424 -0
- package/dist/contracts.js +343 -0
- package/dist/contracts.test.d.ts +1 -0
- package/dist/contracts.test.js +40 -0
- package/dist/crypto/blsSigner.d.ts +64 -0
- package/dist/crypto/blsSigner.js +98 -0
- package/dist/crypto/index.d.ts +1 -0
- package/dist/crypto/index.js +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +21 -0
- package/dist/networks.d.ts +127 -0
- package/dist/networks.js +118 -0
- package/dist/requirementChecker.d.ts +38 -0
- package/dist/requirementChecker.js +139 -0
- package/dist/requirementChecker.test.d.ts +1 -0
- package/dist/requirementChecker.test.js +60 -0
- package/dist/roles.d.ts +204 -0
- package/dist/roles.js +211 -0
- package/dist/roles.test.d.ts +1 -0
- package/dist/roles.test.js +23 -0
- package/dist/utils/validation.d.ts +24 -0
- package/dist/utils/validation.js +56 -0
- package/dist/utils/validation.test.d.ts +1 -0
- package/dist/utils/validation.test.js +40 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.js +14 -0
- package/package.json +33 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
+
import { paymasterV4Actions } from './paymasterV4.js';
|
|
3
|
+
describe('PaymasterV4 Actions', () => {
|
|
4
|
+
const mockPaymasterAddress = '0x1234567890123456789012345678901234567890';
|
|
5
|
+
let mockPublicClient;
|
|
6
|
+
let mockWalletClient;
|
|
7
|
+
let mockAccount;
|
|
8
|
+
const MOCK_USER = '0x2222222222222222222222222222222222222222';
|
|
9
|
+
const MOCK_TOKEN = '0x3333333333333333333333333333333333333333';
|
|
10
|
+
const MOCK_SBT = '0x4444444444444444444444444444444444444444';
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
mockAccount = {
|
|
13
|
+
address: '0x1111111111111111111111111111111111111111',
|
|
14
|
+
type: 'json-rpc'
|
|
15
|
+
};
|
|
16
|
+
mockPublicClient = {
|
|
17
|
+
readContract: vi.fn(),
|
|
18
|
+
};
|
|
19
|
+
mockWalletClient = {
|
|
20
|
+
writeContract: vi.fn(),
|
|
21
|
+
account: mockAccount,
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
describe('Deposit-Only Model', () => {
|
|
25
|
+
it('should deposit for user', async () => {
|
|
26
|
+
const txHash = '0xabc...';
|
|
27
|
+
mockWalletClient.writeContract.mockResolvedValue(txHash);
|
|
28
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockWalletClient);
|
|
29
|
+
const result = await actions.paymasterV4DepositFor({
|
|
30
|
+
user: MOCK_USER,
|
|
31
|
+
token: MOCK_TOKEN,
|
|
32
|
+
amount: 1000n,
|
|
33
|
+
account: mockAccount
|
|
34
|
+
});
|
|
35
|
+
expect(result).toBe(txHash);
|
|
36
|
+
expect(mockWalletClient.writeContract).toHaveBeenCalledWith(expect.objectContaining({
|
|
37
|
+
functionName: 'depositFor',
|
|
38
|
+
args: [MOCK_USER, MOCK_TOKEN, 1000n],
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
it('should withdraw tokens', async () => {
|
|
42
|
+
const txHash = '0xdef...';
|
|
43
|
+
mockWalletClient.writeContract.mockResolvedValue(txHash);
|
|
44
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockWalletClient);
|
|
45
|
+
const result = await actions.paymasterV4Withdraw({
|
|
46
|
+
token: MOCK_TOKEN,
|
|
47
|
+
amount: 500n,
|
|
48
|
+
account: mockAccount
|
|
49
|
+
});
|
|
50
|
+
expect(result).toBe(txHash);
|
|
51
|
+
});
|
|
52
|
+
it('should get balance', async () => {
|
|
53
|
+
mockPublicClient.readContract.mockResolvedValue(1000n);
|
|
54
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockPublicClient);
|
|
55
|
+
const balance = await actions.paymasterV4Balances({ user: MOCK_USER, token: MOCK_TOKEN });
|
|
56
|
+
expect(balance).toBe(1000n);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
describe('Token Pricing', () => {
|
|
60
|
+
it('should set token price', async () => {
|
|
61
|
+
const txHash = '0xghi...';
|
|
62
|
+
mockWalletClient.writeContract.mockResolvedValue(txHash);
|
|
63
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockWalletClient);
|
|
64
|
+
const result = await actions.paymasterV4SetTokenPrice({
|
|
65
|
+
token: MOCK_TOKEN,
|
|
66
|
+
price: 2000n,
|
|
67
|
+
account: mockAccount
|
|
68
|
+
});
|
|
69
|
+
expect(result).toBe(txHash);
|
|
70
|
+
});
|
|
71
|
+
it('should get token price', async () => {
|
|
72
|
+
mockPublicClient.readContract.mockResolvedValue(2000n);
|
|
73
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockPublicClient);
|
|
74
|
+
const price = await actions.paymasterV4TokenPrices({ token: MOCK_TOKEN });
|
|
75
|
+
expect(price).toBe(2000n);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
describe('Gas Token Management', () => {
|
|
79
|
+
it('should add gas token', async () => {
|
|
80
|
+
const txHash = '0xjkl...';
|
|
81
|
+
mockWalletClient.writeContract.mockResolvedValue(txHash);
|
|
82
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockWalletClient);
|
|
83
|
+
const result = await actions.paymasterV4AddGasToken({
|
|
84
|
+
token: MOCK_TOKEN,
|
|
85
|
+
priceFeed: '0x5555555555555555555555555555555555555555',
|
|
86
|
+
account: mockAccount
|
|
87
|
+
});
|
|
88
|
+
expect(result).toBe(txHash);
|
|
89
|
+
});
|
|
90
|
+
it('should get supported gas tokens', async () => {
|
|
91
|
+
const mockTokens = [MOCK_TOKEN];
|
|
92
|
+
mockPublicClient.readContract.mockResolvedValue(mockTokens);
|
|
93
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockPublicClient);
|
|
94
|
+
const tokens = await actions.paymasterV4GetSupportedGasTokens();
|
|
95
|
+
expect(tokens).toEqual(mockTokens);
|
|
96
|
+
});
|
|
97
|
+
it('should check if gas token is supported', async () => {
|
|
98
|
+
mockPublicClient.readContract.mockResolvedValue(true);
|
|
99
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockPublicClient);
|
|
100
|
+
const supported = await actions.paymasterV4IsGasTokenSupported({ token: MOCK_TOKEN });
|
|
101
|
+
expect(supported).toBe(true);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
describe('SBT Management', () => {
|
|
105
|
+
it('should add SBT', async () => {
|
|
106
|
+
const txHash = '0xmno...';
|
|
107
|
+
mockWalletClient.writeContract.mockResolvedValue(txHash);
|
|
108
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockWalletClient);
|
|
109
|
+
const result = await actions.paymasterV4AddSBT({ sbt: MOCK_SBT, account: mockAccount });
|
|
110
|
+
expect(result).toBe(txHash);
|
|
111
|
+
});
|
|
112
|
+
it('should get supported SBTs', async () => {
|
|
113
|
+
const mockSBTs = [MOCK_SBT];
|
|
114
|
+
mockPublicClient.readContract.mockResolvedValue(mockSBTs);
|
|
115
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockPublicClient);
|
|
116
|
+
const sbts = await actions.paymasterV4GetSupportedSBTs();
|
|
117
|
+
expect(sbts).toEqual(mockSBTs);
|
|
118
|
+
});
|
|
119
|
+
it('should check if SBT is supported', async () => {
|
|
120
|
+
mockPublicClient.readContract.mockResolvedValue(true);
|
|
121
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockPublicClient);
|
|
122
|
+
const supported = await actions.paymasterV4IsSBTSupported({ sbt: MOCK_SBT });
|
|
123
|
+
expect(supported).toBe(true);
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
describe('Traditional Deposit/Withdraw', () => {
|
|
127
|
+
it('should deposit directly', async () => {
|
|
128
|
+
const txHash = '0xpqr...';
|
|
129
|
+
mockWalletClient.writeContract.mockResolvedValue(txHash);
|
|
130
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockWalletClient);
|
|
131
|
+
const result = await actions.paymasterV4Deposit({ account: mockAccount });
|
|
132
|
+
expect(result).toBe(txHash);
|
|
133
|
+
});
|
|
134
|
+
it('should withdraw to address', async () => {
|
|
135
|
+
const txHash = '0xstu...';
|
|
136
|
+
mockWalletClient.writeContract.mockResolvedValue(txHash);
|
|
137
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockWalletClient);
|
|
138
|
+
const result = await actions.paymasterV4WithdrawTo({
|
|
139
|
+
to: MOCK_USER,
|
|
140
|
+
amount: 100n,
|
|
141
|
+
account: mockAccount
|
|
142
|
+
});
|
|
143
|
+
expect(result).toBe(txHash);
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
describe('Validation', () => {
|
|
147
|
+
it('should validate paymaster UserOp', async () => {
|
|
148
|
+
const mockResult = '0x...';
|
|
149
|
+
mockPublicClient.readContract.mockResolvedValue(mockResult);
|
|
150
|
+
const actions = paymasterV4Actions(mockPaymasterAddress)(mockPublicClient);
|
|
151
|
+
const result = await actions.paymasterV4ValidatePaymasterUserOp({
|
|
152
|
+
userOp: {},
|
|
153
|
+
userOpHash: '0xhash',
|
|
154
|
+
maxCost: 1000n
|
|
155
|
+
});
|
|
156
|
+
expect(result).toBe(mockResult);
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
});
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { type Address, type PublicClient, type WalletClient, type Hex, type Hash, type Account } from 'viem';
|
|
2
|
+
import type { RoleConfig } from '../roles.js';
|
|
3
|
+
export type RegistryActions = {
|
|
4
|
+
registryConfigureRole: (args: {
|
|
5
|
+
roleId: Hex;
|
|
6
|
+
config: RoleConfig;
|
|
7
|
+
account?: Account | Address;
|
|
8
|
+
}) => Promise<Hash>;
|
|
9
|
+
registryRegisterRole: (args: {
|
|
10
|
+
roleId: Hex;
|
|
11
|
+
user: Address;
|
|
12
|
+
data: Hex;
|
|
13
|
+
account?: Account | Address;
|
|
14
|
+
}) => Promise<Hash>;
|
|
15
|
+
registryRegisterRoleSelf: (args: {
|
|
16
|
+
roleId: Hex;
|
|
17
|
+
data: Hex;
|
|
18
|
+
account?: Account | Address;
|
|
19
|
+
}) => Promise<Hash>;
|
|
20
|
+
registryHasRole: (args: {
|
|
21
|
+
user: Address;
|
|
22
|
+
roleId: Hex;
|
|
23
|
+
}) => Promise<boolean>;
|
|
24
|
+
registryUnRegisterRole: (args: {
|
|
25
|
+
user: Address;
|
|
26
|
+
roleId: Hex;
|
|
27
|
+
account?: Account | Address;
|
|
28
|
+
}) => Promise<Hash>;
|
|
29
|
+
registryGetRoleConfig: (args: {
|
|
30
|
+
roleId: Hex;
|
|
31
|
+
}) => Promise<any>;
|
|
32
|
+
registrySetRoleLockDuration: (args: {
|
|
33
|
+
roleId: Hex;
|
|
34
|
+
duration: bigint;
|
|
35
|
+
account?: Account | Address;
|
|
36
|
+
}) => Promise<Hash>;
|
|
37
|
+
registrySetRoleOwner: (args: {
|
|
38
|
+
roleId: Hex;
|
|
39
|
+
newOwner: Address;
|
|
40
|
+
account?: Account | Address;
|
|
41
|
+
}) => Promise<Hash>;
|
|
42
|
+
registryIsCommunityMember: (args: {
|
|
43
|
+
community: Address;
|
|
44
|
+
user: Address;
|
|
45
|
+
}) => Promise<boolean>;
|
|
46
|
+
registryCommunityByName: (args: {
|
|
47
|
+
name: string;
|
|
48
|
+
}) => Promise<Address>;
|
|
49
|
+
registryCommunityByENS: (args: {
|
|
50
|
+
ensName: string;
|
|
51
|
+
}) => Promise<Address>;
|
|
52
|
+
registryCommunityByNameV3: (args: {
|
|
53
|
+
name: string;
|
|
54
|
+
}) => Promise<Address>;
|
|
55
|
+
registryCommunityByENSV3: (args: {
|
|
56
|
+
ensName: string;
|
|
57
|
+
}) => Promise<Address>;
|
|
58
|
+
registryProposedRoleNames: (args: {
|
|
59
|
+
roleId: Hex;
|
|
60
|
+
}) => Promise<string>;
|
|
61
|
+
registryExecutedProposals: (args: {
|
|
62
|
+
proposalId: bigint;
|
|
63
|
+
}) => Promise<boolean>;
|
|
64
|
+
registryGetAccountCommunity: (args: {
|
|
65
|
+
account: Address;
|
|
66
|
+
}) => Promise<Address>;
|
|
67
|
+
registryLastReputationEpoch: () => Promise<bigint>;
|
|
68
|
+
registryIsReputationSource: (args: {
|
|
69
|
+
source: Address;
|
|
70
|
+
}) => Promise<boolean>;
|
|
71
|
+
registryRoleCounts: (args: {
|
|
72
|
+
roleId: Hex;
|
|
73
|
+
}) => Promise<bigint>;
|
|
74
|
+
registryRoleMembers: (args: {
|
|
75
|
+
roleId: Hex;
|
|
76
|
+
index: bigint;
|
|
77
|
+
}) => Promise<Address>;
|
|
78
|
+
registryRoleMemberIndex: (args: {
|
|
79
|
+
roleId: Hex;
|
|
80
|
+
user: Address;
|
|
81
|
+
}) => Promise<bigint>;
|
|
82
|
+
registryRoleMetadata: (args: {
|
|
83
|
+
roleId: Hex;
|
|
84
|
+
user?: Address;
|
|
85
|
+
}) => Promise<Hex>;
|
|
86
|
+
registryRoleStakes: (args: {
|
|
87
|
+
roleId: Hex;
|
|
88
|
+
user: Address;
|
|
89
|
+
}) => Promise<bigint>;
|
|
90
|
+
registryRoleSBTTokenIds: (args: {
|
|
91
|
+
roleId: Hex;
|
|
92
|
+
user: Address;
|
|
93
|
+
}) => Promise<bigint>;
|
|
94
|
+
registryUserRoles: (args: {
|
|
95
|
+
user: Address;
|
|
96
|
+
index: bigint;
|
|
97
|
+
}) => Promise<Hex>;
|
|
98
|
+
registryUserRoleCount: (args: {
|
|
99
|
+
user: Address;
|
|
100
|
+
}) => Promise<bigint>;
|
|
101
|
+
registryGlobalReputation: (args: {
|
|
102
|
+
user: Address;
|
|
103
|
+
}) => Promise<bigint>;
|
|
104
|
+
registryBatchUpdateGlobalReputation: (args: {
|
|
105
|
+
users: Address[];
|
|
106
|
+
scores: bigint[];
|
|
107
|
+
epoch: bigint;
|
|
108
|
+
proof: Hex;
|
|
109
|
+
account?: Account | Address;
|
|
110
|
+
}) => Promise<Hash>;
|
|
111
|
+
registryUpdateOperatorBlacklist: (args: {
|
|
112
|
+
operator: Address;
|
|
113
|
+
users: Address[];
|
|
114
|
+
statuses: boolean[];
|
|
115
|
+
proof: Hex;
|
|
116
|
+
account?: Account | Address;
|
|
117
|
+
}) => Promise<Hash>;
|
|
118
|
+
registryIsOperatorBlacklisted: (args: {
|
|
119
|
+
operator: Address;
|
|
120
|
+
}) => Promise<boolean>;
|
|
121
|
+
registrySetBLSValidator: (args: {
|
|
122
|
+
validator: Address;
|
|
123
|
+
account?: Account | Address;
|
|
124
|
+
}) => Promise<Hash>;
|
|
125
|
+
registrySetBLSAggregator: (args: {
|
|
126
|
+
aggregator: Address;
|
|
127
|
+
account?: Account | Address;
|
|
128
|
+
}) => Promise<Hash>;
|
|
129
|
+
registrySetMySBT: (args: {
|
|
130
|
+
sbt: Address;
|
|
131
|
+
account?: Account | Address;
|
|
132
|
+
}) => Promise<Hash>;
|
|
133
|
+
registrySetSuperPaymaster: (args: {
|
|
134
|
+
paymaster: Address;
|
|
135
|
+
account?: Account | Address;
|
|
136
|
+
}) => Promise<Hash>;
|
|
137
|
+
registrySetStaking: (args: {
|
|
138
|
+
staking: Address;
|
|
139
|
+
account?: Account | Address;
|
|
140
|
+
}) => Promise<Hash>;
|
|
141
|
+
registrySetReputationSource: (args: {
|
|
142
|
+
source: Address;
|
|
143
|
+
account?: Account | Address;
|
|
144
|
+
}) => Promise<Hash>;
|
|
145
|
+
registryBlsValidator: () => Promise<Address>;
|
|
146
|
+
registryBlsAggregator: () => Promise<Address>;
|
|
147
|
+
registryMySBT: () => Promise<Address>;
|
|
148
|
+
registrySuperPaymaster: () => Promise<Address>;
|
|
149
|
+
registryStaking: () => Promise<Address>;
|
|
150
|
+
registryReputationSource: () => Promise<Address>;
|
|
151
|
+
registryTransferOwnership: (args: {
|
|
152
|
+
newOwner: Address;
|
|
153
|
+
account?: Account | Address;
|
|
154
|
+
}) => Promise<Hash>;
|
|
155
|
+
registryOwner: () => Promise<Address>;
|
|
156
|
+
registryRenounceOwnership: (args: {
|
|
157
|
+
account?: Account | Address;
|
|
158
|
+
}) => Promise<Hash>;
|
|
159
|
+
registryRoleConfigs: (args: {
|
|
160
|
+
roleId: Hex;
|
|
161
|
+
}) => Promise<any>;
|
|
162
|
+
registryGetRoleMemberCount: (args: {
|
|
163
|
+
roleId: Hex;
|
|
164
|
+
}) => Promise<bigint>;
|
|
165
|
+
registryLevelThresholds: (args: {
|
|
166
|
+
level: bigint;
|
|
167
|
+
}) => Promise<bigint>;
|
|
168
|
+
registryRoleLockDurations: (args: {
|
|
169
|
+
roleId: Hex;
|
|
170
|
+
}) => Promise<bigint>;
|
|
171
|
+
registryRoleOwners: (args: {
|
|
172
|
+
roleId: Hex;
|
|
173
|
+
}) => Promise<Address>;
|
|
174
|
+
registryGetRoleMembers: (args: {
|
|
175
|
+
roleId: Hex;
|
|
176
|
+
}) => Promise<Address[]>;
|
|
177
|
+
registryGetRoleUserCount: (args: {
|
|
178
|
+
roleId: Hex;
|
|
179
|
+
}) => Promise<bigint>;
|
|
180
|
+
registryGetUserRoles: (args: {
|
|
181
|
+
user: Address;
|
|
182
|
+
}) => Promise<Hex[]>;
|
|
183
|
+
registryExitRole: (args: {
|
|
184
|
+
roleId: Hex;
|
|
185
|
+
account?: Account | Address;
|
|
186
|
+
}) => Promise<Hash>;
|
|
187
|
+
registryCalculateExitFee: (args: {
|
|
188
|
+
roleId: Hex;
|
|
189
|
+
amount: bigint;
|
|
190
|
+
}) => Promise<bigint>;
|
|
191
|
+
registryAddLevelThreshold: (args: {
|
|
192
|
+
threshold: bigint;
|
|
193
|
+
account?: Account | Address;
|
|
194
|
+
}) => Promise<Hash>;
|
|
195
|
+
registrySetLevelThreshold: (args: {
|
|
196
|
+
index: bigint;
|
|
197
|
+
threshold: bigint;
|
|
198
|
+
account?: Account | Address;
|
|
199
|
+
}) => Promise<Hash>;
|
|
200
|
+
registryAccountToUser: (args: {
|
|
201
|
+
account: Address;
|
|
202
|
+
}) => Promise<Address>;
|
|
203
|
+
registryGetCreditLimit: (args: {
|
|
204
|
+
user: Address;
|
|
205
|
+
}) => Promise<bigint>;
|
|
206
|
+
registrySetCreditTier: (args: {
|
|
207
|
+
level: bigint;
|
|
208
|
+
limit: bigint;
|
|
209
|
+
account?: Account | Address;
|
|
210
|
+
}) => Promise<Hash>;
|
|
211
|
+
registryCreditTierConfig: (args: {
|
|
212
|
+
level: bigint;
|
|
213
|
+
}) => Promise<bigint>;
|
|
214
|
+
registryAdminConfigureRole: (args: {
|
|
215
|
+
roleId: Hex;
|
|
216
|
+
minStake: bigint;
|
|
217
|
+
entryBurn: bigint;
|
|
218
|
+
exitFeePercent: number;
|
|
219
|
+
minExitFee: bigint;
|
|
220
|
+
account?: Account | Address;
|
|
221
|
+
}) => Promise<Hash>;
|
|
222
|
+
registryCreateNewRole: (args: {
|
|
223
|
+
roleId: Hex;
|
|
224
|
+
config: RoleConfig;
|
|
225
|
+
roleOwner: Address;
|
|
226
|
+
account?: Account | Address;
|
|
227
|
+
}) => Promise<Hash>;
|
|
228
|
+
registrySafeMintForRole: (args: {
|
|
229
|
+
roleId: Hex;
|
|
230
|
+
user: Address;
|
|
231
|
+
data: Hex;
|
|
232
|
+
account?: Account | Address;
|
|
233
|
+
}) => Promise<Hash>;
|
|
234
|
+
registryROLE_COMMUNITY: () => Promise<Hex>;
|
|
235
|
+
registryROLE_ENDUSER: () => Promise<Hex>;
|
|
236
|
+
registryROLE_PAYMASTER_SUPER: () => Promise<Hex>;
|
|
237
|
+
registryROLE_PAYMASTER_AOA: () => Promise<Hex>;
|
|
238
|
+
registryROLE_DVT: () => Promise<Hex>;
|
|
239
|
+
registryROLE_KMS: () => Promise<Hex>;
|
|
240
|
+
registryROLE_ANODE: () => Promise<Hex>;
|
|
241
|
+
registryGTOKEN_STAKING: () => Promise<Address>;
|
|
242
|
+
registryMYSBT: () => Promise<Address>;
|
|
243
|
+
registrySUPER_PAYMASTER: () => Promise<Address>;
|
|
244
|
+
registryVersion: () => Promise<string>;
|
|
245
|
+
};
|
|
246
|
+
export declare const registryActions: (address: Address) => (client: PublicClient | WalletClient) => RegistryActions;
|