@pushchain/core 6.0.27-alpha.0 → 6.0.27-alpha.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/AGW.md +104 -19
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/src/lib/agentic/agentic.types.d.ts +8 -3
- package/src/lib/agentic/capabilities.d.ts +1 -1
- package/src/lib/agentic/capabilities.js +1 -1
- package/src/lib/agentic/codec/abi-layout.d.ts +5 -0
- package/src/lib/agentic/codec/abi-layout.js +50 -3
- package/src/lib/agentic/codec/defaults.d.ts +2 -2
- package/src/lib/agentic/codec/defaults.js +2 -2
- package/src/lib/agentic/codec/ids.d.ts +1 -1
- package/src/lib/agentic/codec/ids.js +1 -1
- package/src/lib/agentic/codec/native.d.ts +4 -6
- package/src/lib/agentic/codec/native.js +27 -14
- package/src/lib/agentic/codec/pins.d.ts +20 -0
- package/src/lib/agentic/codec/pins.js +29 -0
- package/src/lib/agentic/codec/rules.d.ts +1 -1
- package/src/lib/agentic/codec/rules.js +3 -3
- package/src/lib/agentic/codec/session.d.ts +2 -2
- package/src/lib/agentic/codec/session.js +3 -3
- package/src/lib/agentic/codec/svm-terms.d.ts +1 -1
- package/src/lib/agentic/codec/svm-terms.js +7 -3
- package/src/lib/agentic/codec/universal-terms.d.ts +15 -0
- package/src/lib/agentic/codec/universal-terms.js +2 -0
- package/src/lib/agentic/codec/universal.js +22 -6
- package/src/lib/agentic/constants.d.ts +1 -0
- package/src/lib/agentic/constants.js +1 -0
- package/src/lib/agentic/contracts/abi/{v5 → v6}/agent-validator.js +1 -1
- package/src/lib/agentic/contracts/abi/{v5 → v6}/agw-factory.d.ts +299 -0
- package/src/lib/agentic/contracts/abi/{v5 → v6}/agw-factory.js +393 -2
- package/src/lib/agentic/contracts/abi/{v5 → v6}/agw.d.ts +96 -1
- package/src/lib/agentic/contracts/abi/{v5 → v6}/agw.js +128 -3
- package/src/lib/agentic/contracts/abi/{v5 → v6}/index.d.ts +1 -1
- package/src/lib/agentic/contracts/abi/{v5 → v6}/index.js +3 -3
- package/src/lib/agentic/contracts/abi/{v5 → v6}/smart-session.js +1 -1
- package/src/lib/agentic/contracts/abi/{v5 → v6}/universal-rules-policy.d.ts +329 -308
- package/src/lib/agentic/contracts/abi/{v5 → v6}/universal-rules-policy.js +396 -369
- package/src/lib/agentic/contracts/donut-v6.d.ts +11 -0
- package/src/lib/agentic/contracts/donut-v6.js +15 -0
- package/src/lib/agentic/contracts/{v5.d.ts → v6.d.ts} +800 -384
- package/src/lib/agentic/contracts/{v5.js → v6.js} +60 -33
- package/src/lib/agentic/deployments.d.ts +5 -5
- package/src/lib/agentic/deployments.js +19 -19
- package/src/lib/agentic/errors.d.ts +1 -7
- package/src/lib/agentic/errors.js +1 -9
- package/src/lib/agentic/execution/outbound.d.ts +4 -4
- package/src/lib/agentic/execution/outbound.js +5 -5
- package/src/lib/agentic/execution/send.js +3 -11
- package/src/lib/agentic/execution/svm-outbound.d.ts +1 -1
- package/src/lib/agentic/execution/svm-payload.js +1 -1
- package/src/lib/agentic/execution/svm-public.js +1 -7
- package/src/lib/agentic/execution/svm-send.d.ts +1 -1
- package/src/lib/agentic/execution/svm-send.js +0 -3
- package/src/lib/agentic/index.d.ts +2 -2
- package/src/lib/agentic/management/common.js +7 -5
- package/src/lib/agentic/management/create.d.ts +1 -13
- package/src/lib/agentic/management/create.js +24 -157
- package/src/lib/agentic/management/svm.js +2 -2
- package/src/lib/agentic/presets/aave-reserves.d.ts +4 -0
- package/src/lib/agentic/presets/aave-reserves.js +147 -0
- package/src/lib/agentic/presets/catalog.d.ts +30 -3
- package/src/lib/agentic/presets/catalog.js +344 -3
- package/src/lib/agentic/presets/index.js +186 -22
- package/src/lib/agentic/presets/operation-limits.d.ts +13 -0
- package/src/lib/agentic/presets/operation-limits.js +111 -0
- package/src/lib/agentic/presets/types.d.ts +44 -9
- package/src/lib/agentic/public-rule.d.ts +2 -2
- package/src/lib/agentic/public-rule.js +24 -40
- package/src/lib/agentic/reads/rules.js +27 -11
- package/src/lib/agentic/reads/svm.d.ts +1 -1
- package/src/lib/agentic/reads/svm.js +2 -2
- package/src/lib/agentic/response.js +7 -7
- package/src/lib/agentic/revert.js +5 -5
- package/src/lib/agentic/runtime.js +12 -3
- package/src/lib/agentic/utils.js +1 -1
- package/src/lib/constants/index.d.ts +1 -0
- package/src/lib/index.d.ts +2 -2
- package/src/lib/push-chain/push-chain.d.ts +1 -0
- package/src/lib/agentic/contracts/donut-v5.d.ts +0 -11
- package/src/lib/agentic/contracts/donut-v5.js +0 -15
- /package/src/lib/agentic/contracts/abi/{v5 → v6}/agent-validator.d.ts +0 -0
- /package/src/lib/agentic/contracts/abi/{v5 → v6}/smart-session.d.ts +0 -0
|
@@ -12,7 +12,7 @@ const native_1 = require("./native");
|
|
|
12
12
|
const session_1 = require("./session");
|
|
13
13
|
const universal_1 = require("./universal");
|
|
14
14
|
const svm_terms_1 = require("./svm-terms");
|
|
15
|
-
const
|
|
15
|
+
const v6_1 = require("../contracts/v6");
|
|
16
16
|
function isSolanaRule(rule) {
|
|
17
17
|
return (typeof rule.chainNamespace === 'string' &&
|
|
18
18
|
rule.chainNamespace.startsWith('solana:'));
|
|
@@ -27,7 +27,7 @@ function ruleChain(rule, pushChainNamespace) {
|
|
|
27
27
|
function chainHash(chainNamespace) {
|
|
28
28
|
return (0, viem_1.keccak256)((0, viem_1.toBytes)(chainNamespace));
|
|
29
29
|
}
|
|
30
|
-
/** Validate before signing.
|
|
30
|
+
/** Validate before signing. V6 permits several grants for the same agent/chain. */
|
|
31
31
|
function prepareRules(rules, ctx) {
|
|
32
32
|
if (!Array.isArray(rules)) {
|
|
33
33
|
throw new errors_1.AgenticError(errors_1.AGENTIC_ERROR_CODE.INVALID_RULE, 'rules must be an array');
|
|
@@ -69,7 +69,7 @@ function prepareRules(rules, ctx) {
|
|
|
69
69
|
actions: [
|
|
70
70
|
{
|
|
71
71
|
target: ctx.gateway,
|
|
72
|
-
selector:
|
|
72
|
+
selector: v6_1.SEND_OUTBOUND_SELECTOR,
|
|
73
73
|
initData: (0, session_1.encodeEnvelope)(chainNamespace, (0, svm_terms_1.encodeSvmTerms)(terms, ctx.nowSeconds)),
|
|
74
74
|
},
|
|
75
75
|
],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AbiParameter, type Address, type Hex } from 'viem';
|
|
2
2
|
/**
|
|
3
3
|
* The smartsessions `Session` a grant carries (DataTypes.sol:56-86, pinned
|
|
4
|
-
*
|
|
4
|
+
* v6). The wallet overwrites `salt` with its grant nonce, so the value
|
|
5
5
|
* sent is irrelevant; it is always zero here.
|
|
6
6
|
*/
|
|
7
7
|
export interface SessionWire {
|
|
@@ -34,7 +34,7 @@ export interface SessionWire {
|
|
|
34
34
|
}
|
|
35
35
|
export declare const SESSION_PARAM: AbiParameter;
|
|
36
36
|
export declare const ENVELOPE_VERSION = 1;
|
|
37
|
-
/**
|
|
37
|
+
/** V6 URP envelope: abi.encode(uint16(1), string chainNamespace, bytes body). */
|
|
38
38
|
export declare function encodeEnvelope(chainNamespace: string, body: Hex): Hex;
|
|
39
39
|
export declare function decodeEnvelope(initData: Hex): {
|
|
40
40
|
chainNamespace: string;
|
|
@@ -7,16 +7,16 @@ exports.buildSession = buildSession;
|
|
|
7
7
|
exports.encodeSession = encodeSession;
|
|
8
8
|
exports.decodeSession = decodeSession;
|
|
9
9
|
const viem_1 = require("viem");
|
|
10
|
-
const
|
|
10
|
+
const v6_1 = require("../contracts/abi/v6");
|
|
11
11
|
const ids_1 = require("./ids");
|
|
12
12
|
const errors_1 = require("../errors");
|
|
13
13
|
exports.SESSION_PARAM = (0, viem_1.getAbiItem)({
|
|
14
|
-
abi:
|
|
14
|
+
abi: v6_1.AGW_ABI,
|
|
15
15
|
name: 'grantRules',
|
|
16
16
|
}).inputs[0];
|
|
17
17
|
const ZERO_SALT = `0x${'00'.repeat(32)}`;
|
|
18
18
|
exports.ENVELOPE_VERSION = 1;
|
|
19
|
-
/**
|
|
19
|
+
/** V6 URP envelope: abi.encode(uint16(1), string chainNamespace, bytes body). */
|
|
20
20
|
function encodeEnvelope(chainNamespace, body) {
|
|
21
21
|
return (0, viem_1.encodeAbiParameters)([{ type: 'uint16' }, { type: 'string' }, { type: 'bytes' }], [exports.ENVELOPE_VERSION, chainNamespace, body]);
|
|
22
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Internal
|
|
1
|
+
/** Internal v6 SVM wire representation; not a proposed public Rule API. */
|
|
2
2
|
import { type Hex } from 'viem';
|
|
3
3
|
import { AgenticError } from '../errors';
|
|
4
4
|
import type { AssetCapWire } from './universal-terms';
|
|
@@ -7,7 +7,7 @@ exports.isForbiddenSvmProgram = isForbiddenSvmProgram;
|
|
|
7
7
|
exports.validateSvmTerms = validateSvmTerms;
|
|
8
8
|
exports.encodeSvmTerms = encodeSvmTerms;
|
|
9
9
|
exports.decodeSvmTerms = decodeSvmTerms;
|
|
10
|
-
/** Internal
|
|
10
|
+
/** Internal v6 SVM wire representation; not a proposed public Rule API. */
|
|
11
11
|
const viem_1 = require("viem");
|
|
12
12
|
const errors_1 = require("../errors");
|
|
13
13
|
const defaults_1 = require("./defaults");
|
|
@@ -149,7 +149,11 @@ function validateSvmTerms(t, nowSeconds) {
|
|
|
149
149
|
if (typeof r.dataless !== 'boolean')
|
|
150
150
|
throw svmInvalid('dataless must be boolean');
|
|
151
151
|
integer(r.discriminatorLen, 8, 'discriminatorLen');
|
|
152
|
-
|
|
152
|
+
if (r.maxAccounts !== 255) {
|
|
153
|
+
integer(r.maxAccounts, exports.SVM_LIMITS.accounts, 'maxAccounts');
|
|
154
|
+
if (r.maxAccounts === 0)
|
|
155
|
+
throw svmInvalid('maxAccounts must be 1..64 or 255');
|
|
156
|
+
}
|
|
153
157
|
if (r.dataless !== (r.discriminatorLen === 0))
|
|
154
158
|
throw svmInvalid('dataless and discriminator length disagree');
|
|
155
159
|
if (isForbiddenSvmProgram(r.program, t))
|
|
@@ -177,7 +181,7 @@ function validateSvmTerms(t, nowSeconds) {
|
|
|
177
181
|
integer(p.accountIndex, exports.SVM_LIMITS.accounts - 1, 'accountIndex');
|
|
178
182
|
exactHex(p.expected, 32, 'pin expected');
|
|
179
183
|
const count = t.programs[p.ruleIndex].maxAccounts;
|
|
180
|
-
if (count && p.accountIndex >= count)
|
|
184
|
+
if (count !== 255 && p.accountIndex >= count)
|
|
181
185
|
throw svmInvalid('pin outside fixed account count');
|
|
182
186
|
const key = `${p.ruleIndex}:${p.accountIndex}`;
|
|
183
187
|
if (positions.has(key))
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ArgPinWire } from './pins';
|
|
1
2
|
import { type Address, type Hex } from 'viem';
|
|
2
3
|
export interface AssetCapWire {
|
|
3
4
|
token: Address;
|
|
@@ -5,6 +6,7 @@ export interface AssetCapWire {
|
|
|
5
6
|
maxTotal: bigint;
|
|
6
7
|
}
|
|
7
8
|
export interface AllowedCallWire {
|
|
9
|
+
pins: readonly ArgPinWire[];
|
|
8
10
|
target: Address;
|
|
9
11
|
selector: Hex;
|
|
10
12
|
beneficiaryOffset: number;
|
|
@@ -60,6 +62,19 @@ export declare const UNIVERSAL_TERMS_PARAM: {
|
|
|
60
62
|
}, {
|
|
61
63
|
readonly name: "maxValue";
|
|
62
64
|
readonly type: "uint256";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "pins";
|
|
67
|
+
readonly type: "tuple[]";
|
|
68
|
+
readonly components: readonly [{
|
|
69
|
+
readonly name: "offset";
|
|
70
|
+
readonly type: "uint16";
|
|
71
|
+
}, {
|
|
72
|
+
readonly name: "op";
|
|
73
|
+
readonly type: "uint8";
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "value";
|
|
76
|
+
readonly type: "bytes32";
|
|
77
|
+
}];
|
|
63
78
|
}];
|
|
64
79
|
}];
|
|
65
80
|
};
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UNIVERSAL_TERMS_PARAM = void 0;
|
|
4
4
|
exports.encodeUniversalTerms = encodeUniversalTerms;
|
|
5
5
|
exports.decodeUniversalTerms = decodeUniversalTerms;
|
|
6
|
+
const pins_1 = require("./pins");
|
|
6
7
|
const viem_1 = require("viem");
|
|
7
8
|
exports.UNIVERSAL_TERMS_PARAM = {
|
|
8
9
|
type: 'tuple',
|
|
@@ -28,6 +29,7 @@ exports.UNIVERSAL_TERMS_PARAM = {
|
|
|
28
29
|
{ name: 'beneficiaryOffset', type: 'uint16' },
|
|
29
30
|
{ name: 'hasBeneficiary', type: 'bool' },
|
|
30
31
|
{ name: 'maxValue', type: 'uint256' },
|
|
32
|
+
{ name: 'pins', type: 'tuple[]', components: pins_1.ARG_PIN_COMPONENTS },
|
|
31
33
|
],
|
|
32
34
|
},
|
|
33
35
|
],
|
|
@@ -4,6 +4,7 @@ exports.MAX_ALLOWED_CALLS = exports.MAX_ASSETS = void 0;
|
|
|
4
4
|
exports.validateUniversalRuleShape = validateUniversalRuleShape;
|
|
5
5
|
exports.encodeUniversalRule = encodeUniversalRule;
|
|
6
6
|
exports.universalTermsToRule = universalTermsToRule;
|
|
7
|
+
const pins_1 = require("./pins");
|
|
7
8
|
const viem_1 = require("viem");
|
|
8
9
|
const capabilities_1 = require("../capabilities");
|
|
9
10
|
const errors_1 = require("../errors");
|
|
@@ -11,7 +12,7 @@ const abi_layout_1 = require("./abi-layout");
|
|
|
11
12
|
const selectors_1 = require("./selectors");
|
|
12
13
|
const defaults_1 = require("./defaults");
|
|
13
14
|
const session_1 = require("./session");
|
|
14
|
-
const
|
|
15
|
+
const v6_1 = require("../contracts/v6");
|
|
15
16
|
const universal_terms_1 = require("./universal-terms");
|
|
16
17
|
exports.MAX_ASSETS = 8;
|
|
17
18
|
exports.MAX_ALLOWED_CALLS = 32;
|
|
@@ -38,7 +39,8 @@ function validateUniversalRuleShape(rule, nowSeconds) {
|
|
|
38
39
|
rule.allowedCalls.length < 1 ||
|
|
39
40
|
rule.allowedCalls.length > exports.MAX_ALLOWED_CALLS)
|
|
40
41
|
throw invalid(`allowedCalls must contain 1..${exports.MAX_ALLOWED_CALLS} entries`);
|
|
41
|
-
const seen = new
|
|
42
|
+
const seen = new Map();
|
|
43
|
+
let pinCount = 0;
|
|
42
44
|
rule.allowedCalls.forEach((call, i) => {
|
|
43
45
|
if (!(0, viem_1.isAddress)(call.target, { strict: false }))
|
|
44
46
|
throw invalid(`allowedCalls[${i}].target is not an EVM address`);
|
|
@@ -55,10 +57,22 @@ function validateUniversalRuleShape(rule, nowSeconds) {
|
|
|
55
57
|
if (call.beneficiaryOffset !== undefined)
|
|
56
58
|
(0, abi_layout_1.rawOffset)(call.beneficiaryOffset, `allowedCalls[${i}].beneficiary`);
|
|
57
59
|
cap(call.maxValue ?? defaults_1.AGENTIC_DEFAULTS.universal.allowedCallMaxValue.value, `allowedCalls[${i}].maxValue`);
|
|
60
|
+
try {
|
|
61
|
+
(0, pins_1.validatePins)(call.pins ?? []);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
throw invalid(error.message);
|
|
65
|
+
}
|
|
66
|
+
pinCount += call.pins?.length ?? 0;
|
|
67
|
+
if (pinCount > 32)
|
|
68
|
+
throw invalid('at most 32 pins across all allowed calls');
|
|
58
69
|
const key = `${call.target.toLowerCase()}:${parsed.selector}`;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
const restricted = !!call.pins?.length ||
|
|
71
|
+
call.beneficiary !== undefined ||
|
|
72
|
+
call.beneficiaryOffset !== undefined;
|
|
73
|
+
if (seen.has(key) && (!restricted || !seen.get(key)))
|
|
74
|
+
throw invalid('an unpinned alternative would bypass restrictions for this target/selector');
|
|
75
|
+
seen.set(key, restricted);
|
|
62
76
|
});
|
|
63
77
|
const tokens = new Set();
|
|
64
78
|
rule.assets.forEach((a, i) => {
|
|
@@ -97,6 +111,7 @@ function encodeUniversalRule(rule, ctx) {
|
|
|
97
111
|
assets: resolved.assets,
|
|
98
112
|
maxGasPerCall: rule.maxGasPerCall,
|
|
99
113
|
allowedCalls: rule.allowedCalls.map((call) => ({
|
|
114
|
+
pins: call.pins ?? [],
|
|
100
115
|
target: (0, viem_1.getAddress)(call.target),
|
|
101
116
|
selector: (0, selectors_1.parseSelector)(call.selector).selector,
|
|
102
117
|
hasBeneficiary: call.beneficiary !== undefined || call.beneficiaryOffset !== undefined,
|
|
@@ -120,7 +135,7 @@ function encodeUniversalRule(rule, ctx) {
|
|
|
120
135
|
actions: [
|
|
121
136
|
{
|
|
122
137
|
target: ctx.gateway,
|
|
123
|
-
selector:
|
|
138
|
+
selector: v6_1.SEND_OUTBOUND_SELECTOR,
|
|
124
139
|
initData: (0, session_1.encodeEnvelope)(rule.chainNamespace, (0, universal_terms_1.encodeUniversalTerms)(terms)),
|
|
125
140
|
},
|
|
126
141
|
],
|
|
@@ -142,6 +157,7 @@ function universalTermsToRule(terms, agent, chainNamespace, tokens) {
|
|
|
142
157
|
maxTotal: a.maxTotal,
|
|
143
158
|
})),
|
|
144
159
|
allowedCalls: terms.allowedCalls.map((c) => ({
|
|
160
|
+
pins: [...c.pins],
|
|
145
161
|
target: c.target,
|
|
146
162
|
selector: c.selector,
|
|
147
163
|
maxValue: c.maxValue,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AGENT_VALIDATOR_ABI = void 0;
|
|
4
4
|
// GENERATED by packages/core/scripts/agw-local/gen-abi.mjs — do not edit.
|
|
5
5
|
// Source: packages/core/scripts/agw-local/abis/validator.json
|
|
6
|
-
// push-agentic-wallets@
|
|
6
|
+
// push-agentic-wallets@ffd567d3e49b2d27c6f50ad36093274dbac3090f
|
|
7
7
|
// sha256(AgentValidator.json) = a4570ddc373241580de8742cbb3d9f2c837094c65bfd1cdd52243ca0c38196fd
|
|
8
8
|
exports.AGENT_VALIDATOR_ABI = [
|
|
9
9
|
{
|
|
@@ -70,6 +70,281 @@ export declare const AGW_FACTORY_ABI: readonly [{
|
|
|
70
70
|
}];
|
|
71
71
|
readonly outputs: readonly [];
|
|
72
72
|
readonly stateMutability: "nonpayable";
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "function";
|
|
75
|
+
readonly name: "createWallet";
|
|
76
|
+
readonly inputs: readonly [{
|
|
77
|
+
readonly name: "label";
|
|
78
|
+
readonly type: "string";
|
|
79
|
+
readonly internalType: "string";
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "rules";
|
|
82
|
+
readonly type: "tuple[]";
|
|
83
|
+
readonly internalType: "struct Session[]";
|
|
84
|
+
readonly components: readonly [{
|
|
85
|
+
readonly name: "sessionValidator";
|
|
86
|
+
readonly type: "address";
|
|
87
|
+
readonly internalType: "contract ISessionValidator";
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "sessionValidatorInitData";
|
|
90
|
+
readonly type: "bytes";
|
|
91
|
+
readonly internalType: "bytes";
|
|
92
|
+
}, {
|
|
93
|
+
readonly name: "salt";
|
|
94
|
+
readonly type: "bytes32";
|
|
95
|
+
readonly internalType: "bytes32";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "userOpPolicies";
|
|
98
|
+
readonly type: "tuple[]";
|
|
99
|
+
readonly internalType: "struct PolicyData[]";
|
|
100
|
+
readonly components: readonly [{
|
|
101
|
+
readonly name: "policy";
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
readonly internalType: "address";
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "initData";
|
|
106
|
+
readonly type: "bytes";
|
|
107
|
+
readonly internalType: "bytes";
|
|
108
|
+
}];
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "erc7739Policies";
|
|
111
|
+
readonly type: "tuple";
|
|
112
|
+
readonly internalType: "struct ERC7739Data";
|
|
113
|
+
readonly components: readonly [{
|
|
114
|
+
readonly name: "allowedERC7739Content";
|
|
115
|
+
readonly type: "tuple[]";
|
|
116
|
+
readonly internalType: "struct ERC7739Context[]";
|
|
117
|
+
readonly components: readonly [{
|
|
118
|
+
readonly name: "appDomainSeparator";
|
|
119
|
+
readonly type: "bytes32";
|
|
120
|
+
readonly internalType: "bytes32";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "contentNames";
|
|
123
|
+
readonly type: "string[]";
|
|
124
|
+
readonly internalType: "string[]";
|
|
125
|
+
}];
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "erc1271Policies";
|
|
128
|
+
readonly type: "tuple[]";
|
|
129
|
+
readonly internalType: "struct PolicyData[]";
|
|
130
|
+
readonly components: readonly [{
|
|
131
|
+
readonly name: "policy";
|
|
132
|
+
readonly type: "address";
|
|
133
|
+
readonly internalType: "address";
|
|
134
|
+
}, {
|
|
135
|
+
readonly name: "initData";
|
|
136
|
+
readonly type: "bytes";
|
|
137
|
+
readonly internalType: "bytes";
|
|
138
|
+
}];
|
|
139
|
+
}];
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "actions";
|
|
142
|
+
readonly type: "tuple[]";
|
|
143
|
+
readonly internalType: "struct ActionData[]";
|
|
144
|
+
readonly components: readonly [{
|
|
145
|
+
readonly name: "actionTargetSelector";
|
|
146
|
+
readonly type: "bytes4";
|
|
147
|
+
readonly internalType: "bytes4";
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "actionTarget";
|
|
150
|
+
readonly type: "address";
|
|
151
|
+
readonly internalType: "address";
|
|
152
|
+
}, {
|
|
153
|
+
readonly name: "actionPolicies";
|
|
154
|
+
readonly type: "tuple[]";
|
|
155
|
+
readonly internalType: "struct PolicyData[]";
|
|
156
|
+
readonly components: readonly [{
|
|
157
|
+
readonly name: "policy";
|
|
158
|
+
readonly type: "address";
|
|
159
|
+
readonly internalType: "address";
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "initData";
|
|
162
|
+
readonly type: "bytes";
|
|
163
|
+
readonly internalType: "bytes";
|
|
164
|
+
}];
|
|
165
|
+
}];
|
|
166
|
+
}, {
|
|
167
|
+
readonly name: "permitERC4337Paymaster";
|
|
168
|
+
readonly type: "bool";
|
|
169
|
+
readonly internalType: "bool";
|
|
170
|
+
}];
|
|
171
|
+
}];
|
|
172
|
+
readonly outputs: readonly [{
|
|
173
|
+
readonly name: "wallet";
|
|
174
|
+
readonly type: "address";
|
|
175
|
+
readonly internalType: "address";
|
|
176
|
+
}, {
|
|
177
|
+
readonly name: "rulesIds";
|
|
178
|
+
readonly type: "bytes32[]";
|
|
179
|
+
readonly internalType: "bytes32[]";
|
|
180
|
+
}];
|
|
181
|
+
readonly stateMutability: "nonpayable";
|
|
182
|
+
}, {
|
|
183
|
+
readonly type: "function";
|
|
184
|
+
readonly name: "createWalletWithSig";
|
|
185
|
+
readonly inputs: readonly [{
|
|
186
|
+
readonly name: "intent";
|
|
187
|
+
readonly type: "tuple";
|
|
188
|
+
readonly internalType: "struct OwnerIntent";
|
|
189
|
+
readonly components: readonly [{
|
|
190
|
+
readonly name: "owner";
|
|
191
|
+
readonly type: "address";
|
|
192
|
+
readonly internalType: "address";
|
|
193
|
+
}, {
|
|
194
|
+
readonly name: "wallet";
|
|
195
|
+
readonly type: "address";
|
|
196
|
+
readonly internalType: "address";
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "executor";
|
|
199
|
+
readonly type: "address";
|
|
200
|
+
readonly internalType: "address";
|
|
201
|
+
}, {
|
|
202
|
+
readonly name: "index";
|
|
203
|
+
readonly type: "uint96";
|
|
204
|
+
readonly internalType: "uint96";
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "sessionHash";
|
|
207
|
+
readonly type: "bytes32";
|
|
208
|
+
readonly internalType: "bytes32";
|
|
209
|
+
}, {
|
|
210
|
+
readonly name: "mode";
|
|
211
|
+
readonly type: "bytes32";
|
|
212
|
+
readonly internalType: "bytes32";
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "execCalldataHash";
|
|
215
|
+
readonly type: "bytes32";
|
|
216
|
+
readonly internalType: "bytes32";
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "nonceKey";
|
|
219
|
+
readonly type: "uint192";
|
|
220
|
+
readonly internalType: "uint192";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "nonceSeq";
|
|
223
|
+
readonly type: "uint64";
|
|
224
|
+
readonly internalType: "uint64";
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "grantNonce";
|
|
227
|
+
readonly type: "uint64";
|
|
228
|
+
readonly internalType: "uint64";
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "deadline";
|
|
231
|
+
readonly type: "uint48";
|
|
232
|
+
readonly internalType: "uint48";
|
|
233
|
+
}, {
|
|
234
|
+
readonly name: "signerChainId";
|
|
235
|
+
readonly type: "uint256";
|
|
236
|
+
readonly internalType: "uint256";
|
|
237
|
+
}];
|
|
238
|
+
}, {
|
|
239
|
+
readonly name: "sig";
|
|
240
|
+
readonly type: "bytes";
|
|
241
|
+
readonly internalType: "bytes";
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "label";
|
|
244
|
+
readonly type: "string";
|
|
245
|
+
readonly internalType: "string";
|
|
246
|
+
}, {
|
|
247
|
+
readonly name: "rules";
|
|
248
|
+
readonly type: "tuple[]";
|
|
249
|
+
readonly internalType: "struct Session[]";
|
|
250
|
+
readonly components: readonly [{
|
|
251
|
+
readonly name: "sessionValidator";
|
|
252
|
+
readonly type: "address";
|
|
253
|
+
readonly internalType: "contract ISessionValidator";
|
|
254
|
+
}, {
|
|
255
|
+
readonly name: "sessionValidatorInitData";
|
|
256
|
+
readonly type: "bytes";
|
|
257
|
+
readonly internalType: "bytes";
|
|
258
|
+
}, {
|
|
259
|
+
readonly name: "salt";
|
|
260
|
+
readonly type: "bytes32";
|
|
261
|
+
readonly internalType: "bytes32";
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "userOpPolicies";
|
|
264
|
+
readonly type: "tuple[]";
|
|
265
|
+
readonly internalType: "struct PolicyData[]";
|
|
266
|
+
readonly components: readonly [{
|
|
267
|
+
readonly name: "policy";
|
|
268
|
+
readonly type: "address";
|
|
269
|
+
readonly internalType: "address";
|
|
270
|
+
}, {
|
|
271
|
+
readonly name: "initData";
|
|
272
|
+
readonly type: "bytes";
|
|
273
|
+
readonly internalType: "bytes";
|
|
274
|
+
}];
|
|
275
|
+
}, {
|
|
276
|
+
readonly name: "erc7739Policies";
|
|
277
|
+
readonly type: "tuple";
|
|
278
|
+
readonly internalType: "struct ERC7739Data";
|
|
279
|
+
readonly components: readonly [{
|
|
280
|
+
readonly name: "allowedERC7739Content";
|
|
281
|
+
readonly type: "tuple[]";
|
|
282
|
+
readonly internalType: "struct ERC7739Context[]";
|
|
283
|
+
readonly components: readonly [{
|
|
284
|
+
readonly name: "appDomainSeparator";
|
|
285
|
+
readonly type: "bytes32";
|
|
286
|
+
readonly internalType: "bytes32";
|
|
287
|
+
}, {
|
|
288
|
+
readonly name: "contentNames";
|
|
289
|
+
readonly type: "string[]";
|
|
290
|
+
readonly internalType: "string[]";
|
|
291
|
+
}];
|
|
292
|
+
}, {
|
|
293
|
+
readonly name: "erc1271Policies";
|
|
294
|
+
readonly type: "tuple[]";
|
|
295
|
+
readonly internalType: "struct PolicyData[]";
|
|
296
|
+
readonly components: readonly [{
|
|
297
|
+
readonly name: "policy";
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
readonly internalType: "address";
|
|
300
|
+
}, {
|
|
301
|
+
readonly name: "initData";
|
|
302
|
+
readonly type: "bytes";
|
|
303
|
+
readonly internalType: "bytes";
|
|
304
|
+
}];
|
|
305
|
+
}];
|
|
306
|
+
}, {
|
|
307
|
+
readonly name: "actions";
|
|
308
|
+
readonly type: "tuple[]";
|
|
309
|
+
readonly internalType: "struct ActionData[]";
|
|
310
|
+
readonly components: readonly [{
|
|
311
|
+
readonly name: "actionTargetSelector";
|
|
312
|
+
readonly type: "bytes4";
|
|
313
|
+
readonly internalType: "bytes4";
|
|
314
|
+
}, {
|
|
315
|
+
readonly name: "actionTarget";
|
|
316
|
+
readonly type: "address";
|
|
317
|
+
readonly internalType: "address";
|
|
318
|
+
}, {
|
|
319
|
+
readonly name: "actionPolicies";
|
|
320
|
+
readonly type: "tuple[]";
|
|
321
|
+
readonly internalType: "struct PolicyData[]";
|
|
322
|
+
readonly components: readonly [{
|
|
323
|
+
readonly name: "policy";
|
|
324
|
+
readonly type: "address";
|
|
325
|
+
readonly internalType: "address";
|
|
326
|
+
}, {
|
|
327
|
+
readonly name: "initData";
|
|
328
|
+
readonly type: "bytes";
|
|
329
|
+
readonly internalType: "bytes";
|
|
330
|
+
}];
|
|
331
|
+
}];
|
|
332
|
+
}, {
|
|
333
|
+
readonly name: "permitERC4337Paymaster";
|
|
334
|
+
readonly type: "bool";
|
|
335
|
+
readonly internalType: "bool";
|
|
336
|
+
}];
|
|
337
|
+
}];
|
|
338
|
+
readonly outputs: readonly [{
|
|
339
|
+
readonly name: "wallet";
|
|
340
|
+
readonly type: "address";
|
|
341
|
+
readonly internalType: "address";
|
|
342
|
+
}, {
|
|
343
|
+
readonly name: "rulesIds";
|
|
344
|
+
readonly type: "bytes32[]";
|
|
345
|
+
readonly internalType: "bytes32[]";
|
|
346
|
+
}];
|
|
347
|
+
readonly stateMutability: "nonpayable";
|
|
73
348
|
}, {
|
|
74
349
|
readonly type: "function";
|
|
75
350
|
readonly name: "defaultAdmin";
|
|
@@ -776,6 +1051,22 @@ export declare const AGW_FACTORY_ABI: readonly [{
|
|
|
776
1051
|
readonly type: "uint256";
|
|
777
1052
|
readonly internalType: "uint256";
|
|
778
1053
|
}];
|
|
1054
|
+
}, {
|
|
1055
|
+
readonly type: "error";
|
|
1056
|
+
readonly name: "IntentGrantNonceNotZero";
|
|
1057
|
+
readonly inputs: readonly [{
|
|
1058
|
+
readonly name: "provided";
|
|
1059
|
+
readonly type: "uint64";
|
|
1060
|
+
readonly internalType: "uint64";
|
|
1061
|
+
}];
|
|
1062
|
+
}, {
|
|
1063
|
+
readonly type: "error";
|
|
1064
|
+
readonly name: "IntentRulesMismatch";
|
|
1065
|
+
readonly inputs: readonly [{
|
|
1066
|
+
readonly name: "actual";
|
|
1067
|
+
readonly type: "bytes32";
|
|
1068
|
+
readonly internalType: "bytes32";
|
|
1069
|
+
}];
|
|
779
1070
|
}, {
|
|
780
1071
|
readonly type: "error";
|
|
781
1072
|
readonly name: "IntentWalletMismatch";
|
|
@@ -828,6 +1119,14 @@ export declare const AGW_FACTORY_ABI: readonly [{
|
|
|
828
1119
|
readonly type: "uint48";
|
|
829
1120
|
readonly internalType: "uint48";
|
|
830
1121
|
}];
|
|
1122
|
+
}, {
|
|
1123
|
+
readonly type: "error";
|
|
1124
|
+
readonly name: "TooManyInitialRules";
|
|
1125
|
+
readonly inputs: readonly [{
|
|
1126
|
+
readonly name: "count";
|
|
1127
|
+
readonly type: "uint256";
|
|
1128
|
+
readonly internalType: "uint256";
|
|
1129
|
+
}];
|
|
831
1130
|
}, {
|
|
832
1131
|
readonly type: "error";
|
|
833
1132
|
readonly name: "UUPSUnauthorizedCallContext";
|