[{"data":1,"prerenderedAt":121},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fcore-tech\u002Fatomic-swap-token":3,"docs-surround-\u002Fdocs\u002Fcore-tech\u002Fatomic-swap-token":110},{"id":4,"title":5,"body":6,"description":92,"extension":102,"image":103,"meta":104,"navTitle":103,"navigation":105,"path":106,"seo":107,"stem":108,"__hash__":109},"docs\u002Fdocs\u002Fcore-tech\u002FAtomic-swap-token.md","Atomic swap token",{"type":7,"value":8,"toc":91},"minimark",[9,13,18,22,26,29,35,40,45,49,52,56,59,64,67,72,76],[10,11,5],"h1",{"id":12},"atomic-swap-token",[14,15,17],"h2",{"id":16},"overview","Overview",[19,20,21],"p",{},"Swap token is intended to allow users to exchange info about transactions(swap) via any side channels.\nIn general, token is serialized list of transaction parameters, presented as a base58 encoded byte buffer.",[14,23,25],{"id":24},"description","Description",[19,27,28],{},"Token has the following fields:",[19,30,31],{},[32,33,34],"code",{},"- flags              \u002F\u002F 1 byte",[19,36,37],{},[32,38,39],{},"- optional TxID      \u002F\u002F 1 or 17 bytes",[19,41,42],{},[32,43,44],{},"- list of parameters \u002F\u002F not less than 34 byte since transaction should have at least one address parameter",[46,47,48],"h3",{"id":48},"flags",[19,50,51],{},"Flags is a 1-byte field where only the highest bit is defined the others are reserved.\n0x80 means that this is a token.",[46,53,55],{"id":54},"tx-id","tx ID",[19,57,58],{},"This is an optional transaction ID. All swap transaction should have this value. It is optional for the cases if we will use the token structure for other types of transaction.\nThere are two possible values:",[19,60,61],{},[32,62,63],{},"|0x01| 16 byte UUID|",[19,65,66],{},"or",[19,68,69],{},[32,70,71],{},"|0x00| ",[46,73,75],{"id":74},"transaction-parameters","Transaction parameters",[19,77,78,79,82,83,90],{},"Transaction parameter is a pair of the parameter key and value.\nThe key is 1 byte value and its meaning is defined by ",[32,80,81],{},"TxParameterID ","enum from ",[84,85,89],"a",{"href":86,"rel":87},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fbeam\u002Fblob\u002Fmaster\u002Fwallet\u002Fcommon.h",[88],"nofollow","wallet\u002Fcommon.h","\nThe values are arrays of bytes and contain serialized values.\nThe value type and size is defined by the key meaning. All integer types are big-endian.",{"title":92,"searchDepth":93,"depth":93,"links":94},"",2,[95,96],{"id":16,"depth":93,"text":17},{"id":24,"depth":93,"text":25,"children":97},[98,100,101],{"id":48,"depth":99,"text":48},3,{"id":54,"depth":99,"text":55},{"id":74,"depth":99,"text":75},"md",null,{},true,"\u002Fdocs\u002Fcore-tech\u002Fatomic-swap-token",{"title":5,"description":92},"docs\u002Fcore-tech\u002FAtomic-swap-token","zXTwdQ81NRpALueOEdl4jSYTum-9v0fEeRwSCy2FwvQ",[111,116],{"title":112,"path":113,"stem":114,"description":115,"children":-1},"Atomic Swap","\u002Fdocs\u002Fcore-tech\u002Fatomic-swap","docs\u002Fcore-tech\u002FAtomic-swap","Atomic swap is performed between Beam and other cryptocurrency. Denote it BTC, but actually it can denote other network that supports the needed functionality.",{"title":117,"path":118,"stem":119,"description":120,"children":-1},"Authorization Control And Signatures In Contracts","\u002Fdocs\u002Fcore-tech\u002Fauthorization-control-and-signatures-in-contracts","docs\u002Fcore-tech\u002FAuthorization-control-and-signatures-in-contracts","In the most common cases the contract method calls Env::AddSig() for each needed public key, and the app shader includes the key material for each key within the SigRequest structure, when it calls Env::GenerateKernel().",1783006057618]