Skip to content

Instantly share code, notes, and snippets.

View dexX7's full-sized avatar

dexX7

View GitHub Profile
@dexX7
dexX7 / freedex_activations_0.8.0.md
Last active March 18, 2020 09:23
Activation of unrestricted traditional DEx

UTXO

{"txid":"379d513464362882ef321593c66691a433702347c17e6cca922c76ee9d1f48d9","vout":0,"scriptPubKey":"a914167e39ef2efa6612405c9175c5a37a2af1c8cef287","value":0.0005}
{"txid":"379d513464362882ef321593c66691a433702347c17e6cca922c76ee9d1f48d9","vout":1,"scriptPubKey":"a914167e39ef2efa6612405c9175c5a37a2af1c8cef287","value":0.0005}

Feature Id: 15 (fast signing)

@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"]'
#!/usr/bin/env bash
export LC_ALL=C
# Get BUILDDIR
CURDIR=$(cd $(dirname "$0") || exit; pwd)
# shellcheck source=/dev/null
. "${CURDIR}/../config.ini"
if [ -z "$BUILDDIR" ]; then
@dexX7
dexX7 / 1_context.md
Last active April 13, 2019 11:24
Token based 2-of-3 multisig arbitration with Omni Core

Context:

  • Let Alice be the seller of an item or service, and Bob the buyer

  • Trent is a service operator, who has the role of an arbitrator

  • Alice wants to deal in TetherUSD

  • Bob's address is mkXZ1FYBNuvrqMEE2PLzJkS39T6w7CouFH, which is funded with TetherUSD

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 / manual_check.md
Created February 18, 2019 16:36
Omni Core consistency check

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
@dexX7
dexX7 / rpc_raw_simplesend.md
Last active June 30, 2018 03:58
Create raw Simple Send with Omni Core
@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 / 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 / build.sh
Last active August 14, 2017 20:43
Bitcoin Core 0.10 Build Matrix Script
# env:
MAKEJOBS=-j3
RUN_TESTS=false
RUN_SPOCK_TESTS=false
CCACHE_SIZE=100M
CCACHE_TEMPDIR=/tmp/.ccache-temp
CCACHE_COMPRESS=1
BASE_OUTDIR=$WORKSPACE/out
SDK_URL=https://bitcoincore.org/depends-sources/sdks