Skip to content

Instantly share code, notes, and snippets.

dexX7

View GitHub Profile
@dexX7
dexX7 / manual_check.md
Created Feb 18, 2019
Omni Core consistency check
View manual_check.md

Before updating to Omni Core v0.4.0, you can manually perform a database consistency check.

If any of the following commands fails to return transaction data or retuns a generic error output, there is a database inconsistency:

omnicore-cli omni_gettransaction b7c66175a99ca0e7b1691905d50a46165adb7a8012d9ec5e1ecf8239f859df6d
omnicore-cli omni_gettransaction a59ac18eda590dfe9f3671f99f3cec5679e95ea4d1478d5313e2b4706307537b
omnicore-cli omni_gettransaction ce56ee84abd20bd1386d66e5ab9e3661a9bfad45a7d46490cae2241bbebf91df
omnicore-cli omni_gettransaction bbdb911227c033697e92d6828d43b15f99bbc24c97147be0aed12dd98f362c28
omnicore-cli omni_gettransaction 69604c02f219136245d309b722816d6f4f77ccead60ded6976219f9a0becceff
View spec_uit.md

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

View token_types.md

Fungible token with fixed supply

Properties:

  • name
  • symbol
  • info

Operations:

View many-to-many.md

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 Jan 24, 2018
Optimizing Omni Layer transactions calculations
View costsavings.md
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 Mar 28, 2019
Create raw Simple Send Omni transactions with Omni Core
View omni_raw_simplesend.md

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 Oct 26, 2016
All-Pair Activations II
View allpair_activations_0.0.11-2.md

UTXO

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

Feature Id: 8 (fast signing)

View allpair_activations_0.0.11.md

UTXO

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

Feature Id: 8 (fast signing)

View wrap_update_tally.cpp
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 Jan 14, 2016
Create raw Alert with Omni Core
View rpc_raw_alert.md
Inputs:

Source:

16Zwbujf1h3v1DotKcn9XXt1m7FZn2o4mj

Payload:

ffffffff343a3339343530303a343a303a4d617374657220436f726520302e302e3920697320646570726563617465642c20706c65617365207570677261646520746f204f6d6e6920436f726520302e302e31302e7820617420646f776e6c6f61642e6f6d6e696c617965722e6f72672e20205468697320636c69656e742077696c6c206e6f206c6f6e67657220626520757361626c6520616674657220626c6f636b203339343530302e00
You can’t perform that action at this time.