/** * pop paymaster register — register an org with the PaymasterHub. * * Gate — VERIFIED against contracts origin/main src/PaymasterHub.sol: * registerOrg / registerAndConfigureOrg are registrar-gated (_onlyRegistrar: * msg.sender must be the PoaManager CONTRACT or the orgRegistrar, i.e. the * OrgDeployer). No EOA can ever call them directly. The two real paths are: * * 1. Org deploy time — OrgDeployer calls registerAndConfigureOrg when * `pop org deploy` is run with a paymaster config block (the normal path). * 2. After the fact — the PoaManager OWNER routes the call through * PoaManager.adminCall(target, data) (verified onlyOwner passthrough * whose doc comment names PaymasterHub explicitly). * * So this command: if the signer IS the PoaManager owner it sends the * adminCall directly; otherwise it prints the exact target + calldata (both * raw and adminCall-wrapped) for the registrar owner to execute. adminCall is * NOT payable, so --deposit always executes as a separate, permissionless * depositForOrg transaction after registration. */ import type { Argv, ArgumentsCamelCase } from 'yargs'; import { ethers } from 'ethers'; interface RegisterArgs { org: string; 'admin-hat': string; 'operator-hat'?: string; config?: string; deposit?: string; chain?: number; rpc?: string; 'private-key'?: string; 'dry-run'?: boolean; yes?: boolean; preflight?: boolean; } interface ConfigFile { operatorHatId?: string | number; maxFeePerGas?: string | number; maxPriorityFeePerGas?: string | number; maxCallGas?: number; maxVerificationGas?: number; maxPreVerificationGas?: number; rules?: Array<{ target: string; selector: string; allowed: boolean; maxCallGasHint?: number; }>; budgets?: Array<{ subjectKey?: string; hatId?: string | number; capPerEpoch: string | number; epochLen: number; }>; } /** * Build the registerOrg / registerAndConfigureOrg calldata from flags + the * optional --config JSON (gwei fee caps + ether budget caps, matching the * `pop org deploy` paymaster block conventions). */ export declare function buildRegisterCalldata(orgId: string, adminHatId: ethers.BigNumber, operatorHatId: ethers.BigNumber, config?: ConfigFile): { method: string; data: string; }; export declare const registerHandler: { builder: (yargs: Argv) => Argv<{ "admin-hat": string; } & { "operator-hat": string | undefined; } & { config: string | undefined; } & { deposit: string | undefined; }>; handler: (argv: ArgumentsCamelCase) => Promise; }; export {};