(self, key_name: str, type: str, size: int = 2048,
	        **kwargs: base.CommonArgs)
return self._client.request('/key/gen', args, decoder='json', **kwargs)
Adds a new public key that can be used for
		:meth:`~ipfshttpclient.Client.name.publish`
		
		.. code-block:: python
		
			>>> client.key.gen('example_key_name')
			{'Name': 'example_key_name',
			 'Id': 'QmQLaT5ZrCfSkXTH6rUKtVidcxj8jrW3X2h75Lug1AV7g8'}
		
		Parameters
		----------
		key_name
			Name of the new Key to be generated. Used to reference the Keys.
		type
			Type of key to generate. The current possible keys types are:
			
			 * ``"rsa"``
			 * ``"ed25519"``
		size
			Bitsize of key to generate
		
		Returns
		-------
			dict
		
		+------+---------------------------------------------------+
		| Name | The name of the newly generated key               |
		+------+---------------------------------------------------+
		| Id   | The key ID/fingerprint of the newly generated key |
		+------+---------------------------------------------------+
Adds a new public key that can be used for
		:meth:`~ipfshttpclient.Client.name.publish`
		
		.. code-block:: python
		
			>>> client.key.gen('example_key_name')
			{'Name': 'example_key_name',
			 'Id': 'QmQLaT5ZrCfSkXTH6rUKtVidcxj8jrW3X2h75Lug1AV7g8'}
		
		Parameters
		----------
		key_name
			Name of the new Key to be generated. Used to reference the Keys.
		type
			Type of key to generate. The current possible keys types are:
			
			 * ``"rsa"``
			 * ``"ed25519"``
		size
			Bitsize of key to generate
		
		Returns
		-------
			dict
		
		+------+---------------------------------------------------+
		| Name | The name of the newly generated key               |
		+------+---------------------------------------------------+
		| Id   | The key ID/fingerprint of the newly generated key |
		+------+---------------------------------------------------+
Adds a new public key that can be used for : meth : ~ipfshttpclient . Client . name . publish .. code - block :: python >>> client . key . gen ( example_key_name ) { Name : example_key_name Id : QmQLaT5ZrCfSkXTH6rUKtVidcxj8jrW3X2h75Lug1AV7g8 } Parameters ---------- key_name Name of the new Key to be generated . Used to reference the Keys . type Type of key to generate . The current possible keys types are : * rsa * ed25519 size Bitsize of key to generate Returns ------- dict + ------ + --------------------------------------------------- + | Name | The name of the newly generated key | + ------ + --------------------------------------------------- + | Id | The key ID / fingerprint of the newly generated key | + ------ + --------------------------------------------------- +
def gen(self, key_name: str, type: str, size: int = 2048,
	        **kwargs: base.CommonArgs):
		"""Adds a new public key that can be used for
		:meth:`~ipfshttpclient.Client.name.publish`
		
		.. code-block:: python
		
			>>> client.key.gen('example_key_name')
			{'Name': 'example_key_name',
			 'Id': 'QmQLaT5ZrCfSkXTH6rUKtVidcxj8jrW3X2h75Lug1AV7g8'}
		
		Parameters
		----------
		key_name
			Name of the new Key to be generated. Used to reference the Keys.
		type
			Type of key to generate. The current possible keys types are:
			
			 * ``"rsa"``
			 * ``"ed25519"``
		size
			Bitsize of key to generate
		
		Returns
		-------
			dict
		
		+------+---------------------------------------------------+
		| Name | The name of the newly generated key               |
		+------+---------------------------------------------------+
		| Id   | The key ID/fingerprint of the newly generated key |
		+------+---------------------------------------------------+
		"""
		
		opts = {"type": type, "size": size}
		kwargs.setdefault("opts", {}).update(opts)
		args = (key_name,)
		
		return self._client.request('/key/gen', args, decoder='json', **kwargs)
def gen ( self , key_name : str , type : str , size : int = 2048 , * * kwargs : base . CommonArgs ) : opts = { "type" : type , "size" : size } kwargs . setdefault ( "opts" , { } ) . update ( opts ) args = ( key_name , ) return self . _client . request ( '/key/gen' , args , decoder = 'json' , * * kwargs )