# .derupt-ext-trait

### More Details Coming Soon

*(sample extensions coming soon)*

```
;; title: derupt-ext-trait
;; version: 1.3.1
;; summary: Derupt Extension Trait Contract

(use-trait cryptocash-token-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.cryptocash-token-trait.cryptocash-token)
(use-trait cryptocash-core-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.cryptocash-core-trait.cryptocash-core)
(use-trait sip-009-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-009-trait-nft-standard.sip-009-trait)
(use-trait sip-010-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-010-trait-ft-standard.sip-010-trait)
(use-trait sip-013-trait 'ST1ZK4MRVTQQJMVAAJQWBV2WPQ87QV2851YCTHD7X.sip-013-trait-sft-standard.sip-013-trait)

(define-trait derupt-ext
    (
        (update-ext-owner
            (principal)
            (response bool uint)
        )

        (update-ext-metadata
            (
                (optional (string-ascii 24))
                (optional (string-ascii 256))
                (optional (string-ascii 256))
            )
            (response bool uint)
        )

        (exec-ext-func 
            (
                (optional (list 10 
                    {
                        stringutf8: (optional (string-utf8 256)), 
                        stringascii: (optional (string-ascii 256)), 
                        uint: (optional uint), 
                        int: (optional int), 
                        principal: (optional principal), 
                        bool: (optional bool),
                        buff: (optional (buff 34)),
                        proxy: (optional (buff 2048)),
                        cryptocash-token-contract: (optional <cryptocash-token-trait>),
                        cryptocash-core-contract: (optional <cryptocash-core-trait>),
                        sip-009-contract: (optional <sip-009-trait>),
                        sip-010-contract: (optional <sip-010-trait>),
                        sip-013-contract: (optional <sip-013-trait>)
                    }
                ))
            )            
            (response bool uint)
        )
    )
)
```

{% hint style="warning" %}
Extension argument `ext` must follow the`.derupt-ext-trait` function schema
{% endhint %}

{% hint style="warning" %}
Extension execution is done per the `exec-ext-func` function, which takes `extras` as an argument.  Extension(s) contract calls are made in the `.derupt-core-yyyymmdd`.&#x20;
{% endhint %}

{% hint style="warning" %}
Users can have only 1 extension enabled, per key function call.  eg..

* can have 1 `ext` allowed in `gift-message`&#x20;
* can have 1 `ext` allowed in `send-message`
* can have 1 `ext` allowed in `like-message`&#x20;
* can have 1 `ext` allowed in `dislike-message`
* can have 1 `ext` allowed in `favorable-reply-message`
* can have 1 `ext` allowed in `unfavorable-reply-message`

(note: users can change the enabled extension over time)
{% endhint %}


---

# 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://docs.derupt.io/latest/contracts/.derupt-ext-trait.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.
