The extension contract metadata represents the top level summary of the extension.
{"name":"Transfer CC too","description":"https://stackers.cc/derupt-ext-metadata.json","image":"https://stackers.cc/more-cc.gif"}
Extension Description Metadata
The extension description metadata enables greater control over the integration and functionality of the Extension within the Derupt UX/UI, facilitating for you:
Extension Information Summary (info):
A general Summary / Explanation of the Extension
Availability for specific Core Operation (ops):
To enable use of the Extension by Derupt Core Operations
Applicable Transaction Post Conditions (postconditions):
Set the appropriate type: ft, nft, and or stx
Function Arguments from the User (argsFromUser)
To enable the applicable argument input fields to be rendered and supplied by the user.
(render set visibility of the argument input field to the user in the Extension options modal)
(label set the label you want to apply to the visible field)
(order set the rendered order of argument input fields)
(optional representative if input field is an optional input [false means the argument input field is required, true means the argument input field is optional])
Note: argsFromUser are passed as extra function arguments in core operation calls.
{"info":"Extension to Transfer a AMOUNT of CC to a PRINCIPAL (TESTNET)","ops": {"send-message":false,"like-message":true,"dislike-message":true,"favorable-reply-message":true,"unfavorable-reply-message":true,"gift-message":true },"postconditions": [ {"type":"ft","contractAddress":"ST1ZK0A249B4SWAHVXD70R13P6B5HNKZAA0WNTJTR.cryptocash-token:cryptocash" } ],"argsFromUser": {"0": {"uint": {"render":true,"label":"Amount","order":0,"optional":false },"principal": {"render":true,"label":"Recipient Principal","order":1,"optional":false } } }}
Extension Contract Metadata pointers is updated via update-metadata
Extension Description Metadata is updated via derupt-ext-metadata.json
(or equivalent)
Extension execution exec-ext-func function, taking extras as an argument.
Developers should defineargsFromUser to ensure specific fields are presented to the user during the presentation of ExtensionModal in order to collect users input if needed.
Users can have only 1 extension called, per core function call: eg
can have 1 ext called during send-message
can have 1 ext called during like-message
can have 1 ext called during dislike-message
can have 1 ext called during favorable-reply-message
can have 1 ext called during unfavorable-reply-message
can have 1 ext called during gift-message
(note: users can change the enabled extension over time)