-
Notifications
You must be signed in to change notification settings - Fork 4
Kogs cc transaction description
This is a description of Kogs cc transaction, their inputs and outputs.
Kogs cc module is built on top of Tokens cc and uses Nonfungible token (NFT) cc object in kogs transactions.
Most of Kogs cc transactions are combined with Tokens cc outputs where NFT data is stored.
The last opreturn contains the kogs objectType which defines which operation on NFTs is done (like adding kogs to a container or depositing cointainers to a game etc)
Some used keywords:
- desc - description of an input or output
- funcid - one byte functional id in tx data
- objectType - another one byte id indicating object type
- pk - public key
- OP_RETURN - unspendable output with application data
- OP_DROP - application data added to a cc output
- BLOB - additional data blob added after the parseable data in OP_RETURN or OP_DROP
Create one NFT (kog/slammer)
vin.*: type=normal desc=txfee
vout.0: type="cc EVAL_TOKENS" nValue=10000 pk=tokens-globalpk desc="token marker"
vout.1: type="cc EVAL_TOKENS,EVAL_KOGS" nValue=1 OP_DROP="eval=EVAL_TOKEN name description pubkey BLOB="eval=EVAL_KOGS funcid='c' version imageid setid subsetid [packId]"" desc="NFT supply"
vout.2: type="cc EVAL_KOGS" nValue=10000 pk=kogs-globalpk desc="kogs marker"
vout.n-1: type=normal desc=change
Transfer one or several NFTs (kogs/slammer)
vin.*: type=normal desc=txfee
vin.1+: type="cc EVAL_TOKENS"
vout.0+: type="cc EVAL_TOKENS,EVAL_KOGS" nValue=1 desc="token value" OP_DROP="eval=EVAL_TOKENS funcid='t' version tokenid"
vout.n-1: type=normal desc=change
Create container NFT
vin.*: type=normal desc=txfee
vout.0: type="cc EVAL_TOKENS" nValue=10000 pk=tokens-globalpk desc="token marker"
vout.1: type="cc EVAL_TOKENS,EVAL_KOGS" nValue=1 OP_DROP="eval=EVAL_TOKEN name description pubkey BLOB="eval=EVAL_KOGS funcid='c' version playerid"" desc="NFT supply"
vout.2: type="cc EVAL_KOGS", nValue=10000 pk=kogs-globalpk desc="kogs marker"
vout.n-1: type=normal desc=change
Add NFT to a container
vin.*: type=normal desc=txfee
vin.1+: type="cc EVAL_TOKENS"
vout.0+: type="cc EVAL_TOKENS,EVAL_KOGS", nValue=1, pk=kogs-globalpk,containeridpk desc="token value", OP_DROP="eval=EVAL_TOKENS funcid='t' version tokenid"
vout.n-2: type=normal desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='H' version" desc="to indicate for validation code this is an add to container tx"
Remove NFT from a container
vin.*: type=normal desc=txfee
vin.1+: type="cc EVAL_TOKENS"
vout.0+: type="cc EVAL_TOKENS,EVAL_KOGS" nValue=1 pk=any desc="token value", OP_DROP="eval=EVAL_TOKENS funcid='t' version tokenid"
vout.n-2: type=normal desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='J' version" desc="to indicate for validation code this is an add to container tx"
Create player
vin.*: type=normal desc=txfee
vout.0: type="cc EVAL_KOGS" nValue=1 "output to self"
vout.1: type="cc EVAL_KOGS" nValue=10000 pk=kogs-globalpk desc="marker to list"
vout.n-2: type=normal, desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='P' version name description"
Advertise player
vin.*: type=normal desc=txfee
vout.1: type="cc EVAL_KOGS" nValue=5000 pk=kogs-globalpk desc="marker to list"
vout.n-2: type=normal desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='A' version gameOpts playerid"
Stop advertise player
vin.*: type=normal desc=txfee
vin.1: type="cc EVAL_KOGS" objectType='A'
vout.1: type="cc EVAL_KOGS" desc="spend marker amount to self"
vout.n-2: type=normal desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='E' version playerid"
Create gameconfig
vin.*: type=normal desc=txfee
vout.0: type="cc EVAL_KOGS" nValue=1
vout.1: type="cc EVAL_KOGS" nValue=10000 pk=kogs-globalpk
vout.n-2: type=normal desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='M' version numKogsInContainer numKogsInStack numKogsToAdd maxTurns heightRanges strengthRanges"
Create game
vin.*: type=normal desc=txfee
vout.0: type="cc EVAL_KOGS" nValue=1 desc="output to self to attach a baton to it"
vout.1: type="cc EVAL_KOGS" nValue=10000 destpk=kogs-globalpk desc="marker to get list"
vout.2+: type="cc EVAL_KOGS" nValue=1 desc="output to each player pk to connect committed random values"
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='G' version gameconfigid playerids"
Commit random values
vin.*: type=normal desc=txfee
vin.0: type="cc EVAL_KOGS" funcid='G'
vout.0+: type="cc EVAL_KOGS" nValue=1 dest=kogs-globalpk,gameidpk OP_DROP="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS funcid='Q' version gameid num randomHash" desc="committed random"
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='Q' version" desc="to indicate for validation code this is a commit random tx"
Reveal random values
vin.*: type=normal desc=txfee
vin.0: type="cc EVAL_KOGS" funcid='Q'
vout.0+: type="cc EVAL_KOGS", nValue=1, dest=kogs-global-pk,gameidpk OP_DROP="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS funcid='T' version gameid num random" desc="revealed random"
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='T' version" desc="to indicate for validation code this is a reveal random tx"
Deposit container or slammer to a game
vin.*: type=normal, desc=txfee
vin.1+: type="cc EVAL_TOKENS"
vout.0+: type="cc EVAL_TOKENS,EVAL_KOGS" nValue=1 pk=kogs-globalpk,gameidpk desc="token value" OP_DROP="eval=EVAL_TOKENS funcid='t' version tokenid"
vout.n-2: type=normal desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='X' version" desc="to indicate for validation code this is a deposit tx"
Claim container or slammer from a game
vin.*: type=normal desc=txfee
vin.1+: type="cc EVAL_TOKENS"
vout.0+: type="cc EVAL_TOKENS,EVAL_KOGS", nValue=1, pk=prevpk desc="token value", OP_DROP="eval=EVAL_TOKENS funcid='t' version tokenid"
vout.n-2: type=normal desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='Y' version" desc="to indicate for validation code this is a claim tx"
Create baton
vin.*: type=normal desc=txfee
vin.1: type="cc EVAL_KOGS" objectType='G' desc="attach to the prev baton or game output"
vin.2+: type="cc EVAL_KOGS" objectType='X' desc="attach to the deposit tx, only for the first baton"
vin.3+: type="cc EVAL_KOGS" objectType='T' desc="attach to the reveal random tx"
vout.0: type="cc EVAL_KOGS" nValue=1 desc="output to next player pk to attach the next baton to it"
vout.1+: type="cc EVAL_TOKENS,EVAL_KOGS" nValue=1, pk=prevpk desc="optional, container or slammer to the owner, if game is finished", OP_DROP="eval=EVAL_TOKENS funcid='t' version tokenid"
vout.n-2: type=normal desc=change
vout.n-1: type=normal OP_RETURN="eval=EVAL_KOGS funcid='c' version eval=EVAL_KOGS objectType='B' version gameid gameconfigid playerids KogsInStack KogsFlipped armHeight armStrength numHashTxids HashTxids numRandomTxids RandomTxids nextTurn prevTurnCount isFinished winnerId"