$blocks CID -> raw block bytes */ public function genesisCommit( string $did, string $commitCid, string $rev, array $blocks, DateTimeImmutable $time, ): string { $car = $this->cars->write([$commitCid], $blocks); return $this->cbor->encode([ 'rebase' => false, 'tooBig' => false, 'repo' => $did, 'commit' => new CidLink($commitCid), 'prev' => null, 'rev' => $rev, 'since' => null, 'blocks' => new CborBytes($car), 'ops' => [], 'blobs' => [], 'time' => $time->format('Y-m-d\TH:i:s.v\Z'), ]); } public function identity(string $did, string $handle, DateTimeImmutable $time): string { return $this->cbor->encode([ 'did' => $did, 'time' => $time->format('Y-m-d\TH:i:s.v\Z'), 'handle' => $handle, ]); } public function account( string $did, bool $active, DateTimeImmutable $time, ?string $status = null, ): string { $payload = [ 'did' => $did, 'time' => $time->format('Y-m-d\TH:i:s.v\Z'), 'active' => $active, ]; if ($status !== null) { $payload['status'] = $status; } return $this->cbor->encode($payload); } }