-
Notifications
You must be signed in to change notification settings - Fork 0
Contract
Law for addon Lua and web D1. Any field change bumps version and requires web importer update same day.
wb1! + base64url( raw-deflate( json ) )
No newline, single line. WoW EditBox is large but avoids whitespace.
-
wb0!Camp DNA share URL, existing -
wb1!Inventory, lockouts, gear, talents — this repo v1 -
wb2!Reserved, unused
One envelope for 1 and 20 characters so decoder has no branch.
{
"v":1,
"addon":"1.0.0",
"exportedAt":1724001234,
"gameVersion":"12.1.0",
"interface":120100,
"bundle":{"count":3,"freshestSeenAt":1724001200,"oldestSeenAt":1723980000},
"characters":[ ... ]
}Character fields: guid, name, realm slug, faction, class, race, level, gold, bags[], bank[], reagentBank, Warband bank root, mail, auctions, currencies[], professions[], cooldowns[], instances[], bosses killed boolean in encounter order plus name, world bosses[], keystone{}, runs[], score, weekly Vault map, consumables rolled up phial/potion/food/rune, gear[], talents{}, seenAt stamps.
All _at times are Unix seconds UTC from time(), not milliseconds. Null if never seen. Web converts.
- Bank never opened:
free=null,items=[]-> unknown versus empty. UI prints "Not opened" not "0 free". - Warband bank
seenByGuid-> web "by Vocnar" credit line. Payload root plus own D1 table avoids repeating 5 tabs across 6 characters (about 22 KB saved, deflate 32 KB window cannot fold copies). -
currencies.maxQuantity0 = no cap,weeklyMax0 = not weekly-capped. - Consumables derived cache for Tonight Plan speed. Absent = unknown not zero (prevents hard block on 0 Phials when we did not look).
- Items inventory only, no bonus IDs, no enchant, no sockets (API has full equips).
gear[]carries that detail. Link optional.
Equipped gear needs no addon — Blizzard's Profile API already returns bonus IDs, sockets, enchants, crafted stats. gear[] fills the gap the API cannot see: bag and bank items, plus equipped items again so both halves compare from the same snapshot.
{"slot":1,"where":"equipped","id":212018,"ilvl":639,"s":"item:212018::::::::80:250::9:6:...:::"}-
sis the item string verbatim,|H...|h, same substring SimC's own addon exports. Not decomposed — bonus IDs, enchant, gems, crafted stats, drop level all ride positionally. Full field order indocs/CONTRACT.md. -
where:equipped|bag|bank|warbank. Neverreagent. -
slot: 1-19, shirt(4) and tabard(19) excluded everywhere. Bag/bank items collapse pairs to one representative slot — any ring to 11, any trinket to 13, off-hand family to 17 — because a generic equip location cannot say which of the two. - Duplicates the
{id,count}stack already inbags[]/bank[]on purpose. Cheap after deflate, keeps both consumers simple. -
talents{activeSpecID, specs[]}. Only the active spec's loadout is readable, sospecs[]accumulates across a spec switch rather than replacing.loadoutisC_Traits.GenerateImportString— same string the in-game Copy button and the site'stalent_loadout_codealready use. -
/warband gear on\|offtoggles export only. Stored data untouched either way.
- Not
LibDeflate:EncodeForPrint. That uses own 6-bit alphabet neither Base64 nor Base64url, swap+/for-_cannot make itatobreadable. Addon carries real RFC 4648 Section 5 encoder. - Raw deflate not zlib.
CompressDeflateemits bare stream no header,DecompressionStream('deflate')rejects. Must use'deflate-raw'orpako.inflateRaw.
- 20 characters (DoS protection)
- 1 MB decoded not 25 KB. Measured: 1 full 39 KB JSON 8.6 KB wire, 6 154 KB / 26 KB, 20 474 KB / 73 KB. Enforced chunk-by-chunk during inflate not after (bomb mitigation).
- Validated
v==1, array 1..20, each guid + name +seenAt.lastSeen.
Wire: LibDeflate level 9 -> base64url strip = -> prefix.
- Section absent -> never seen -> unknown -> grey, not delete
- Character missing from bundle -> not gone -> old snapshot aging red
- Consumables absent until ID table filled -> absent not zero
-
docs/contract/vectors/v1-min.json/v1-min.wb1 -
v1-gear.json/v1-gear.wb1— one character, gear[] and 2-spec talents - Both checked by
node tools/vector.mjs, regenerated with--write
Root plus warband_bank_cache one row per user. Each character seenAt.warbank for dots. seenByName credit line.
Single wb1! version strict. Any field change bumps prefix and breaks paste if sides disagree. Web checks prefix first.
Spec lives in addon repo, enforced in app warband-import.ts.
Maintained alongside Warband.pro App and Addon. Syncs on push. Companion for Warband.pro. MIT. Draft version 0 until CurseForge live.
Start
Integration
Internals