> For the complete documentation index, see [llms.txt](https://docs.glittr.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glittr.fi/building-on-glittr/glittr-contracts.md).

# Glittr Contracts

All Glittr transactions are Bitcoin transactions, developers can easily interact with Glittr via SDK.

### Interacting with Glittr via raw Bitcoin transactions

This section is useful if you're planning to create your own GLIP, which means you need to create a new standard based on the Glittr specification to perform custom tasks.&#x20;

You can manually build the Glittr transaction based on the specification or create your own custom Glittr contract and standard. Glittr transactions contain specific inputs and outputs within Bitcoin transactions that will later be processed by a Glittr node.

**Using transaction builder**

```typescript
import { OpReturnMessage, txBuilder } from "@glittr-sdk/sdk";

const t: OpReturnMessage = {
    contract_creation: {
      contract_type: {
        moa: {
          supply_cap: 2000n.toString(),
          divisibility: 18,
          live_time: 0,
          mint_mechanism: {
            free_mint: {
              supply_cap: 2000n.toString(),
              amount_per_mint: 10n.toString(),
            },
          },
        },
      },
    },
  };

console.log(txBuilder.compile(t))
```

Glittr specification is written into the Bitcoin transactions via OP\_RETURN. You can customize the OP\_RETURN message and after the transaction is confirmed, it will be processed by the Glittr node if the OP\_RETURN message structure is confirmed to be one of Glittr transaction.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.glittr.fi/building-on-glittr/glittr-contracts.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.
