@aastar/sdk 0.24.1 → 0.25.0
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/UserClient-5PQP6APK.js +6 -0
- package/dist/{UserClient-KYDCMAIU.js.map → UserClient-5PQP6APK.js.map} +1 -1
- package/dist/UserClient-CD7R3335.cjs +15 -0
- package/dist/{UserClient-S6LS3CB6.cjs.map → UserClient-CD7R3335.cjs.map} +1 -1
- package/dist/account.cjs +8 -8
- package/dist/account.js +3 -3
- package/dist/addresses-D12T3kLs.d.cts +210 -0
- package/dist/addresses-D12T3kLs.d.ts +210 -0
- package/dist/admin.cjs +4 -4
- package/dist/admin.js +3 -3
- package/dist/airaccount.cjs +111 -103
- package/dist/airaccount.d.cts +1 -1
- package/dist/airaccount.d.ts +1 -1
- package/dist/airaccount.js +3 -3
- package/dist/channel.cjs +7 -7
- package/dist/channel.js +3 -3
- package/dist/{chunk-72JZKARR.cjs → chunk-2RHBOBL7.cjs} +6 -6
- package/dist/{chunk-72JZKARR.cjs.map → chunk-2RHBOBL7.cjs.map} +1 -1
- package/dist/{chunk-BYVG7MO7.js → chunk-6DZCDV4Q.js} +2137 -13
- package/dist/chunk-6DZCDV4Q.js.map +1 -0
- package/dist/{chunk-VEAYV52I.cjs → chunk-6IZASQSB.cjs} +236 -109
- package/dist/chunk-6IZASQSB.cjs.map +1 -0
- package/dist/{chunk-NVYVTCHJ.cjs → chunk-7HTUDNH3.cjs} +11 -11
- package/dist/{chunk-NVYVTCHJ.cjs.map → chunk-7HTUDNH3.cjs.map} +1 -1
- package/dist/{chunk-PNBK2CLK.js → chunk-7JVL5CU3.js} +3 -3
- package/dist/{chunk-PNBK2CLK.js.map → chunk-7JVL5CU3.js.map} +1 -1
- package/dist/{chunk-654GQ7G7.js → chunk-A4FO6FKN.js} +3 -3
- package/dist/{chunk-654GQ7G7.js.map → chunk-A4FO6FKN.js.map} +1 -1
- package/dist/{chunk-A4ICWCHR.cjs → chunk-CI4UJW5Y.cjs} +5 -5
- package/dist/{chunk-A4ICWCHR.cjs.map → chunk-CI4UJW5Y.cjs.map} +1 -1
- package/dist/{chunk-RZ2M2RVP.js → chunk-COTHBCR2.js} +3 -3
- package/dist/{chunk-RZ2M2RVP.js.map → chunk-COTHBCR2.js.map} +1 -1
- package/dist/{chunk-2UC7UPHV.js → chunk-D2RDBN46.js} +227 -102
- package/dist/chunk-D2RDBN46.js.map +1 -0
- package/dist/{chunk-WVOJV4Q5.cjs → chunk-FIMXPANS.cjs} +4 -4
- package/dist/{chunk-WVOJV4Q5.cjs.map → chunk-FIMXPANS.cjs.map} +1 -1
- package/dist/{chunk-MXJEULSE.cjs → chunk-G33MXEHU.cjs} +29 -2
- package/dist/chunk-G33MXEHU.cjs.map +1 -0
- package/dist/{chunk-D667CUUS.cjs → chunk-GASCTLKR.cjs} +9 -9
- package/dist/{chunk-D667CUUS.cjs.map → chunk-GASCTLKR.cjs.map} +1 -1
- package/dist/{chunk-PXQDAFXD.js → chunk-IG4BG25C.js} +6 -6
- package/dist/{chunk-PXQDAFXD.js.map → chunk-IG4BG25C.js.map} +1 -1
- package/dist/{chunk-5PH5CSM7.cjs → chunk-J3UAXGNP.cjs} +16 -16
- package/dist/{chunk-5PH5CSM7.cjs.map → chunk-J3UAXGNP.cjs.map} +1 -1
- package/dist/{chunk-WC25H5VG.js → chunk-JCEUTCFZ.js} +4 -4
- package/dist/{chunk-WC25H5VG.js.map → chunk-JCEUTCFZ.js.map} +1 -1
- package/dist/{chunk-MOJJ7QF6.cjs → chunk-KOWTQJIX.cjs} +2177 -49
- package/dist/chunk-KOWTQJIX.cjs.map +1 -0
- package/dist/chunk-L6D2AGTF.js +500 -0
- package/dist/chunk-L6D2AGTF.js.map +1 -0
- package/dist/{chunk-VHY6R2PI.cjs → chunk-LRPAX5AG.cjs} +32 -32
- package/dist/{chunk-VHY6R2PI.cjs.map → chunk-LRPAX5AG.cjs.map} +1 -1
- package/dist/{chunk-UCLK6LTB.js → chunk-MBWBHKUE.js} +28 -3
- package/dist/chunk-MBWBHKUE.js.map +1 -0
- package/dist/{chunk-BOVDJSMK.cjs → chunk-NHDZQPDE.cjs} +26 -26
- package/dist/{chunk-BOVDJSMK.cjs.map → chunk-NHDZQPDE.cjs.map} +1 -1
- package/dist/{chunk-HNJBQR5U.cjs → chunk-OBPTMV5W.cjs} +5 -5
- package/dist/{chunk-HNJBQR5U.cjs.map → chunk-OBPTMV5W.cjs.map} +1 -1
- package/dist/{chunk-JMW5AHLC.js → chunk-QTXPAGNX.js} +9 -9
- package/dist/{chunk-JMW5AHLC.js.map → chunk-QTXPAGNX.js.map} +1 -1
- package/dist/{chunk-WVJ4LQVB.js → chunk-UANSP3OK.js} +3 -3
- package/dist/{chunk-WVJ4LQVB.js.map → chunk-UANSP3OK.js.map} +1 -1
- package/dist/{chunk-DAMWXGKD.js → chunk-UTSFTWFC.js} +3 -3
- package/dist/{chunk-DAMWXGKD.js.map → chunk-UTSFTWFC.js.map} +1 -1
- package/dist/chunk-WTURYJEA.cjs +504 -0
- package/dist/chunk-WTURYJEA.cjs.map +1 -0
- package/dist/{chunk-LDARLWS3.js → chunk-YR7CTWY6.js} +3 -3
- package/dist/{chunk-LDARLWS3.js.map → chunk-YR7CTWY6.js.map} +1 -1
- package/dist/{contract-addresses-RABD77VP.cjs → contract-addresses-6K6IB5OB.cjs} +13 -13
- package/dist/{contract-addresses-RABD77VP.cjs.map → contract-addresses-6K6IB5OB.cjs.map} +1 -1
- package/dist/{contract-addresses-TVXSRQ7I.js → contract-addresses-CHZ7PK5H.js} +3 -3
- package/dist/{contract-addresses-TVXSRQ7I.js.map → contract-addresses-CHZ7PK5H.js.map} +1 -1
- package/dist/core.cjs +285 -261
- package/dist/core.d.cts +6 -175
- package/dist/core.d.ts +6 -175
- package/dist/core.js +2 -2
- package/dist/dapp.cjs +6 -6
- package/dist/dapp.js +3 -3
- package/dist/email.cjs +91 -0
- package/dist/email.cjs.map +1 -0
- package/dist/email.d.cts +115 -0
- package/dist/email.d.ts +115 -0
- package/dist/email.js +88 -0
- package/dist/email.js.map +1 -0
- package/dist/enduser.cjs +7 -7
- package/dist/enduser.js +4 -4
- package/dist/identity.cjs +6 -6
- package/dist/identity.js +3 -3
- package/dist/index.cjs +406 -374
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +17 -17
- package/dist/kms.cjs +111 -103
- package/dist/kms.d.cts +199 -19
- package/dist/kms.d.ts +199 -19
- package/dist/kms.js +3 -3
- package/dist/operator.cjs +7 -7
- package/dist/operator.js +3 -3
- package/dist/paymaster.cjs +16 -16
- package/dist/paymaster.js +3 -3
- package/dist/{src-N72HAQXS.cjs → src-DNURNUIA.cjs} +287 -263
- package/dist/src-DNURNUIA.cjs.map +1 -0
- package/dist/{src-72GWEAPA.cjs → src-DZDH3BSU.cjs} +18 -18
- package/dist/src-DZDH3BSU.cjs.map +1 -0
- package/dist/{src-UNS5B7FX.js → src-EVM7OESP.js} +5 -5
- package/dist/src-EVM7OESP.js.map +1 -0
- package/dist/src-FY3KAPPC.js +5 -0
- package/dist/src-FY3KAPPC.js.map +1 -0
- package/dist/tokens.cjs +12 -4
- package/dist/tokens.d.cts +133 -1
- package/dist/tokens.d.ts +133 -1
- package/dist/tokens.js +3 -3
- package/dist/x402.cjs +26 -26
- package/dist/x402.js +3 -3
- package/package.json +17 -2
- package/dist/UserClient-KYDCMAIU.js +0 -6
- package/dist/UserClient-S6LS3CB6.cjs +0 -15
- package/dist/chunk-2UC7UPHV.js.map +0 -1
- package/dist/chunk-7RVONA2R.js +0 -226
- package/dist/chunk-7RVONA2R.js.map +0 -1
- package/dist/chunk-BYVG7MO7.js.map +0 -1
- package/dist/chunk-GDH4DSVM.cjs +0 -228
- package/dist/chunk-GDH4DSVM.cjs.map +0 -1
- package/dist/chunk-MOJJ7QF6.cjs.map +0 -1
- package/dist/chunk-MXJEULSE.cjs.map +0 -1
- package/dist/chunk-UCLK6LTB.js.map +0 -1
- package/dist/chunk-VEAYV52I.cjs.map +0 -1
- package/dist/src-5URXSFKD.js +0 -5
- package/dist/src-5URXSFKD.js.map +0 -1
- package/dist/src-72GWEAPA.cjs.map +0 -1
- package/dist/src-N72HAQXS.cjs.map +0 -1
- package/dist/src-UNS5B7FX.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"UserClient-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"UserClient-5PQP6APK.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkJ3UAXGNP_cjs = require('./chunk-J3UAXGNP.cjs');
|
|
4
|
+
require('./chunk-KOWTQJIX.cjs');
|
|
5
|
+
require('./chunk-G33MXEHU.cjs');
|
|
6
|
+
require('./chunk-Q7SFCCGT.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "UserClient", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkJ3UAXGNP_cjs.UserClient; }
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=UserClient-CD7R3335.cjs.map
|
|
15
|
+
//# sourceMappingURL=UserClient-CD7R3335.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"UserClient-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"UserClient-CD7R3335.cjs"}
|
package/dist/account.cjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkOBPTMV5W_cjs = require('./chunk-OBPTMV5W.cjs');
|
|
4
|
+
require('./chunk-KOWTQJIX.cjs');
|
|
5
|
+
require('./chunk-G33MXEHU.cjs');
|
|
6
6
|
require('./chunk-Q7SFCCGT.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "UserOpClient", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkOBPTMV5W_cjs.UserOpClient; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "createEOAWalletClient", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkOBPTMV5W_cjs.createEOAWalletClient; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "getUserOpHash", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkOBPTMV5W_cjs.getUserOpHash; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "packUserOpLimits", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkOBPTMV5W_cjs.packUserOpLimits; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "toSimpleSmartAccount", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkOBPTMV5W_cjs.toSimpleSmartAccount; }
|
|
29
29
|
});
|
|
30
30
|
//# sourceMappingURL=account.cjs.map
|
|
31
31
|
//# sourceMappingURL=account.cjs.map
|
package/dist/account.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { UserOpClient, createEOAWalletClient, getUserOpHash, packUserOpLimits, toSimpleSmartAccount } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { UserOpClient, createEOAWalletClient, getUserOpHash, packUserOpLimits, toSimpleSmartAccount } from './chunk-UTSFTWFC.js';
|
|
2
|
+
import './chunk-6DZCDV4Q.js';
|
|
3
|
+
import './chunk-MBWBHKUE.js';
|
|
4
4
|
import './chunk-PZ5AY32C.js';
|
|
5
5
|
//# sourceMappingURL=account.js.map
|
|
6
6
|
//# sourceMappingURL=account.js.map
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Canonical Contract Addresses for Supported Networks
|
|
5
|
+
* These are hardcoded as defaults for NPM distribution.
|
|
6
|
+
*
|
|
7
|
+
* SINGLE SOURCE OF TRUTH for SDK contract addresses (Beta3.1 P2.8).
|
|
8
|
+
* The root `config.{network}.json` files are dev/deploy-time overrides and MUST
|
|
9
|
+
* agree with this table for any network that has a chainId entry here. The
|
|
10
|
+
* `scripts/check-address-consistency.ts` drift check (CI: `pnpm run check:addresses`)
|
|
11
|
+
* enforces that. NOTE: `@aastar/shared-config` is a separate external repo (vendored
|
|
12
|
+
* as git submodules under ext/ and lib/), NOT a workspace package and NOT the SDK's
|
|
13
|
+
* source of truth — do not treat it as canonical here.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
declare const CANONICAL_ADDRESSES: {
|
|
17
|
+
readonly 10: {
|
|
18
|
+
readonly registry: "0x997686219F31405503D32728B1f094F115EF24e7";
|
|
19
|
+
readonly gToken: "0x8d6Fe002dDacCcFBD377F684EC1825f2E1ab7ef6";
|
|
20
|
+
readonly staking: "0x7A1216C2d814D2389698C64eD23AA1aA9Eb6343E";
|
|
21
|
+
readonly sbt: "0x28eBFc5fc03B1d7648254AbF1C7B39DbFdef1a94";
|
|
22
|
+
readonly reputationSystem: "0xA9560898dC0eE4F9Ed3F1db17dbf74dE65e925c2";
|
|
23
|
+
readonly superPaymaster: "0xA2c9A6e95f19f5D2a364CBCbB5f0b32B1B4d140E";
|
|
24
|
+
readonly paymasterFactory: "0x58A7F6E44a57028A255794119F8b37124c9a7eB8";
|
|
25
|
+
readonly paymasterV4: "0x67a70a578E142b950987081e7016906ae4F56Df4";
|
|
26
|
+
readonly paymasterV4Impl: "0xc4dd13F7825409EEC13FBCBdD9D8f6d618207cca";
|
|
27
|
+
readonly xPNTsFactory: "0x864971a26384d9DCC7115f0bBC428e2623F28b6e";
|
|
28
|
+
readonly blsAggregator: "0x1C305372ecc5a36CBef1FA371392234bCD55eB19";
|
|
29
|
+
readonly blsValidator: "0xA88ADec5A8dc422B57488272d5aD5913d728942A";
|
|
30
|
+
readonly dvtValidator: "0x31Ede6454a56293f7cf2323CA5d5F9a6230558Fb";
|
|
31
|
+
readonly entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
32
|
+
readonly aPNTs: "0x0B41C78081B5A141eb4C3C7E7FD8E58A7Bde553B";
|
|
33
|
+
readonly priceFeed: "0x13e3Ee699D1909E989722E753853AE30b17e08c5";
|
|
34
|
+
readonly simpleAccountFactory: "0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985";
|
|
35
|
+
readonly microPaymentChannel: "0x0000000000000000000000000000000000000000";
|
|
36
|
+
readonly agentIdentityRegistry: "0x0000000000000000000000000000000000000000";
|
|
37
|
+
readonly agentReputationRegistry: "0x0000000000000000000000000000000000000000";
|
|
38
|
+
readonly agentValidationRegistry: "0x0000000000000000000000000000000000000000";
|
|
39
|
+
readonly aaStarBLSAlgorithm: "0x0000000000000000000000000000000000000000";
|
|
40
|
+
readonly aaStarValidator: "0x0000000000000000000000000000000000000000";
|
|
41
|
+
readonly aaStarBLSAggregator: "0x0000000000000000000000000000000000000000";
|
|
42
|
+
readonly sessionKeyValidator: "0x0000000000000000000000000000000000000000";
|
|
43
|
+
readonly forceExitModule: "0x0000000000000000000000000000000000000000";
|
|
44
|
+
readonly airAccountDelegate: "0x0000000000000000000000000000000000000000";
|
|
45
|
+
readonly calldataParserRegistry: "0x0000000000000000000000000000000000000000";
|
|
46
|
+
readonly airAccountFactoryV7: "0x0000000000000000000000000000000000000000";
|
|
47
|
+
readonly airAccountV7Impl: "0x0000000000000000000000000000000000000000";
|
|
48
|
+
readonly airAccountExtension: "0x0000000000000000000000000000000000000000";
|
|
49
|
+
readonly agentRegistry: "0x0000000000000000000000000000000000000000";
|
|
50
|
+
readonly policyRegistry: "0x0000000000000000000000000000000000000000";
|
|
51
|
+
readonly x402Facilitator: "0x0000000000000000000000000000000000000000";
|
|
52
|
+
readonly timelockController: "0x0000000000000000000000000000000000000000";
|
|
53
|
+
readonly pnts: "0x0000000000000000000000000000000000000000";
|
|
54
|
+
};
|
|
55
|
+
readonly 11155111: {
|
|
56
|
+
readonly registry: "0x3F920B25f8b65988359C372F66F036E48adFc556";
|
|
57
|
+
readonly gToken: "0x20a051502a7AE6e40cfFd6EBe59057538E698984";
|
|
58
|
+
readonly staking: "0x3B363598746Ea57314d4869B160940948c569D48";
|
|
59
|
+
readonly sbt: "0x072A0D12f4212B6baD7c6d0A633eaffbDE9105bF";
|
|
60
|
+
readonly reputationSystem: "0x7fEd690E1663755e24a1C9d6164336809d68a578";
|
|
61
|
+
readonly superPaymaster: "0x030025f40d509b1a99547bAEb3795bD27F7182b7";
|
|
62
|
+
readonly paymasterFactory: "0x0Aa06EA5295eeD4D48c93c594Db1CBf3626971A5";
|
|
63
|
+
readonly paymasterV4: "0x1f0D4eF151a79948070D387BaC43b1321F0c41e3";
|
|
64
|
+
readonly paymasterV4Impl: "0x59DCA5861aaDA602fE1BFbfcc36DFAc36C58623d";
|
|
65
|
+
readonly xPNTsFactory: "0xCec3655525a112882E74Fb7C26AcB267a07724cb";
|
|
66
|
+
readonly blsAggregator: "0x15387e161c1b3dAe7c66Fbd5c1F32837B58B2e79";
|
|
67
|
+
readonly blsValidator: "0x0A71C5a32b8CBC517523D2C88b539Ab22AeF0654";
|
|
68
|
+
readonly dvtValidator: "0x19BA9829C784E4A41b68960b9c0bA55f83718997";
|
|
69
|
+
readonly entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
70
|
+
readonly aPNTs: "0x9e66B457E0ABb1F139FD8A596d00f784eBA2873b";
|
|
71
|
+
readonly priceFeed: "0x694AA1769357215DE4FAC081bf1f309aDC325306";
|
|
72
|
+
readonly simpleAccountFactory: "0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985";
|
|
73
|
+
readonly microPaymentChannel: "0x405851A141Cde827E33247d4D4089Af2814c2FF5";
|
|
74
|
+
readonly agentIdentityRegistry: "0x8004A818BFB912233c491871b3d84c89A494BD9e";
|
|
75
|
+
readonly agentReputationRegistry: "0x8004B663056A597Dffe9eCcC1965A193B7388713";
|
|
76
|
+
readonly agentValidationRegistry: "0x8004Cb1BF31DAf7788923b405b754f57acEB4272";
|
|
77
|
+
readonly aaStarBLSAlgorithm: "0xAF525A161CB17e0A1b6254ef0B8d8473bdA05174";
|
|
78
|
+
readonly aaStarValidator: "0xfcDfd17a373E037c3F9C8ffE2c781915E7Ae6e11";
|
|
79
|
+
readonly aaStarBLSAggregator: "0x35775df9a4f4dB42Ea0C46118a12dDd0cEc70609";
|
|
80
|
+
readonly sessionKeyValidator: "0x6810CfB7c72D16e044a17694fAa8076e517264D0";
|
|
81
|
+
readonly forceExitModule: "0x3fDe77868b74a7979A40a2293a1CD265fbe66EEc";
|
|
82
|
+
readonly airAccountDelegate: "0xd2735E54C5f5f2BF523b8a9ddd0E183624c3f2c0";
|
|
83
|
+
readonly calldataParserRegistry: "0x7dEea4544446826601014bD94d0F6432A67496F5";
|
|
84
|
+
readonly airAccountFactoryV7: "0x99C9300d52EDD9f4B7135DEd1811fBa6FFa1DDC6";
|
|
85
|
+
readonly airAccountV7Impl: "0xd51db7eB20FF99c8588281CBe1785681Bb17D473";
|
|
86
|
+
readonly airAccountExtension: "0x5529f50811814E0a4966cFC21200DCeF9C3FCb5B";
|
|
87
|
+
readonly agentRegistry: "0xbcE1163817EEBA2E07d39424427B10937bF1D121";
|
|
88
|
+
readonly policyRegistry: "0x8c2488d46d5447418558c38AA6441720df656094";
|
|
89
|
+
readonly x402Facilitator: "0x326Fc3413c8A0185b0179B971C69813B6dFD971B";
|
|
90
|
+
readonly timelockController: "0xB734df3c0A1809bc06708512363D368Ac51dF1A2";
|
|
91
|
+
readonly pnts: "0xC687f8a115D308ECD39658a8EE33bC3c8F75EE31";
|
|
92
|
+
};
|
|
93
|
+
readonly 11155420: {
|
|
94
|
+
readonly registry: "0xcf6860Ab57de8669756997e414D9c52B6e301972";
|
|
95
|
+
readonly gToken: "0xC341c88453372021d0221834307613c2e99fE718";
|
|
96
|
+
readonly staking: "0x5f57B931C849e8E255F22755506eB2255aB22a7C";
|
|
97
|
+
readonly sbt: "0x2c3Ca1553dC1B8870381E8E56C7b3e3A3ae162f0";
|
|
98
|
+
readonly reputationSystem: "0x891EC0f84D9275839B8dAf74e87B23F2DBd7f9c9";
|
|
99
|
+
readonly superPaymaster: "0x9eC1FE8134A1C05aD34ba2E4e8758dAe0a009B94";
|
|
100
|
+
readonly paymasterFactory: "0x1e3b9d12eAc27867a523d0537902441B0E7D98d8";
|
|
101
|
+
readonly paymasterV4: "0xf250416C940605a1D423ccd059668219cf7D80ea";
|
|
102
|
+
readonly paymasterV4Impl: "0x906123080207F250B1C9F299991512Cb31f35b2f";
|
|
103
|
+
readonly xPNTsFactory: "0x7792a49C9E91e0E9B631B27D885d15e971B7482A";
|
|
104
|
+
readonly blsAggregator: "0x6e06b17b1a4D2D973F7E3e026e24b4393315736c";
|
|
105
|
+
readonly blsValidator: "0x260fa905CcE1f5b29Afe9d627c01fAAE4A66A7F5";
|
|
106
|
+
readonly dvtValidator: "0x0087cA806109E150438116cAA414580BB5fa9195";
|
|
107
|
+
readonly entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
108
|
+
readonly aPNTs: "0x3BBcA92Ad828b3dD619c980Ba09f929b9d2BC440";
|
|
109
|
+
readonly priceFeed: "0x61Ec26aA57019C486B10502285c5A3D4A4750AD7";
|
|
110
|
+
readonly simpleAccountFactory: "0x91E6060613810449d098b0b5EC8b51A0fe8C8985";
|
|
111
|
+
readonly microPaymentChannel: "0x0000000000000000000000000000000000000000";
|
|
112
|
+
readonly agentIdentityRegistry: "0x0000000000000000000000000000000000000000";
|
|
113
|
+
readonly agentReputationRegistry: "0x0000000000000000000000000000000000000000";
|
|
114
|
+
readonly agentValidationRegistry: "0x0000000000000000000000000000000000000000";
|
|
115
|
+
readonly aaStarBLSAlgorithm: "0x0000000000000000000000000000000000000000";
|
|
116
|
+
readonly aaStarValidator: "0x0000000000000000000000000000000000000000";
|
|
117
|
+
readonly aaStarBLSAggregator: "0x0000000000000000000000000000000000000000";
|
|
118
|
+
readonly sessionKeyValidator: "0x0000000000000000000000000000000000000000";
|
|
119
|
+
readonly forceExitModule: "0x0000000000000000000000000000000000000000";
|
|
120
|
+
readonly airAccountDelegate: "0x0000000000000000000000000000000000000000";
|
|
121
|
+
readonly calldataParserRegistry: "0x0000000000000000000000000000000000000000";
|
|
122
|
+
readonly airAccountFactoryV7: "0x0000000000000000000000000000000000000000";
|
|
123
|
+
readonly airAccountV7Impl: "0x0000000000000000000000000000000000000000";
|
|
124
|
+
readonly airAccountExtension: "0x0000000000000000000000000000000000000000";
|
|
125
|
+
readonly agentRegistry: "0x0000000000000000000000000000000000000000";
|
|
126
|
+
readonly policyRegistry: "0x0000000000000000000000000000000000000000";
|
|
127
|
+
readonly x402Facilitator: "0x0000000000000000000000000000000000000000";
|
|
128
|
+
readonly timelockController: "0x0000000000000000000000000000000000000000";
|
|
129
|
+
readonly pnts: "0x0000000000000000000000000000000000000000";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
type CanonicalAddresses = (typeof CANONICAL_ADDRESSES)[keyof typeof CANONICAL_ADDRESSES];
|
|
133
|
+
type SupportedChainId = keyof typeof CANONICAL_ADDRESSES;
|
|
134
|
+
/**
|
|
135
|
+
* MushroomDAO launch token-sale stack (aPoints + governance-token sale), keyed by chainId.
|
|
136
|
+
*
|
|
137
|
+
* Kept as a SEPARATE table from {@link CANONICAL_ADDRESSES} on purpose: these are the launch
|
|
138
|
+
* app's own contracts (`MushroomDAO/launch`), not the core SuperPaymaster protocol set, so they
|
|
139
|
+
* stay out of the constants/contract-addresses/drift-check pipeline.
|
|
140
|
+
*
|
|
141
|
+
* De-dup rule: this table stores ONLY the launch-specific contracts (the two sale contracts +
|
|
142
|
+
* BuyHelper) plus the accepted payment stablecoins. It deliberately does NOT store the GToken /
|
|
143
|
+
* aPNTs *payout* token addresses — `TokenSaleClient` reads those on-chain from the sale contract's
|
|
144
|
+
* `gToken()` / `aPNTs()` immutable getters, so there is never a second copy of a token address to
|
|
145
|
+
* drift. (Background: three different GToken deployments currently exist — core canonical
|
|
146
|
+
* `0x20a051…`, the launch live `0x4e6A11…`, and the launch DEPLOYED.md "SuperPaymaster" `0xa592ec…`.
|
|
147
|
+
* The live sale is constructor-bound to `0x4e6A11…`; binding it to the core-canonical GToken is the
|
|
148
|
+
* pre-mainnet reconciliation step.)
|
|
149
|
+
*/
|
|
150
|
+
interface LaunchSaleAddresses {
|
|
151
|
+
/** SaleContractV2 — sells the constructor-bound GToken (governance token). */
|
|
152
|
+
saleGToken: Address;
|
|
153
|
+
/** APNTsSaleContract — sells the constructor-bound aPNTs (aPoints). */
|
|
154
|
+
saleAPNTs: Address;
|
|
155
|
+
/** BuyHelper — gasless entrypoint (EIP-3009 transferWithAuthorization + EIP-712 BuyIntent). */
|
|
156
|
+
buyHelper: Address;
|
|
157
|
+
/** Accepted payment stablecoin: USDC (6-decimal). Also the EIP-3009 token for gasless. */
|
|
158
|
+
usdc: Address;
|
|
159
|
+
/** Accepted payment stablecoin: USDT (6-decimal). Self-pay only. */
|
|
160
|
+
usdt: Address;
|
|
161
|
+
/** Off-chain relayer that submits gasless buys (Cloudflare Worker). */
|
|
162
|
+
relayerUrl: string;
|
|
163
|
+
}
|
|
164
|
+
declare const LAUNCH_SALE_ADDRESSES: Record<number, LaunchSaleAddresses>;
|
|
165
|
+
/** Resolve the launch token-sale address group for a chain, or `undefined` if none. */
|
|
166
|
+
declare function getLaunchSaleAddresses(chainId: number): LaunchSaleAddresses | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Chain IDs that have a canonical address book in {@link CANONICAL_ADDRESSES}.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* listSupportedChainIds(); // [10, 11155111, 11155420]
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
declare function listSupportedChainIds(): number[];
|
|
176
|
+
/** True if {@link CANONICAL_ADDRESSES} has an entry for `chainId`. */
|
|
177
|
+
declare function isSupportedChainId(chainId: number): chainId is SupportedChainId;
|
|
178
|
+
/**
|
|
179
|
+
* Resolve the canonical contract address book for a chain, keyed by `chainId`,
|
|
180
|
+
* normalized to the key names the role-based client factories expect.
|
|
181
|
+
*
|
|
182
|
+
* The canonical table uses `staking` / `sbt`; the historical client factories
|
|
183
|
+
* (and many consumers) reference `gTokenStaking` / `mySBT`. This helper returns
|
|
184
|
+
* the canonical set plus those aliases so a single object satisfies both, which
|
|
185
|
+
* is what makes `createEndUserClient({ chain })` resolve addresses automatically
|
|
186
|
+
* — no manual `addresses` needed for any supported chain.
|
|
187
|
+
*
|
|
188
|
+
* @param chainId - EVM chain id (e.g. 10 = Optimism, 11155111 = Sepolia).
|
|
189
|
+
* @returns The normalized address record, or `undefined` if the chain has no
|
|
190
|
+
* canonical entry (caller must then pass `addresses` explicitly).
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```ts
|
|
194
|
+
* import { optimism } from 'viem/chains';
|
|
195
|
+
* const addrs = getCanonicalAddresses(optimism.id); // chainId 10
|
|
196
|
+
* addrs?.registry; addrs?.mySBT; // alias of `sbt`
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
declare function getCanonicalAddresses(chainId: number): (CanonicalAddresses & {
|
|
200
|
+
gTokenStaking: Address;
|
|
201
|
+
mySBT: Address;
|
|
202
|
+
}) | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* A friendly, human-readable list of the supported chains for error messages —
|
|
205
|
+
* e.g. `"OP Mainnet (10), Sepolia (11155111), OP Sepolia (11155420)"`. Names come
|
|
206
|
+
* from viem/chains so callers recognize them by the same label viem uses.
|
|
207
|
+
*/
|
|
208
|
+
declare function describeSupportedChains(): string;
|
|
209
|
+
|
|
210
|
+
export { CANONICAL_ADDRESSES as C, type LaunchSaleAddresses as L, type SupportedChainId as S, type CanonicalAddresses as a, LAUNCH_SALE_ADDRESSES as b, getCanonicalAddresses as c, describeSupportedChains as d, getLaunchSaleAddresses as g, isSupportedChainId as i, listSupportedChainIds as l };
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Canonical Contract Addresses for Supported Networks
|
|
5
|
+
* These are hardcoded as defaults for NPM distribution.
|
|
6
|
+
*
|
|
7
|
+
* SINGLE SOURCE OF TRUTH for SDK contract addresses (Beta3.1 P2.8).
|
|
8
|
+
* The root `config.{network}.json` files are dev/deploy-time overrides and MUST
|
|
9
|
+
* agree with this table for any network that has a chainId entry here. The
|
|
10
|
+
* `scripts/check-address-consistency.ts` drift check (CI: `pnpm run check:addresses`)
|
|
11
|
+
* enforces that. NOTE: `@aastar/shared-config` is a separate external repo (vendored
|
|
12
|
+
* as git submodules under ext/ and lib/), NOT a workspace package and NOT the SDK's
|
|
13
|
+
* source of truth — do not treat it as canonical here.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
declare const CANONICAL_ADDRESSES: {
|
|
17
|
+
readonly 10: {
|
|
18
|
+
readonly registry: "0x997686219F31405503D32728B1f094F115EF24e7";
|
|
19
|
+
readonly gToken: "0x8d6Fe002dDacCcFBD377F684EC1825f2E1ab7ef6";
|
|
20
|
+
readonly staking: "0x7A1216C2d814D2389698C64eD23AA1aA9Eb6343E";
|
|
21
|
+
readonly sbt: "0x28eBFc5fc03B1d7648254AbF1C7B39DbFdef1a94";
|
|
22
|
+
readonly reputationSystem: "0xA9560898dC0eE4F9Ed3F1db17dbf74dE65e925c2";
|
|
23
|
+
readonly superPaymaster: "0xA2c9A6e95f19f5D2a364CBCbB5f0b32B1B4d140E";
|
|
24
|
+
readonly paymasterFactory: "0x58A7F6E44a57028A255794119F8b37124c9a7eB8";
|
|
25
|
+
readonly paymasterV4: "0x67a70a578E142b950987081e7016906ae4F56Df4";
|
|
26
|
+
readonly paymasterV4Impl: "0xc4dd13F7825409EEC13FBCBdD9D8f6d618207cca";
|
|
27
|
+
readonly xPNTsFactory: "0x864971a26384d9DCC7115f0bBC428e2623F28b6e";
|
|
28
|
+
readonly blsAggregator: "0x1C305372ecc5a36CBef1FA371392234bCD55eB19";
|
|
29
|
+
readonly blsValidator: "0xA88ADec5A8dc422B57488272d5aD5913d728942A";
|
|
30
|
+
readonly dvtValidator: "0x31Ede6454a56293f7cf2323CA5d5F9a6230558Fb";
|
|
31
|
+
readonly entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
32
|
+
readonly aPNTs: "0x0B41C78081B5A141eb4C3C7E7FD8E58A7Bde553B";
|
|
33
|
+
readonly priceFeed: "0x13e3Ee699D1909E989722E753853AE30b17e08c5";
|
|
34
|
+
readonly simpleAccountFactory: "0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985";
|
|
35
|
+
readonly microPaymentChannel: "0x0000000000000000000000000000000000000000";
|
|
36
|
+
readonly agentIdentityRegistry: "0x0000000000000000000000000000000000000000";
|
|
37
|
+
readonly agentReputationRegistry: "0x0000000000000000000000000000000000000000";
|
|
38
|
+
readonly agentValidationRegistry: "0x0000000000000000000000000000000000000000";
|
|
39
|
+
readonly aaStarBLSAlgorithm: "0x0000000000000000000000000000000000000000";
|
|
40
|
+
readonly aaStarValidator: "0x0000000000000000000000000000000000000000";
|
|
41
|
+
readonly aaStarBLSAggregator: "0x0000000000000000000000000000000000000000";
|
|
42
|
+
readonly sessionKeyValidator: "0x0000000000000000000000000000000000000000";
|
|
43
|
+
readonly forceExitModule: "0x0000000000000000000000000000000000000000";
|
|
44
|
+
readonly airAccountDelegate: "0x0000000000000000000000000000000000000000";
|
|
45
|
+
readonly calldataParserRegistry: "0x0000000000000000000000000000000000000000";
|
|
46
|
+
readonly airAccountFactoryV7: "0x0000000000000000000000000000000000000000";
|
|
47
|
+
readonly airAccountV7Impl: "0x0000000000000000000000000000000000000000";
|
|
48
|
+
readonly airAccountExtension: "0x0000000000000000000000000000000000000000";
|
|
49
|
+
readonly agentRegistry: "0x0000000000000000000000000000000000000000";
|
|
50
|
+
readonly policyRegistry: "0x0000000000000000000000000000000000000000";
|
|
51
|
+
readonly x402Facilitator: "0x0000000000000000000000000000000000000000";
|
|
52
|
+
readonly timelockController: "0x0000000000000000000000000000000000000000";
|
|
53
|
+
readonly pnts: "0x0000000000000000000000000000000000000000";
|
|
54
|
+
};
|
|
55
|
+
readonly 11155111: {
|
|
56
|
+
readonly registry: "0x3F920B25f8b65988359C372F66F036E48adFc556";
|
|
57
|
+
readonly gToken: "0x20a051502a7AE6e40cfFd6EBe59057538E698984";
|
|
58
|
+
readonly staking: "0x3B363598746Ea57314d4869B160940948c569D48";
|
|
59
|
+
readonly sbt: "0x072A0D12f4212B6baD7c6d0A633eaffbDE9105bF";
|
|
60
|
+
readonly reputationSystem: "0x7fEd690E1663755e24a1C9d6164336809d68a578";
|
|
61
|
+
readonly superPaymaster: "0x030025f40d509b1a99547bAEb3795bD27F7182b7";
|
|
62
|
+
readonly paymasterFactory: "0x0Aa06EA5295eeD4D48c93c594Db1CBf3626971A5";
|
|
63
|
+
readonly paymasterV4: "0x1f0D4eF151a79948070D387BaC43b1321F0c41e3";
|
|
64
|
+
readonly paymasterV4Impl: "0x59DCA5861aaDA602fE1BFbfcc36DFAc36C58623d";
|
|
65
|
+
readonly xPNTsFactory: "0xCec3655525a112882E74Fb7C26AcB267a07724cb";
|
|
66
|
+
readonly blsAggregator: "0x15387e161c1b3dAe7c66Fbd5c1F32837B58B2e79";
|
|
67
|
+
readonly blsValidator: "0x0A71C5a32b8CBC517523D2C88b539Ab22AeF0654";
|
|
68
|
+
readonly dvtValidator: "0x19BA9829C784E4A41b68960b9c0bA55f83718997";
|
|
69
|
+
readonly entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
70
|
+
readonly aPNTs: "0x9e66B457E0ABb1F139FD8A596d00f784eBA2873b";
|
|
71
|
+
readonly priceFeed: "0x694AA1769357215DE4FAC081bf1f309aDC325306";
|
|
72
|
+
readonly simpleAccountFactory: "0x91E60e0613810449d098b0b5Ec8b51A0FE8c8985";
|
|
73
|
+
readonly microPaymentChannel: "0x405851A141Cde827E33247d4D4089Af2814c2FF5";
|
|
74
|
+
readonly agentIdentityRegistry: "0x8004A818BFB912233c491871b3d84c89A494BD9e";
|
|
75
|
+
readonly agentReputationRegistry: "0x8004B663056A597Dffe9eCcC1965A193B7388713";
|
|
76
|
+
readonly agentValidationRegistry: "0x8004Cb1BF31DAf7788923b405b754f57acEB4272";
|
|
77
|
+
readonly aaStarBLSAlgorithm: "0xAF525A161CB17e0A1b6254ef0B8d8473bdA05174";
|
|
78
|
+
readonly aaStarValidator: "0xfcDfd17a373E037c3F9C8ffE2c781915E7Ae6e11";
|
|
79
|
+
readonly aaStarBLSAggregator: "0x35775df9a4f4dB42Ea0C46118a12dDd0cEc70609";
|
|
80
|
+
readonly sessionKeyValidator: "0x6810CfB7c72D16e044a17694fAa8076e517264D0";
|
|
81
|
+
readonly forceExitModule: "0x3fDe77868b74a7979A40a2293a1CD265fbe66EEc";
|
|
82
|
+
readonly airAccountDelegate: "0xd2735E54C5f5f2BF523b8a9ddd0E183624c3f2c0";
|
|
83
|
+
readonly calldataParserRegistry: "0x7dEea4544446826601014bD94d0F6432A67496F5";
|
|
84
|
+
readonly airAccountFactoryV7: "0x99C9300d52EDD9f4B7135DEd1811fBa6FFa1DDC6";
|
|
85
|
+
readonly airAccountV7Impl: "0xd51db7eB20FF99c8588281CBe1785681Bb17D473";
|
|
86
|
+
readonly airAccountExtension: "0x5529f50811814E0a4966cFC21200DCeF9C3FCb5B";
|
|
87
|
+
readonly agentRegistry: "0xbcE1163817EEBA2E07d39424427B10937bF1D121";
|
|
88
|
+
readonly policyRegistry: "0x8c2488d46d5447418558c38AA6441720df656094";
|
|
89
|
+
readonly x402Facilitator: "0x326Fc3413c8A0185b0179B971C69813B6dFD971B";
|
|
90
|
+
readonly timelockController: "0xB734df3c0A1809bc06708512363D368Ac51dF1A2";
|
|
91
|
+
readonly pnts: "0xC687f8a115D308ECD39658a8EE33bC3c8F75EE31";
|
|
92
|
+
};
|
|
93
|
+
readonly 11155420: {
|
|
94
|
+
readonly registry: "0xcf6860Ab57de8669756997e414D9c52B6e301972";
|
|
95
|
+
readonly gToken: "0xC341c88453372021d0221834307613c2e99fE718";
|
|
96
|
+
readonly staking: "0x5f57B931C849e8E255F22755506eB2255aB22a7C";
|
|
97
|
+
readonly sbt: "0x2c3Ca1553dC1B8870381E8E56C7b3e3A3ae162f0";
|
|
98
|
+
readonly reputationSystem: "0x891EC0f84D9275839B8dAf74e87B23F2DBd7f9c9";
|
|
99
|
+
readonly superPaymaster: "0x9eC1FE8134A1C05aD34ba2E4e8758dAe0a009B94";
|
|
100
|
+
readonly paymasterFactory: "0x1e3b9d12eAc27867a523d0537902441B0E7D98d8";
|
|
101
|
+
readonly paymasterV4: "0xf250416C940605a1D423ccd059668219cf7D80ea";
|
|
102
|
+
readonly paymasterV4Impl: "0x906123080207F250B1C9F299991512Cb31f35b2f";
|
|
103
|
+
readonly xPNTsFactory: "0x7792a49C9E91e0E9B631B27D885d15e971B7482A";
|
|
104
|
+
readonly blsAggregator: "0x6e06b17b1a4D2D973F7E3e026e24b4393315736c";
|
|
105
|
+
readonly blsValidator: "0x260fa905CcE1f5b29Afe9d627c01fAAE4A66A7F5";
|
|
106
|
+
readonly dvtValidator: "0x0087cA806109E150438116cAA414580BB5fa9195";
|
|
107
|
+
readonly entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
|
|
108
|
+
readonly aPNTs: "0x3BBcA92Ad828b3dD619c980Ba09f929b9d2BC440";
|
|
109
|
+
readonly priceFeed: "0x61Ec26aA57019C486B10502285c5A3D4A4750AD7";
|
|
110
|
+
readonly simpleAccountFactory: "0x91E6060613810449d098b0b5EC8b51A0fe8C8985";
|
|
111
|
+
readonly microPaymentChannel: "0x0000000000000000000000000000000000000000";
|
|
112
|
+
readonly agentIdentityRegistry: "0x0000000000000000000000000000000000000000";
|
|
113
|
+
readonly agentReputationRegistry: "0x0000000000000000000000000000000000000000";
|
|
114
|
+
readonly agentValidationRegistry: "0x0000000000000000000000000000000000000000";
|
|
115
|
+
readonly aaStarBLSAlgorithm: "0x0000000000000000000000000000000000000000";
|
|
116
|
+
readonly aaStarValidator: "0x0000000000000000000000000000000000000000";
|
|
117
|
+
readonly aaStarBLSAggregator: "0x0000000000000000000000000000000000000000";
|
|
118
|
+
readonly sessionKeyValidator: "0x0000000000000000000000000000000000000000";
|
|
119
|
+
readonly forceExitModule: "0x0000000000000000000000000000000000000000";
|
|
120
|
+
readonly airAccountDelegate: "0x0000000000000000000000000000000000000000";
|
|
121
|
+
readonly calldataParserRegistry: "0x0000000000000000000000000000000000000000";
|
|
122
|
+
readonly airAccountFactoryV7: "0x0000000000000000000000000000000000000000";
|
|
123
|
+
readonly airAccountV7Impl: "0x0000000000000000000000000000000000000000";
|
|
124
|
+
readonly airAccountExtension: "0x0000000000000000000000000000000000000000";
|
|
125
|
+
readonly agentRegistry: "0x0000000000000000000000000000000000000000";
|
|
126
|
+
readonly policyRegistry: "0x0000000000000000000000000000000000000000";
|
|
127
|
+
readonly x402Facilitator: "0x0000000000000000000000000000000000000000";
|
|
128
|
+
readonly timelockController: "0x0000000000000000000000000000000000000000";
|
|
129
|
+
readonly pnts: "0x0000000000000000000000000000000000000000";
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
type CanonicalAddresses = (typeof CANONICAL_ADDRESSES)[keyof typeof CANONICAL_ADDRESSES];
|
|
133
|
+
type SupportedChainId = keyof typeof CANONICAL_ADDRESSES;
|
|
134
|
+
/**
|
|
135
|
+
* MushroomDAO launch token-sale stack (aPoints + governance-token sale), keyed by chainId.
|
|
136
|
+
*
|
|
137
|
+
* Kept as a SEPARATE table from {@link CANONICAL_ADDRESSES} on purpose: these are the launch
|
|
138
|
+
* app's own contracts (`MushroomDAO/launch`), not the core SuperPaymaster protocol set, so they
|
|
139
|
+
* stay out of the constants/contract-addresses/drift-check pipeline.
|
|
140
|
+
*
|
|
141
|
+
* De-dup rule: this table stores ONLY the launch-specific contracts (the two sale contracts +
|
|
142
|
+
* BuyHelper) plus the accepted payment stablecoins. It deliberately does NOT store the GToken /
|
|
143
|
+
* aPNTs *payout* token addresses — `TokenSaleClient` reads those on-chain from the sale contract's
|
|
144
|
+
* `gToken()` / `aPNTs()` immutable getters, so there is never a second copy of a token address to
|
|
145
|
+
* drift. (Background: three different GToken deployments currently exist — core canonical
|
|
146
|
+
* `0x20a051…`, the launch live `0x4e6A11…`, and the launch DEPLOYED.md "SuperPaymaster" `0xa592ec…`.
|
|
147
|
+
* The live sale is constructor-bound to `0x4e6A11…`; binding it to the core-canonical GToken is the
|
|
148
|
+
* pre-mainnet reconciliation step.)
|
|
149
|
+
*/
|
|
150
|
+
interface LaunchSaleAddresses {
|
|
151
|
+
/** SaleContractV2 — sells the constructor-bound GToken (governance token). */
|
|
152
|
+
saleGToken: Address;
|
|
153
|
+
/** APNTsSaleContract — sells the constructor-bound aPNTs (aPoints). */
|
|
154
|
+
saleAPNTs: Address;
|
|
155
|
+
/** BuyHelper — gasless entrypoint (EIP-3009 transferWithAuthorization + EIP-712 BuyIntent). */
|
|
156
|
+
buyHelper: Address;
|
|
157
|
+
/** Accepted payment stablecoin: USDC (6-decimal). Also the EIP-3009 token for gasless. */
|
|
158
|
+
usdc: Address;
|
|
159
|
+
/** Accepted payment stablecoin: USDT (6-decimal). Self-pay only. */
|
|
160
|
+
usdt: Address;
|
|
161
|
+
/** Off-chain relayer that submits gasless buys (Cloudflare Worker). */
|
|
162
|
+
relayerUrl: string;
|
|
163
|
+
}
|
|
164
|
+
declare const LAUNCH_SALE_ADDRESSES: Record<number, LaunchSaleAddresses>;
|
|
165
|
+
/** Resolve the launch token-sale address group for a chain, or `undefined` if none. */
|
|
166
|
+
declare function getLaunchSaleAddresses(chainId: number): LaunchSaleAddresses | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Chain IDs that have a canonical address book in {@link CANONICAL_ADDRESSES}.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* listSupportedChainIds(); // [10, 11155111, 11155420]
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
declare function listSupportedChainIds(): number[];
|
|
176
|
+
/** True if {@link CANONICAL_ADDRESSES} has an entry for `chainId`. */
|
|
177
|
+
declare function isSupportedChainId(chainId: number): chainId is SupportedChainId;
|
|
178
|
+
/**
|
|
179
|
+
* Resolve the canonical contract address book for a chain, keyed by `chainId`,
|
|
180
|
+
* normalized to the key names the role-based client factories expect.
|
|
181
|
+
*
|
|
182
|
+
* The canonical table uses `staking` / `sbt`; the historical client factories
|
|
183
|
+
* (and many consumers) reference `gTokenStaking` / `mySBT`. This helper returns
|
|
184
|
+
* the canonical set plus those aliases so a single object satisfies both, which
|
|
185
|
+
* is what makes `createEndUserClient({ chain })` resolve addresses automatically
|
|
186
|
+
* — no manual `addresses` needed for any supported chain.
|
|
187
|
+
*
|
|
188
|
+
* @param chainId - EVM chain id (e.g. 10 = Optimism, 11155111 = Sepolia).
|
|
189
|
+
* @returns The normalized address record, or `undefined` if the chain has no
|
|
190
|
+
* canonical entry (caller must then pass `addresses` explicitly).
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```ts
|
|
194
|
+
* import { optimism } from 'viem/chains';
|
|
195
|
+
* const addrs = getCanonicalAddresses(optimism.id); // chainId 10
|
|
196
|
+
* addrs?.registry; addrs?.mySBT; // alias of `sbt`
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
declare function getCanonicalAddresses(chainId: number): (CanonicalAddresses & {
|
|
200
|
+
gTokenStaking: Address;
|
|
201
|
+
mySBT: Address;
|
|
202
|
+
}) | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* A friendly, human-readable list of the supported chains for error messages —
|
|
205
|
+
* e.g. `"OP Mainnet (10), Sepolia (11155111), OP Sepolia (11155420)"`. Names come
|
|
206
|
+
* from viem/chains so callers recognize them by the same label viem uses.
|
|
207
|
+
*/
|
|
208
|
+
declare function describeSupportedChains(): string;
|
|
209
|
+
|
|
210
|
+
export { CANONICAL_ADDRESSES as C, type LaunchSaleAddresses as L, type SupportedChainId as S, type CanonicalAddresses as a, LAUNCH_SALE_ADDRESSES as b, getCanonicalAddresses as c, describeSupportedChains as d, getLaunchSaleAddresses as g, isSupportedChainId as i, listSupportedChainIds as l };
|
package/dist/admin.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkGASCTLKR_cjs = require('./chunk-GASCTLKR.cjs');
|
|
4
|
+
require('./chunk-KOWTQJIX.cjs');
|
|
5
|
+
require('./chunk-G33MXEHU.cjs');
|
|
6
6
|
require('./chunk-Q7SFCCGT.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "ProtocolGovernance", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkGASCTLKR_cjs.ProtocolGovernance; }
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=admin.cjs.map
|
|
15
15
|
//# sourceMappingURL=admin.cjs.map
|
package/dist/admin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ProtocolGovernance } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { ProtocolGovernance } from './chunk-A4FO6FKN.js';
|
|
2
|
+
import './chunk-6DZCDV4Q.js';
|
|
3
|
+
import './chunk-MBWBHKUE.js';
|
|
4
4
|
import './chunk-PZ5AY32C.js';
|
|
5
5
|
//# sourceMappingURL=admin.js.map
|
|
6
6
|
//# sourceMappingURL=admin.js.map
|