[{"data":1,"prerenderedAt":162},["Reactive",2],{"content-query-ZoVEswIHHL":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"body":9,"_type":157,"_id":158,"_source":159,"_file":160,"_extension":161},"/docs/core-tech/atomic-swap-token","core-tech",false,"","Atomic swap token",{"type":10,"children":11,"toc":147},"root",[12,20,27,33,39,44,54,63,72,78,83,89,94,103,108,117,123],{"type":13,"tag":14,"props":15,"children":17},"element","h1",{"id":16},"atomic-swap-token",[18],{"type":19,"value":8},"text",{"type":13,"tag":21,"props":22,"children":24},"h2",{"id":23},"overview",[25],{"type":19,"value":26},"Overview",{"type":13,"tag":28,"props":29,"children":30},"p",{},[31],{"type":19,"value":32},"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.",{"type":13,"tag":21,"props":34,"children":36},{"id":35},"description",[37],{"type":19,"value":38},"Description",{"type":13,"tag":28,"props":40,"children":41},{},[42],{"type":19,"value":43},"Token has the following fields:",{"type":13,"tag":28,"props":45,"children":46},{},[47],{"type":13,"tag":48,"props":49,"children":51},"code",{"className":50},[],[52],{"type":19,"value":53},"- flags              // 1 byte",{"type":13,"tag":28,"props":55,"children":56},{},[57],{"type":13,"tag":48,"props":58,"children":60},{"className":59},[],[61],{"type":19,"value":62},"- optional TxID      // 1 or 17 bytes",{"type":13,"tag":28,"props":64,"children":65},{},[66],{"type":13,"tag":48,"props":67,"children":69},{"className":68},[],[70],{"type":19,"value":71},"- list of parameters // not less than 34 byte since transaction should have at least one address parameter",{"type":13,"tag":73,"props":74,"children":76},"h3",{"id":75},"flags",[77],{"type":19,"value":75},{"type":13,"tag":28,"props":79,"children":80},{},[81],{"type":19,"value":82},"Flags is a 1-byte field where only the highest bit is defined the others are reserved.\n0x80 means that this is a token.",{"type":13,"tag":73,"props":84,"children":86},{"id":85},"tx-id",[87],{"type":19,"value":88},"tx ID",{"type":13,"tag":28,"props":90,"children":91},{},[92],{"type":19,"value":93},"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:",{"type":13,"tag":28,"props":95,"children":96},{},[97],{"type":13,"tag":48,"props":98,"children":100},{"className":99},[],[101],{"type":19,"value":102},"|0x01| 16 byte UUID|",{"type":13,"tag":28,"props":104,"children":105},{},[106],{"type":19,"value":107},"or",{"type":13,"tag":28,"props":109,"children":110},{},[111],{"type":13,"tag":48,"props":112,"children":114},{"className":113},[],[115],{"type":19,"value":116},"|0x00| ",{"type":13,"tag":73,"props":118,"children":120},{"id":119},"transaction-parameters",[121],{"type":19,"value":122},"Transaction parameters",{"type":13,"tag":28,"props":124,"children":125},{},[126,128,134,136,145],{"type":19,"value":127},"Transaction parameter is a pair of the parameter key and value.\nThe key is 1 byte value and its meaning is defined by ",{"type":13,"tag":48,"props":129,"children":131},{"className":130},[],[132],{"type":19,"value":133},"TxParameterID ",{"type":19,"value":135},"enum from ",{"type":13,"tag":137,"props":138,"children":142},"a",{"href":139,"rel":140},"https://github.com/BeamMW/beam/blob/master/wallet/common.h",[141],"nofollow",[143],{"type":19,"value":144},"wallet/common.h",{"type":19,"value":146},"\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":7,"searchDepth":148,"depth":148,"links":149},2,[150,151],{"id":23,"depth":148,"text":26},{"id":35,"depth":148,"text":38,"children":152},[153,155,156],{"id":75,"depth":154,"text":75},3,{"id":85,"depth":154,"text":88},{"id":119,"depth":154,"text":122},"markdown","docs:docs:core-tech:Atomic-swap-token.md","docs","docs/core-tech/Atomic-swap-token.md","md",1777630735928]