astrXbian/www/multitube/vendor/ipfs/php-client/src/Api/Dag.php

72 lines
1.7 KiB
PHP

<?php
declare(strict_types=1);
/*
* This file is part of the "php-ipfs" package.
*
* (c) Robert Schönthal <robert.schoenthal@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace IPFS\Api;
use IPFS\Annotation\Api as Endpoint;
use IPFS\Command\Command;
/**
* @author Robert Schönthal <robert.schoenthal@gmail.com>
* @autogenerated
* @codeCoverageIgnore
*/
final class Dag implements Api
{
/**
* Get a dag node from ipfs.
*
* @Endpoint(name="dag:get")
*
* @param string $arg the object to get Required:
*
* @return Command
*/
public function get(string $arg): Command
{
return new Command(__METHOD__, get_defined_vars());
}
/**
* Add a dag node to ipfs.
*
* @Endpoint(name="dag:put")
*
* @param string $file the object to put Required:
* @param string $format format that the object will be added as
* @param string $inputEnc format that the input object will be
* @param bool $pin pin this object when adding
* @param string $hash hash function to use
*
* @return Command
*/
public function put(string $file, string $format = 'cbor', string $inputEnc = 'json', bool $pin = false, string $hash = null): Command
{
return new Command(__METHOD__, get_defined_vars());
}
/**
* Resolve ipld block.
*
* @Endpoint(name="dag:resolve")
*
* @param string $arg the path to resolve Required:
*
* @return Command
*/
public function resolve(string $arg): Command
{
return new Command(__METHOD__, get_defined_vars());
}
}