# Asset

### **Arguments**

* **cap** `integrer` *optional*\
  Is the total number of coins that can be issued (money supply). If omitted, the number is unlimited.
* **is\_private** `boolean` *required*\
  Indicates whether the asset is private (such as blackbytes) or publicly traceable (similar to bytes).
* **is\_transferrable** `boolean` *required*\
  Indicates whether the asset can be freely transferred among arbitrary parties or all transfers should involve the definer address as either sender or recipient. The latter can be useful e.g. for loyalty points that cannot be resold.
* **auto\_destroy** `boolean` *required*

  Indicates whether the asset is destroyed when it is sent to the definer address.
* **fixed\_denominations** `boolean` *required*

  Indicates whether the asset exists as coins (banknotes) of a limited set of denominations, similar to blackbytes. If it is `true`, the definition must also include property `denominations`, which is an array of all denominations and the number of coins of that denomination.
* **denominations** `array` *optional*\
  Array of all denominations and the number of coins of that denomination.
* **issued\_by\_definer\_only** `boolean` *required*\
  Indicates whether the asset can be issued only by the definer address. If `false`, anyone can issue the asset, in this case `cap` must be unlimited.
* **cosigned\_by\_definer** `boolean` *required*\
  Indicates whether each operation with the asset must be cosigned by the definer address. Useful for regulated assets where the issuer (bank) wants to perform various compliance checks (such as the funds are not arrested by a court order) prior to approving a transaction.
* **spender\_attested** `boolean` *required*\
  Indicates whether the spender of the asset must be attested by one of approved attestors. Also useful for regulated assets e.g. to limit the access to the asset only to KYC'ed users. If `true`, the definition must also include the list of approved attestor addresses.
* **attestors** `array` *optional*\
  List of approved attestor addresses
* **issue\_condition** `array` *optional*\
  Specify the restrictions when the asset can be issued. It evaluate to a boolean and are coded in the same [smart contract language](https://github.com/byteball/byteballcore/wiki/Smart-contracts) as address definitions.
* **transfer\_condition** `array` *optional*\
  Specify the restrictions when the asset can be transferred. It evaluate to a boolean and are coded in the same [smart contract language](https://github.com/byteball/byteballcore/wiki/Smart-contracts) as address definitions.

### Returns

Returns the unit hash.

### Example

```javascript
const params = {
  cap: 1000000, 
  is_private: false, 
  is_transferrable: true, 
  auto_destroy: false, 
  fixed_denominations: false, 
  issued_by_definer_only: true, 
  cosigned_by_definer: false, 
  spender_attested: false
}; 

client.post.asset(params, wif, function(err, result) {
  if (err) return console.error(err);
  console.log(result);
  // -> xamdfH5Uk+alv3le0pEA01qSsfZjycyMsqaqHtycJ1M=
});
```

### **Learn more**

* "24. Assets" (page 33) <https://obyte.org/Byteball.pdf>
* Issuing assets on Obyte: <https://github.com/byteball/ocore/wiki/Issuing-assets-on-Byteball>
* Smart contracts: <https://github.com/byteball/ocore/wiki/Smart-contracts>
* Obyte Wiki: <https://wiki.obyte.org/Asset>
* Obyte Asset Registry: <https://obyte.app>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://obytejs.com/0.1.12/post/asset.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
