Skip to content

Instantly share code, notes, and snippets.

View dexX7's full-sized avatar

dexX7

View GitHub Profile

Uniquely Identifiable Tokens -- v0.2 DRAFT

UIT introduces the new property type 5 to represent non-fungible tokens. With UIT each token within a collection is considered a unique entity and can be addressed explicitly.

For example, a digital token could be created to represent cats. While the current protocol allows to create tokens to represent some form of cats in general, where every cat is a cat, each cat is also an individuum and distinct from another, so non-distinguishable tokens may not be sufficient. UIT allows to represent and interact with each cat on it's own.

Transactions

Creating UIT

@dexX7
dexX7 / token_types.md
Last active February 6, 2018 13:06
Token types

Fungible token with fixed supply

Properties:

  • name
  • symbol
  • info

Operations:

@dexX7
dexX7 / many-to-many.md
Last active May 28, 2020 07:46
Omni Lite

Multi-command transactions

A new transaction structure allows to include multiple commands into one transaction. This is done by including a list of commands in the transaction payload. Each command is executed one by one and may be invalid without invalidating the other commands.

The payload structure may look like this:

[transaction marker] [number of commands] [command 1] ( [command 2] [...] )
@dexX7
dexX7 / costsavings.md
Last active January 24, 2018 09:23
Optimizing Omni Layer transactions calculations
Base transaction:
Container: 10 byte
Input: 148 byte
Change output: 34 byte
Reference output: 34 byte
Payload: 31 byte (8 value, 2 push, 1 OP_RETURN, 4 marker, 16 payload)
@dexX7
dexX7 / omni_raw_simplesend.md
Last active February 23, 2020 08:46
Create raw Simple Send Omni transactions with Omni Core

The following example demonstrates the creation of a raw Omni transaction, which transfers 0.1 Test Omni with token identifier 2 from 1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc to 1Njbpr7EkLA1R8ag8bjRN7oks7nv5wUn3o, with a transaction fee of 0.0006 BTC. For the sake of a demonstration, more than one unspent output was consumed.

1) List unspent outputs

List unspent outputs for 1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc.

omnicore-cli "listunspent" 0 999999 '["1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc"]'
@dexX7
dexX7 / allpair_activations_0.0.11-2.md
Last active October 26, 2016 11:38
All-Pair Activations II

UTXO

{"txid":"06e1e5a359dd3dc68e3e43bc73e95de0dac83419df2d7e0cd706561af5c65275","vout":0,"scriptPubKey":"a91498a2d17e08ac677dc220b92e0b79406f2f441c2487","value":0.001}
{"txid":"06e1e5a359dd3dc68e3e43bc73e95de0dac83419df2d7e0cd706561af5c65275","vout":1,"scriptPubKey":"a91498a2d17e08ac677dc220b92e0b79406f2f441c2487","value":0.001}

Feature Id: 8 (fast signing)

@dexX7
dexX7 / allpair_activations_0.0.11.md
Created October 21, 2016 21:26
All-Pair Activations

UTXO

{"txid":"cc283329bb3c725bc55644b8f99d80f996afd5b64c0a62d56762f7e9d0cfbac2","vout":1,"scriptPubKey":"a91498a2d17e08ac677dc220b92e0b79406f2f441c2487","value":0.0001888}
{"txid":"cc283329bb3c725bc55644b8f99d80f996afd5b64c0a62d56762f7e9d0cfbac2","vout":2,"scriptPubKey":"a91498a2d17e08ac677dc220b92e0b79406f2f441c2487","value":0.0001888}

Feature Id: 8 (fast signing)

bool mastercore::BalanceCreate(const std::string& destination, uint32_t propertyId, int64_t amount)
{
return update_tally_map(destination, propertyId, amount, BALANCE);
}
bool mastercore::BalanceDestroy(const std::string& destination, uint32_t propertyId, int64_t amount)
{
return update_tally_map(destination, propertyId, -amount, BALANCE);
}
@dexX7
dexX7 / rpc_raw_alert.md
Last active January 14, 2016 20:53
Create raw Alert with Omni Core
Inputs:

Source:

16Zwbujf1h3v1DotKcn9XXt1m7FZn2o4mj

Payload:

ffffffff343a3339343530303a343a303a4d617374657220436f726520302e302e3920697320646570726563617465642c20706c65617365207570677261646520746f204f6d6e6920436f726520302e302e31302e7820617420646f776e6c6f61642e6f6d6e696c617965722e6f72672e20205468697320636c69656e742077696c6c206e6f206c6f6e67657220626520757361626c6520616674657220626c6f636b203339343530302e00
@dexX7
dexX7 / gist:9ff9844ab4741568e26e
Last active January 14, 2016 17:56 — forked from achamely/Omnicore cli raw tx creation
Manual omni tx creation tests
source: "34UsEfJjU4pBwWVvSnqdKE6o6gvp3WS1gE"
reference: "12wSMSUQRVH1qKxUJF2V5S2jDXaU57gKPv"
reference pubkey: "0216e22d5e07b43a7402dcef62a9cb1dd25d7b201655799e19f0713c45d251ff97"
Property Id: 31
Amount: 298.59
payload : 000000000000000100000006f3bc2ec0
UTXO:
[{