wao 0.12.4 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/aoconnect-base.js +307 -167
- package/cjs/armem-base.js +38 -28
- package/cjs/bar.js +260 -193
- package/cjs/hb.js +418 -0
- package/cjs/index.js +7 -0
- package/cjs/lua/aos_mainnet.wasm +0 -0
- package/cjs/server.js +425 -231
- package/cjs/waosm-node/waosm_bg.wasm.js +19 -0
- package/cjs/waosm-node.js +8 -22
- package/cjs/weavedb.js +59 -49
- package/cjs/weavedrive.js +24 -19
- package/esm/aoconnect-base.js +123 -55
- package/esm/armem-base.js +9 -4
- package/esm/bar.js +30 -6
- package/esm/hb.js +121 -0
- package/esm/index.js +2 -1
- package/esm/lua/aos_mainnet.wasm +0 -0
- package/esm/server.js +172 -21
- package/esm/waosm-node/waosm_bg.wasm.js +14 -0
- package/esm/waosm-node.js +6 -22
- package/esm/weavedb.js +15 -11
- package/esm/weavedrive.js +13 -11
- package/package.json +4 -1
- package/esm/.cache/data.mdb +0 -0
- package/esm/.cache/lock.mdb +0 -0
- package/esm/.db/100040/data/1/123.json +0 -1
- package/esm/.db/103252/data/0/13315.json +0 -1
- package/esm/.db/103252/data/1/120.json +0 -1
- package/esm/.db/103252/data/1/123.json +0 -1
- package/esm/.db/105470/data/0/0.json +0 -1
- package/esm/.db/105470/data/1/120.json +0 -1
- package/esm/.db/105470/data/1/123.json +0 -1
- package/esm/.db/105470/data/3/104.json +0 -1
- package/esm/.db/105667/data/ppl/bob.json +0 -1
- package/esm/.db/105869/data/1/120.json +0 -1
- package/esm/.db/105869/data/1/123.json +0 -1
- package/esm/.db/113125/data/1/example.json +0 -1
- package/esm/.db/116234/data/1/123.json +0 -1
- package/esm/.db/119911/data/1/120.json +0 -1
- package/esm/.db/119911/data/1/123.json +0 -1
- package/esm/.db/122989/data/0/0.json +0 -1
- package/esm/.db/122989/data/1/120.json +0 -1
- package/esm/.db/122989/data/1/123.json +0 -1
- package/esm/.db/125755/data/1/123.json +0 -1
- package/esm/.db/126241/data/1/123.json +0 -1
- package/esm/.db/129099/data/1/123.json +0 -1
- package/esm/.db/129781/data/0/14083.json +0 -1
- package/esm/.db/129781/data/1/120.json +0 -1
- package/esm/.db/129781/data/1/123.json +0 -1
- package/esm/.db/129781/data/15/0.json +0 -1
- package/esm/.db/132860/data/0/13315.json +0 -1
- package/esm/.db/132860/data/1/120.json +0 -1
- package/esm/.db/132860/data/1/123.json +0 -1
- package/esm/.db/134721/data/1/123.json +0 -1
- package/esm/.db/137408/data/ppl/bob.json +0 -1
- package/esm/.db/137556/data/1/123.json +0 -1
- package/esm/.db/143417/data/1/123.json +0 -1
- package/esm/.db/143799/data/1/123.json +0 -1
- package/esm/.db/146558/data/0/0.json +0 -1
- package/esm/.db/146558/data/1/120.json +0 -1
- package/esm/.db/146558/data/1/123.json +0 -1
- package/esm/.db/153145/data/1/123.json +0 -1
- package/esm/.db/153912/data/1/example.json +0 -1
- package/esm/.db/154536/data/0/13315.json +0 -1
- package/esm/.db/154536/data/1/120.json +0 -1
- package/esm/.db/154536/data/1/123.json +0 -1
- package/esm/.db/158777/data/1/123.json +0 -1
- package/esm/.db/170678/data/0/13315.json +0 -1
- package/esm/.db/170678/data/1/120.json +0 -1
- package/esm/.db/170678/data/1/123.json +0 -1
- package/esm/.db/17434/data/1/123.json +0 -1
- package/esm/.db/176113/data/1/123.json +0 -1
- package/esm/.db/179669/data/0/13315.json +0 -1
- package/esm/.db/179669/data/1/120.json +0 -1
- package/esm/.db/179669/data/1/123.json +0 -1
- package/esm/.db/183368/data/1/120.json +0 -1
- package/esm/.db/183368/data/1/123.json +0 -1
- package/esm/.db/188491/data/0/14083.json +0 -1
- package/esm/.db/188491/data/1/120.json +0 -1
- package/esm/.db/188491/data/1/123.json +0 -1
- package/esm/.db/188491/data/15/0.json +0 -1
- package/esm/.db/189189/data/ppl/bob.json +0 -1
- package/esm/.db/195025/data/1/120.json +0 -1
- package/esm/.db/195025/data/1/123.json +0 -1
- package/esm/.db/19852/data/1/123.json +0 -1
- package/esm/.db/204968/data/1/123.json +0 -1
- package/esm/.db/207069/data/0/0.json +0 -1
- package/esm/.db/207069/data/1/120.json +0 -1
- package/esm/.db/207069/data/1/123.json +0 -1
- package/esm/.db/211038/data/1/120.json +0 -1
- package/esm/.db/211038/data/1/123.json +0 -1
- package/esm/.db/211580/data/1/120.json +0 -1
- package/esm/.db/211580/data/1/123.json +0 -1
- package/esm/.db/214305/data/0/0.json +0 -1
- package/esm/.db/214305/data/1/120.json +0 -1
- package/esm/.db/214305/data/1/123.json +0 -1
- package/esm/.db/214712/data/0/13315.json +0 -1
- package/esm/.db/214712/data/1/120.json +0 -1
- package/esm/.db/214712/data/1/123.json +0 -1
- package/esm/.db/218886/data/0/14083.json +0 -1
- package/esm/.db/218886/data/1/120.json +0 -1
- package/esm/.db/218886/data/1/123.json +0 -1
- package/esm/.db/218886/data/15/0.json +0 -1
- package/esm/.db/221009/data/1/123.json +0 -1
- package/esm/.db/221818/data/1/120.json +0 -1
- package/esm/.db/221818/data/1/123.json +0 -1
- package/esm/.db/226668/data/0/13315.json +0 -1
- package/esm/.db/226668/data/1/120.json +0 -1
- package/esm/.db/226668/data/1/123.json +0 -1
- package/esm/.db/226981/data/0/123.json +0 -1
- package/esm/.db/235331/data/0/13315.json +0 -1
- package/esm/.db/235331/data/1/120.json +0 -1
- package/esm/.db/235331/data/1/123.json +0 -1
- package/esm/.db/247863/data/1/123.json +0 -1
- package/esm/.db/247918/data/0/0.json +0 -1
- package/esm/.db/247918/data/1/120.json +0 -1
- package/esm/.db/247918/data/1/123.json +0 -1
- package/esm/.db/247918/data/3/104.json +0 -1
- package/esm/.db/250384/data/1/123.json +0 -1
- package/esm/.db/253205/data/1/120.json +0 -1
- package/esm/.db/253205/data/1/123.json +0 -1
- package/esm/.db/26452/data/1/120.json +0 -1
- package/esm/.db/26452/data/1/123.json +0 -1
- package/esm/.db/265430/data/1/120.json +0 -1
- package/esm/.db/265430/data/1/123.json +0 -1
- package/esm/.db/269049/data/0/0.json +0 -1
- package/esm/.db/269049/data/1/120.json +0 -1
- package/esm/.db/269049/data/1/123.json +0 -1
- package/esm/.db/273652/data/0/0.json +0 -1
- package/esm/.db/273652/data/1/120.json +0 -1
- package/esm/.db/273652/data/1/123.json +0 -1
- package/esm/.db/281035/data/0/0.json +0 -1
- package/esm/.db/281035/data/1/120.json +0 -1
- package/esm/.db/281035/data/1/123.json +0 -1
- package/esm/.db/281140/data/0/13315.json +0 -1
- package/esm/.db/281140/data/1/120.json +0 -1
- package/esm/.db/281140/data/1/123.json +0 -1
- package/esm/.db/295732/data/ppl/bob.json +0 -1
- package/esm/.db/296113/data/1/123.json +0 -1
- package/esm/.db/297154/data/0/13315.json +0 -1
- package/esm/.db/297154/data/1/120.json +0 -1
- package/esm/.db/297154/data/1/123.json +0 -1
- package/esm/.db/304770/data/1/120.json +0 -1
- package/esm/.db/304770/data/1/123.json +0 -1
- package/esm/.db/3081/data/0/0.json +0 -1
- package/esm/.db/3081/data/1/120.json +0 -1
- package/esm/.db/3081/data/1/123.json +0 -1
- package/esm/.db/310793/data/1/120.json +0 -1
- package/esm/.db/310793/data/1/123.json +0 -1
- package/esm/.db/317310/data/1/123.json +0 -1
- package/esm/.db/317819/data/1/example.json +0 -1
- package/esm/.db/319464/data/0/0.json +0 -1
- package/esm/.db/319464/data/1/120.json +0 -1
- package/esm/.db/319464/data/1/123.json +0 -1
- package/esm/.db/32053/data/1/120.json +0 -1
- package/esm/.db/32053/data/1/123.json +0 -1
- package/esm/.db/322473/data/ppl/bob.json +0 -1
- package/esm/.db/323300/data/1/123.json +0 -1
- package/esm/.db/323840/data/0/0.json +0 -1
- package/esm/.db/323840/data/1/120.json +0 -1
- package/esm/.db/323840/data/1/123.json +0 -1
- package/esm/.db/328731/data/0/0.json +0 -1
- package/esm/.db/328731/data/1/120.json +0 -1
- package/esm/.db/328731/data/1/123.json +0 -1
- package/esm/.db/334158/data/1/example.json +0 -1
- package/esm/.db/334577/data/1/example.json +0 -1
- package/esm/.db/339914/data/1/123.json +0 -1
- package/esm/.db/34265/data/0/0.json +0 -1
- package/esm/.db/34265/data/1/120.json +0 -1
- package/esm/.db/34265/data/1/123.json +0 -1
- package/esm/.db/346364/data/1/123.json +0 -1
- package/esm/.db/349791/data/0/14083.json +0 -1
- package/esm/.db/349791/data/1/120.json +0 -1
- package/esm/.db/349791/data/1/123.json +0 -1
- package/esm/.db/349791/data/15/0.json +0 -1
- package/esm/.db/350767/data/ppl/bob.json +0 -1
- package/esm/.db/352310/data/0/13315.json +0 -1
- package/esm/.db/352310/data/1/120.json +0 -1
- package/esm/.db/352310/data/1/123.json +0 -1
- package/esm/.db/35438/data/1/123.json +0 -1
- package/esm/.db/354670/data/0/13315.json +0 -1
- package/esm/.db/354670/data/1/120.json +0 -1
- package/esm/.db/354670/data/1/123.json +0 -1
- package/esm/.db/354805/data/0/0.json +0 -1
- package/esm/.db/354805/data/1/120.json +0 -1
- package/esm/.db/354805/data/1/123.json +0 -1
- package/esm/.db/358368/data/1/example.json +0 -1
- package/esm/.db/358831/data/1/123.json +0 -1
- package/esm/.db/360133/data/0/0.json +0 -1
- package/esm/.db/360133/data/1/120.json +0 -1
- package/esm/.db/360133/data/1/123.json +0 -1
- package/esm/.db/367925/data/0/13315.json +0 -1
- package/esm/.db/367925/data/1/120.json +0 -1
- package/esm/.db/367925/data/1/123.json +0 -1
- package/esm/.db/369638/data/1/123.json +0 -1
- package/esm/.db/3700/data/1/120.json +0 -1
- package/esm/.db/3700/data/1/123.json +0 -1
- package/esm/.db/374988/data/0/0.json +0 -1
- package/esm/.db/374988/data/1/120.json +0 -1
- package/esm/.db/374988/data/1/123.json +0 -1
- package/esm/.db/380018/data/1/123.json +0 -1
- package/esm/.db/380021/data/1/123.json +0 -1
- package/esm/.db/386761/data/1/123.json +0 -1
- package/esm/.db/387217/data/0/13315.json +0 -1
- package/esm/.db/387217/data/1/120.json +0 -1
- package/esm/.db/387217/data/1/123.json +0 -1
- package/esm/.db/392652/data/1/123.json +0 -1
- package/esm/.db/392692/data/0/13315.json +0 -1
- package/esm/.db/392692/data/1/120.json +0 -1
- package/esm/.db/392692/data/1/123.json +0 -1
- package/esm/.db/396339/data/1/123.json +0 -1
- package/esm/.db/404348/data/1/123.json +0 -1
- package/esm/.db/405894/data/0/14083.json +0 -1
- package/esm/.db/405894/data/1/120.json +0 -1
- package/esm/.db/405894/data/1/123.json +0 -1
- package/esm/.db/405894/data/15/0.json +0 -1
- package/esm/.db/406165/data/1/example.json +0 -1
- package/esm/.db/407316/data/ppl/bob.json +0 -1
- package/esm/.db/407987/data/1/123.json +0 -1
- package/esm/.db/410181/data/1/123.json +0 -1
- package/esm/.db/411981/data/1/120.json +0 -1
- package/esm/.db/411981/data/1/123.json +0 -1
- package/esm/.db/416278/data/1/120.json +0 -1
- package/esm/.db/416278/data/1/123.json +0 -1
- package/esm/.db/418449/data/1/123.json +0 -1
- package/esm/.db/425620/data/1/120.json +0 -1
- package/esm/.db/425620/data/1/123.json +0 -1
- package/esm/.db/429727/data/1/123.json +0 -1
- package/esm/.db/435030/data/1/123.json +0 -1
- package/esm/.db/444362/data/1/120.json +0 -1
- package/esm/.db/444362/data/1/123.json +0 -1
- package/esm/.db/446985/data/1/123.json +0 -1
- package/esm/.db/451355/data/1/120.json +0 -1
- package/esm/.db/451355/data/1/123.json +0 -1
- package/esm/.db/45640/data/1/123.json +0 -1
- package/esm/.db/46155/data/0/0.json +0 -1
- package/esm/.db/46155/data/0/13315.json +0 -1
- package/esm/.db/46155/data/1/120.json +0 -1
- package/esm/.db/46155/data/1/123.json +0 -1
- package/esm/.db/46528/data/1/123.json +0 -1
- package/esm/.db/466476/data/1/123.json +0 -1
- package/esm/.db/467578/data/0/0.json +0 -1
- package/esm/.db/467578/data/1/120.json +0 -1
- package/esm/.db/467578/data/1/123.json +0 -1
- package/esm/.db/472245/data/1/123.json +0 -1
- package/esm/.db/474238/data/1/example.json +0 -1
- package/esm/.db/477291/data/1/123.json +0 -1
- package/esm/.db/477375/data/1/120.json +0 -1
- package/esm/.db/477375/data/1/123.json +0 -1
- package/esm/.db/479960/data/1/123.json +0 -1
- package/esm/.db/482327/data/1/123.json +0 -1
- package/esm/.db/487117/data/1/example.json +0 -1
- package/esm/.db/495075/data/1/123.json +0 -1
- package/esm/.db/498660/data/1/123.json +0 -1
- package/esm/.db/510578/data/1/123.json +0 -1
- package/esm/.db/514521/data/1/123.json +0 -1
- package/esm/.db/524536/data/1/120.json +0 -1
- package/esm/.db/524536/data/1/123.json +0 -1
- package/esm/.db/52751/data/1/example.json +0 -1
- package/esm/.db/530599/data/ppl/bob.json +0 -1
- package/esm/.db/536579/data/1/123.json +0 -1
- package/esm/.db/539183/data/1/123.json +0 -1
- package/esm/.db/539222/data/1/example.json +0 -1
- package/esm/.db/542071/data/0/0.json +0 -1
- package/esm/.db/542071/data/0/13315.json +0 -1
- package/esm/.db/542071/data/1/120.json +0 -1
- package/esm/.db/542071/data/1/123.json +0 -1
- package/esm/.db/542939/data/ppl/bob.json +0 -1
- package/esm/.db/547077/data/1/123.json +0 -1
- package/esm/.db/548947/data/ppl/bob.json +0 -1
- package/esm/.db/551385/data/0/0.json +0 -1
- package/esm/.db/551385/data/1/120.json +0 -1
- package/esm/.db/551385/data/1/123.json +0 -1
- package/esm/.db/553486/data/0/0.json +0 -1
- package/esm/.db/553486/data/1/120.json +0 -1
- package/esm/.db/553486/data/1/123.json +0 -1
- package/esm/.db/554578/data/1/123.json +0 -1
- package/esm/.db/555963/data/1/123.json +0 -1
- package/esm/.db/556201/data/1/123.json +0 -1
- package/esm/.db/572000/data/1/123.json +0 -1
- package/esm/.db/572151/data/1/123.json +0 -1
- package/esm/.db/573301/data/1/123.json +0 -1
- package/esm/.db/579648/data/0/0.json +0 -1
- package/esm/.db/579648/data/1/120.json +0 -1
- package/esm/.db/579648/data/1/123.json +0 -1
- package/esm/.db/579648/data/3/104.json +0 -1
- package/esm/.db/582311/data/1/example.json +0 -1
- package/esm/.db/587351/data/0/14083.json +0 -1
- package/esm/.db/587351/data/1/120.json +0 -1
- package/esm/.db/587351/data/1/123.json +0 -1
- package/esm/.db/587351/data/15/0.json +0 -1
- package/esm/.db/588867/data/0/0.json +0 -1
- package/esm/.db/588867/data/1/120.json +0 -1
- package/esm/.db/588867/data/1/123.json +0 -1
- package/esm/.db/589730/data/1/123.json +0 -1
- package/esm/.db/591738/data/0/13315.json +0 -1
- package/esm/.db/591738/data/1/120.json +0 -1
- package/esm/.db/591738/data/1/123.json +0 -1
- package/esm/.db/593460/data/1/123.json +0 -1
- package/esm/.db/595304/data/1/123.json +0 -1
- package/esm/.db/595772/data/0/13315.json +0 -1
- package/esm/.db/595772/data/1/120.json +0 -1
- package/esm/.db/595772/data/1/123.json +0 -1
- package/esm/.db/596051/data/0/0.json +0 -1
- package/esm/.db/596051/data/1/120.json +0 -1
- package/esm/.db/596051/data/1/123.json +0 -1
- package/esm/.db/601728/data/1/120.json +0 -1
- package/esm/.db/601728/data/1/123.json +0 -1
- package/esm/.db/619154/data/1/123.json +0 -1
- package/esm/.db/620185/data/1/123.json +0 -1
- package/esm/.db/623179/data/1/123.json +0 -1
- package/esm/.db/623265/data/1/123.json +0 -1
- package/esm/.db/630002/data/1/120.json +0 -1
- package/esm/.db/630002/data/1/123.json +0 -1
- package/esm/.db/631961/data/1/123.json +0 -1
- package/esm/.db/635637/data/0/14083.json +0 -1
- package/esm/.db/635637/data/1/120.json +0 -1
- package/esm/.db/635637/data/1/123.json +0 -1
- package/esm/.db/635637/data/15/0.json +0 -1
- package/esm/.db/636670/data/1/example.json +0 -1
- package/esm/.db/640527/data/0/0.json +0 -1
- package/esm/.db/640527/data/1/120.json +0 -1
- package/esm/.db/640527/data/1/123.json +0 -1
- package/esm/.db/644020/data/0/13315.json +0 -1
- package/esm/.db/644020/data/1/120.json +0 -1
- package/esm/.db/644020/data/1/123.json +0 -1
- package/esm/.db/64462/data/0/14083.json +0 -1
- package/esm/.db/64462/data/1/120.json +0 -1
- package/esm/.db/64462/data/1/123.json +0 -1
- package/esm/.db/64462/data/15/0.json +0 -1
- package/esm/.db/646266/data/1/123.json +0 -1
- package/esm/.db/650764/data/1/120.json +0 -1
- package/esm/.db/650764/data/1/123.json +0 -1
- package/esm/.db/654655/data/0/0.json +0 -1
- package/esm/.db/654655/data/1/120.json +0 -1
- package/esm/.db/654655/data/1/123.json +0 -1
- package/esm/.db/658164/data/1/120.json +0 -1
- package/esm/.db/658164/data/1/123.json +0 -1
- package/esm/.db/65937/data/1/123.json +0 -1
- package/esm/.db/659738/data/0/13315.json +0 -1
- package/esm/.db/659738/data/1/120.json +0 -1
- package/esm/.db/659738/data/1/123.json +0 -1
- package/esm/.db/660517/data/0/13315.json +0 -1
- package/esm/.db/660517/data/1/120.json +0 -1
- package/esm/.db/660517/data/1/123.json +0 -1
- package/esm/.db/664564/data/1/123.json +0 -1
- package/esm/.db/672001/data/1/example.json +0 -1
- package/esm/.db/674620/data/1/123.json +0 -1
- package/esm/.db/67532/data/1/123.json +0 -1
- package/esm/.db/675670/data/1/120.json +0 -1
- package/esm/.db/675670/data/1/123.json +0 -1
- package/esm/.db/686538/data/1/123.json +0 -1
- package/esm/.db/691017/data/1/123.json +0 -1
- package/esm/.db/691716/data/1/120.json +0 -1
- package/esm/.db/691716/data/1/123.json +0 -1
- package/esm/.db/693105/data/0/14083.json +0 -1
- package/esm/.db/693105/data/1/120.json +0 -1
- package/esm/.db/693105/data/1/123.json +0 -1
- package/esm/.db/693105/data/15/0.json +0 -1
- package/esm/.db/694486/data/1/123.json +0 -1
- package/esm/.db/702106/data/1/120.json +0 -1
- package/esm/.db/702106/data/1/123.json +0 -1
- package/esm/.db/7047/data/1/123.json +0 -1
- package/esm/.db/705954/data/0/13315.json +0 -1
- package/esm/.db/705954/data/1/120.json +0 -1
- package/esm/.db/705954/data/1/123.json +0 -1
- package/esm/.db/710967/data/1/120.json +0 -1
- package/esm/.db/710967/data/1/123.json +0 -1
- package/esm/.db/715883/data/0/13315.json +0 -1
- package/esm/.db/715883/data/1/120.json +0 -1
- package/esm/.db/715883/data/1/123.json +0 -1
- package/esm/.db/717358/data/1/120.json +0 -1
- package/esm/.db/717358/data/1/123.json +0 -1
- package/esm/.db/71999/data/0/13315.json +0 -1
- package/esm/.db/71999/data/1/120.json +0 -1
- package/esm/.db/71999/data/1/123.json +0 -1
- package/esm/.db/720364/data/1/123.json +0 -1
- package/esm/.db/727249/data/1/120.json +0 -1
- package/esm/.db/727249/data/1/123.json +0 -1
- package/esm/.db/728258/data/1/example.json +0 -1
- package/esm/.db/728986/data/0/13315.json +0 -1
- package/esm/.db/728986/data/1/120.json +0 -1
- package/esm/.db/728986/data/1/123.json +0 -1
- package/esm/.db/732768/data/1/120.json +0 -1
- package/esm/.db/732768/data/1/123.json +0 -1
- package/esm/.db/733885/data/1/123.json +0 -1
- package/esm/.db/736192/data/0/0.json +0 -1
- package/esm/.db/736192/data/1/120.json +0 -1
- package/esm/.db/736192/data/1/123.json +0 -1
- package/esm/.db/73856/data/0/0.json +0 -1
- package/esm/.db/73856/data/1/120.json +0 -1
- package/esm/.db/73856/data/1/123.json +0 -1
- package/esm/.db/738577/data/1/123.json +0 -1
- package/esm/.db/744844/data/1/123.json +0 -1
- package/esm/.db/745738/data/1/123.json +0 -1
- package/esm/.db/747240/data/1/123.json +0 -1
- package/esm/.db/749115/data/0/0.json +0 -1
- package/esm/.db/749115/data/1/120.json +0 -1
- package/esm/.db/749115/data/1/123.json +0 -1
- package/esm/.db/749514/data/0/0.json +0 -1
- package/esm/.db/749514/data/1/120.json +0 -1
- package/esm/.db/749514/data/1/123.json +0 -1
- package/esm/.db/754982/data/1/123.json +0 -1
- package/esm/.db/765281/data/0/13315.json +0 -1
- package/esm/.db/765281/data/1/120.json +0 -1
- package/esm/.db/765281/data/1/123.json +0 -1
- package/esm/.db/765521/data/0/14083.json +0 -1
- package/esm/.db/765521/data/1/120.json +0 -1
- package/esm/.db/765521/data/1/123.json +0 -1
- package/esm/.db/765521/data/15/0.json +0 -1
- package/esm/.db/766288/data/ppl/bob.json +0 -1
- package/esm/.db/766864/data/1/123.json +0 -1
- package/esm/.db/770788/data/0/14083.json +0 -1
- package/esm/.db/770788/data/1/120.json +0 -1
- package/esm/.db/770788/data/1/123.json +0 -1
- package/esm/.db/770788/data/15/0.json +0 -1
- package/esm/.db/774499/data/1/example.json +0 -1
- package/esm/.db/774617/data/ppl/bob.json +0 -1
- package/esm/.db/775617/data/1/123.json +0 -1
- package/esm/.db/779782/data/1/123.json +0 -1
- package/esm/.db/779921/data/1/123.json +0 -1
- package/esm/.db/782910/data/1/123.json +0 -1
- package/esm/.db/783279/data/0/13315.json +0 -1
- package/esm/.db/783279/data/1/120.json +0 -1
- package/esm/.db/783279/data/1/123.json +0 -1
- package/esm/.db/785515/data/1/123.json +0 -1
- package/esm/.db/791284/data/0/0.json +0 -1
- package/esm/.db/791284/data/1/120.json +0 -1
- package/esm/.db/791284/data/1/123.json +0 -1
- package/esm/.db/791361/data/0/14083.json +0 -1
- package/esm/.db/791361/data/1/120.json +0 -1
- package/esm/.db/791361/data/1/123.json +0 -1
- package/esm/.db/791361/data/15/0.json +0 -1
- package/esm/.db/791754/data/1/120.json +0 -1
- package/esm/.db/791754/data/1/123.json +0 -1
- package/esm/.db/792232/data/0/13315.json +0 -1
- package/esm/.db/792232/data/1/120.json +0 -1
- package/esm/.db/792232/data/1/123.json +0 -1
- package/esm/.db/792777/data/0/13315.json +0 -1
- package/esm/.db/792777/data/1/120.json +0 -1
- package/esm/.db/792777/data/1/123.json +0 -1
- package/esm/.db/793249/data/0/123.json +0 -1
- package/esm/.db/795512/data/0/0.json +0 -1
- package/esm/.db/795512/data/1/120.json +0 -1
- package/esm/.db/795512/data/1/123.json +0 -1
- package/esm/.db/795512/data/3/104.json +0 -1
- package/esm/.db/796663/data/1/123.json +0 -1
- package/esm/.db/797304/data/0/0.json +0 -1
- package/esm/.db/797304/data/1/120.json +0 -1
- package/esm/.db/797304/data/1/123.json +0 -1
- package/esm/.db/797304/data/3/104.json +0 -1
- package/esm/.db/800834/data/1/123.json +0 -1
- package/esm/.db/806421/data/1/120.json +0 -1
- package/esm/.db/806421/data/1/123.json +0 -1
- package/esm/.db/81623/data/0/14083.json +0 -1
- package/esm/.db/81623/data/1/120.json +0 -1
- package/esm/.db/81623/data/1/123.json +0 -1
- package/esm/.db/81623/data/15/0.json +0 -1
- package/esm/.db/81941/data/1/120.json +0 -1
- package/esm/.db/81941/data/1/123.json +0 -1
- package/esm/.db/820340/data/0/0.json +0 -1
- package/esm/.db/820340/data/1/120.json +0 -1
- package/esm/.db/820340/data/1/123.json +0 -1
- package/esm/.db/821932/data/1/120.json +0 -1
- package/esm/.db/821932/data/1/123.json +0 -1
- package/esm/.db/823440/data/1/123.json +0 -1
- package/esm/.db/823889/data/1/120.json +0 -1
- package/esm/.db/823889/data/1/123.json +0 -1
- package/esm/.db/823896/data/1/123.json +0 -1
- package/esm/.db/836077/data/0/14083.json +0 -1
- package/esm/.db/836077/data/1/120.json +0 -1
- package/esm/.db/836077/data/1/123.json +0 -1
- package/esm/.db/836077/data/15/0.json +0 -1
- package/esm/.db/837341/data/1/123.json +0 -1
- package/esm/.db/844882/data/1/123.json +0 -1
- package/esm/.db/847654/data/1/example.json +0 -1
- package/esm/.db/856010/data/0/13315.json +0 -1
- package/esm/.db/856010/data/1/120.json +0 -1
- package/esm/.db/856010/data/1/123.json +0 -1
- package/esm/.db/856047/data/1/120.json +0 -1
- package/esm/.db/856047/data/1/123.json +0 -1
- package/esm/.db/856820/data/1/123.json +0 -1
- package/esm/.db/857266/data/1/123.json +0 -1
- package/esm/.db/86017/data/0/13315.json +0 -1
- package/esm/.db/86017/data/1/120.json +0 -1
- package/esm/.db/86017/data/1/123.json +0 -1
- package/esm/.db/862600/data/1/120.json +0 -1
- package/esm/.db/862600/data/1/123.json +0 -1
- package/esm/.db/871866/data/0/13315.json +0 -1
- package/esm/.db/871866/data/1/120.json +0 -1
- package/esm/.db/871866/data/1/123.json +0 -1
- package/esm/.db/875359/data/0/0.json +0 -1
- package/esm/.db/875359/data/1/120.json +0 -1
- package/esm/.db/875359/data/1/123.json +0 -1
- package/esm/.db/875359/data/3/104.json +0 -1
- package/esm/.db/876330/data/1/example.json +0 -1
- package/esm/.db/880182/data/1/123.json +0 -1
- package/esm/.db/882138/data/0/0.json +0 -1
- package/esm/.db/882138/data/1/120.json +0 -1
- package/esm/.db/882138/data/1/123.json +0 -1
- package/esm/.db/882722/data/1/example.json +0 -1
- package/esm/.db/885449/data/ppl/bob.json +0 -1
- package/esm/.db/893417/data/1/example.json +0 -1
- package/esm/.db/897575/data/1/example.json +0 -1
- package/esm/.db/897832/data/0/13315.json +0 -1
- package/esm/.db/897832/data/1/120.json +0 -1
- package/esm/.db/897832/data/1/123.json +0 -1
- package/esm/.db/898043/data/0/0.json +0 -1
- package/esm/.db/898043/data/1/120.json +0 -1
- package/esm/.db/898043/data/1/123.json +0 -1
- package/esm/.db/898201/data/ppl/bob.json +0 -1
- package/esm/.db/900442/data/1/123.json +0 -1
- package/esm/.db/900800/data/0/0.json +0 -1
- package/esm/.db/900800/data/1/120.json +0 -1
- package/esm/.db/900800/data/1/123.json +0 -1
- package/esm/.db/910535/data/1/120.json +0 -1
- package/esm/.db/910535/data/1/123.json +0 -1
- package/esm/.db/911132/data/1/120.json +0 -1
- package/esm/.db/911132/data/1/123.json +0 -1
- package/esm/.db/913152/data/1/120.json +0 -1
- package/esm/.db/913152/data/1/123.json +0 -1
- package/esm/.db/91378/data/1/123.json +0 -1
- package/esm/.db/918654/data/1/example.json +0 -1
- package/esm/.db/929039/data/ppl/bob.json +0 -1
- package/esm/.db/932648/data/1/123.json +0 -1
- package/esm/.db/936016/data/1/example.json +0 -1
- package/esm/.db/936843/data/1/123.json +0 -1
- package/esm/.db/940099/data/1/example.json +0 -1
- package/esm/.db/941807/data/1/120.json +0 -1
- package/esm/.db/941807/data/1/123.json +0 -1
- package/esm/.db/941934/data/0/14083.json +0 -1
- package/esm/.db/941934/data/1/120.json +0 -1
- package/esm/.db/941934/data/1/123.json +0 -1
- package/esm/.db/941934/data/15/0.json +0 -1
- package/esm/.db/943744/data/1/120.json +0 -1
- package/esm/.db/943744/data/1/123.json +0 -1
- package/esm/.db/955716/data/1/123.json +0 -1
- package/esm/.db/956030/data/1/123.json +0 -1
- package/esm/.db/956395/data/1/120.json +0 -1
- package/esm/.db/956395/data/1/123.json +0 -1
- package/esm/.db/956498/data/1/123.json +0 -1
- package/esm/.db/957435/data/1/123.json +0 -1
- package/esm/.db/960302/data/1/example.json +0 -1
- package/esm/.db/964149/data/0/0.json +0 -1
- package/esm/.db/964149/data/1/120.json +0 -1
- package/esm/.db/964149/data/1/123.json +0 -1
- package/esm/.db/965213/data/0/13315.json +0 -1
- package/esm/.db/965213/data/1/120.json +0 -1
- package/esm/.db/965213/data/1/123.json +0 -1
- package/esm/.db/966774/data/1/120.json +0 -1
- package/esm/.db/966774/data/1/123.json +0 -1
- package/esm/.db/972484/data/1/123.json +0 -1
- package/esm/.db/973155/data/1/123.json +0 -1
- package/esm/.db/973642/data/1/123.json +0 -1
- package/esm/.db/975603/data/0/0.json +0 -1
- package/esm/.db/975603/data/1/120.json +0 -1
- package/esm/.db/975603/data/1/123.json +0 -1
- package/esm/.db/979812/data/0/13315.json +0 -1
- package/esm/.db/979812/data/1/120.json +0 -1
- package/esm/.db/979812/data/1/123.json +0 -1
- package/esm/.db/985666/data/1/example.json +0 -1
- package/esm/.db/986784/data/0/0.json +0 -1
- package/esm/.db/986784/data/1/120.json +0 -1
- package/esm/.db/986784/data/1/123.json +0 -1
- package/esm/.db/988463/data/1/120.json +0 -1
- package/esm/.db/988463/data/1/123.json +0 -1
- package/esm/.db/990386/data/1/120.json +0 -1
- package/esm/.db/990386/data/1/123.json +0 -1
- package/esm/.db/994488/data/0/0.json +0 -1
- package/esm/.db/994488/data/1/120.json +0 -1
- package/esm/.db/994488/data/1/123.json +0 -1
- package/esm/.db/999130/data/ppl/bob.json +0 -1
package/cjs/bar.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -17,11 +16,10 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
18
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
18
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
20
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
21
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
22
19
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
23
20
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
24
21
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
22
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
25
23
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
25
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -37,8 +35,32 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
37
35
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
38
36
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
39
37
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
38
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
39
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
40
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
41
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
42
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
43
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
40
44
|
var pkg = (_WarpArBundles$defaul = WarpArBundles["default"]) !== null && _WarpArBundles$defaul !== void 0 ? _WarpArBundles$defaul : WarpArBundles;
|
|
41
45
|
var DataItem = pkg.DataItem;
|
|
46
|
+
function parseSignatureInput(input) {
|
|
47
|
+
var match = input.match(/^([^=]+)=\(([^)]+)\);alg="([^"]+)";keyid="([^"]+)"$/);
|
|
48
|
+
if (!match) throw new Error("Invalid signature-input format");
|
|
49
|
+
var _match = _slicedToArray(match, 5),
|
|
50
|
+
label = _match[1],
|
|
51
|
+
fieldsStr = _match[2],
|
|
52
|
+
alg = _match[3],
|
|
53
|
+
keyid = _match[4];
|
|
54
|
+
var fields = fieldsStr.split('" "').map(function (f) {
|
|
55
|
+
return f.replace(/"/g, "");
|
|
56
|
+
});
|
|
57
|
+
return {
|
|
58
|
+
label: label,
|
|
59
|
+
fields: fields,
|
|
60
|
+
alg: alg,
|
|
61
|
+
keyid: keyid
|
|
62
|
+
};
|
|
63
|
+
}
|
|
42
64
|
var AR = /*#__PURE__*/function (_MAR) {
|
|
43
65
|
function AR() {
|
|
44
66
|
var _opt$mem;
|
|
@@ -59,27 +81,72 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
59
81
|
}
|
|
60
82
|
_inherits(AR, _MAR);
|
|
61
83
|
return _createClass(AR, [{
|
|
62
|
-
key: "
|
|
84
|
+
key: "isHttpMsg",
|
|
85
|
+
value: function isHttpMsg(item) {
|
|
86
|
+
if (_typeof(item) === "object" && item !== null) {
|
|
87
|
+
var tags = (0, _utils.tags)(item.tags);
|
|
88
|
+
if (!(0, _ramda.isNil)(tags["signature-input"])) return true;
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "httpmsg",
|
|
63
94
|
value: function () {
|
|
64
|
-
var
|
|
95
|
+
var _httpmsg = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(msg) {
|
|
96
|
+
var tags, _parseSignatureInput, n, owner;
|
|
65
97
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
66
98
|
while (1) switch (_context.prev = _context.next) {
|
|
67
99
|
case 0:
|
|
68
|
-
|
|
69
|
-
|
|
100
|
+
tags = (0, _utils.tags)(msg.tags);
|
|
101
|
+
_parseSignatureInput = parseSignatureInput(tags["signature-input"]), n = _parseSignatureInput.keyid;
|
|
70
102
|
_context.next = 4;
|
|
71
|
-
return
|
|
103
|
+
return this.arweave.wallets.jwkToAddress({
|
|
104
|
+
n: n
|
|
105
|
+
});
|
|
72
106
|
case 4:
|
|
73
|
-
|
|
74
|
-
_context.
|
|
75
|
-
return
|
|
107
|
+
owner = _context.sent;
|
|
108
|
+
_context.next = 7;
|
|
109
|
+
return this.mem.set(msg, "txs", msg.id);
|
|
76
110
|
case 7:
|
|
111
|
+
return _context.abrupt("return", {
|
|
112
|
+
item: msg,
|
|
113
|
+
id: tags.id,
|
|
114
|
+
tags: tags,
|
|
115
|
+
owner: owner
|
|
116
|
+
});
|
|
117
|
+
case 8:
|
|
77
118
|
case "end":
|
|
78
119
|
return _context.stop();
|
|
79
120
|
}
|
|
80
|
-
}, _callee);
|
|
121
|
+
}, _callee, this);
|
|
81
122
|
}));
|
|
82
|
-
function
|
|
123
|
+
function httpmsg(_x) {
|
|
124
|
+
return _httpmsg.apply(this, arguments);
|
|
125
|
+
}
|
|
126
|
+
return httpmsg;
|
|
127
|
+
}()
|
|
128
|
+
}, {
|
|
129
|
+
key: "owner",
|
|
130
|
+
value: function () {
|
|
131
|
+
var _owner = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(di) {
|
|
132
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
133
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
134
|
+
case 0:
|
|
135
|
+
_context2.t0 = _base64url["default"];
|
|
136
|
+
_context2.t1 = Buffer;
|
|
137
|
+
_context2.next = 4;
|
|
138
|
+
return crypto.subtle.digest("SHA-256", di.rawOwner);
|
|
139
|
+
case 4:
|
|
140
|
+
_context2.t2 = _context2.sent;
|
|
141
|
+
_context2.t3 = _context2.t1.from.call(_context2.t1, _context2.t2);
|
|
142
|
+
return _context2.abrupt("return", _context2.t0.encode.call(_context2.t0, _context2.t3));
|
|
143
|
+
case 7:
|
|
144
|
+
case "end":
|
|
145
|
+
return _context2.stop();
|
|
146
|
+
}
|
|
147
|
+
}, _callee2);
|
|
148
|
+
}));
|
|
149
|
+
function owner(_x2) {
|
|
83
150
|
return _owner.apply(this, arguments);
|
|
84
151
|
}
|
|
85
152
|
return owner;
|
|
@@ -87,55 +154,55 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
87
154
|
}, {
|
|
88
155
|
key: "dataitem",
|
|
89
156
|
value: function () {
|
|
90
|
-
var _dataitem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
157
|
+
var _dataitem = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref) {
|
|
91
158
|
var _ref$target, target, _ref$data, data, _ref$tags, tags, signer, item, di, _item, owner;
|
|
92
|
-
return _regeneratorRuntime().wrap(function
|
|
93
|
-
while (1) switch (
|
|
159
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
160
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
94
161
|
case 0:
|
|
95
162
|
_ref$target = _ref.target, target = _ref$target === void 0 ? "" : _ref$target, _ref$data = _ref.data, data = _ref$data === void 0 ? "1984" : _ref$data, _ref$tags = _ref.tags, tags = _ref$tags === void 0 ? {} : _ref$tags, signer = _ref.signer, item = _ref.item;
|
|
96
163
|
di = item;
|
|
97
164
|
if (di) {
|
|
98
|
-
|
|
165
|
+
_context3.next = 9;
|
|
99
166
|
break;
|
|
100
167
|
}
|
|
101
|
-
|
|
168
|
+
_context3.next = 5;
|
|
102
169
|
return signer({
|
|
103
170
|
data: data,
|
|
104
171
|
tags: (0, _utils.buildTags)(tags),
|
|
105
172
|
target: target
|
|
106
173
|
});
|
|
107
174
|
case 5:
|
|
108
|
-
_item =
|
|
175
|
+
_item = _context3.sent;
|
|
109
176
|
di = new DataItem(_item.raw);
|
|
110
|
-
|
|
177
|
+
_context3.next = 10;
|
|
111
178
|
break;
|
|
112
179
|
case 9:
|
|
113
180
|
tags = (0, _utils.tags)(di.tags);
|
|
114
181
|
case 10:
|
|
115
|
-
|
|
182
|
+
_context3.next = 12;
|
|
116
183
|
return this.owner(di);
|
|
117
184
|
case 12:
|
|
118
|
-
owner =
|
|
119
|
-
|
|
185
|
+
owner = _context3.sent;
|
|
186
|
+
_context3.next = 15;
|
|
120
187
|
return di.id;
|
|
121
188
|
case 15:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return
|
|
127
|
-
id:
|
|
128
|
-
owner:
|
|
129
|
-
item:
|
|
130
|
-
tags:
|
|
189
|
+
_context3.t0 = _context3.sent;
|
|
190
|
+
_context3.t1 = owner;
|
|
191
|
+
_context3.t2 = di;
|
|
192
|
+
_context3.t3 = tags;
|
|
193
|
+
return _context3.abrupt("return", {
|
|
194
|
+
id: _context3.t0,
|
|
195
|
+
owner: _context3.t1,
|
|
196
|
+
item: _context3.t2,
|
|
197
|
+
tags: _context3.t3
|
|
131
198
|
});
|
|
132
199
|
case 20:
|
|
133
200
|
case "end":
|
|
134
|
-
return
|
|
201
|
+
return _context3.stop();
|
|
135
202
|
}
|
|
136
|
-
},
|
|
203
|
+
}, _callee3, this);
|
|
137
204
|
}));
|
|
138
|
-
function dataitem(
|
|
205
|
+
function dataitem(_x3) {
|
|
139
206
|
return _dataitem.apply(this, arguments);
|
|
140
207
|
}
|
|
141
208
|
return dataitem;
|
|
@@ -143,35 +210,35 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
143
210
|
}, {
|
|
144
211
|
key: "post",
|
|
145
212
|
value: function () {
|
|
146
|
-
var _post = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
213
|
+
var _post = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref2) {
|
|
147
214
|
var _ref2$data, data, _ref2$tags, tags, jwk, err, _yield$this$checkWall, tx, _iterator, _step, v;
|
|
148
|
-
return _regeneratorRuntime().wrap(function
|
|
149
|
-
while (1) switch (
|
|
215
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
216
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
150
217
|
case 0:
|
|
151
218
|
_ref2$data = _ref2.data, data = _ref2$data === void 0 ? "1984" : _ref2$data, _ref2$tags = _ref2.tags, tags = _ref2$tags === void 0 ? {} : _ref2$tags, jwk = _ref2.jwk;
|
|
152
219
|
err = null;
|
|
153
|
-
|
|
220
|
+
_context4.next = 4;
|
|
154
221
|
return this.checkWallet({
|
|
155
222
|
jwk: jwk
|
|
156
223
|
});
|
|
157
224
|
case 4:
|
|
158
|
-
_yield$this$checkWall =
|
|
225
|
+
_yield$this$checkWall = _context4.sent;
|
|
159
226
|
err = _yield$this$checkWall.err;
|
|
160
227
|
jwk = _yield$this$checkWall.jwk;
|
|
161
228
|
if (!err) {
|
|
162
|
-
|
|
229
|
+
_context4.next = 9;
|
|
163
230
|
break;
|
|
164
231
|
}
|
|
165
|
-
return
|
|
232
|
+
return _context4.abrupt("return", {
|
|
166
233
|
err: err
|
|
167
234
|
});
|
|
168
235
|
case 9:
|
|
169
|
-
|
|
236
|
+
_context4.next = 11;
|
|
170
237
|
return this.arweave.createTransaction({
|
|
171
238
|
data: data
|
|
172
239
|
});
|
|
173
240
|
case 11:
|
|
174
|
-
tx =
|
|
241
|
+
tx = _context4.sent;
|
|
175
242
|
_iterator = _createForOfIteratorHelper((0, _utils.buildTags)(null, tags));
|
|
176
243
|
try {
|
|
177
244
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -183,17 +250,17 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
183
250
|
} finally {
|
|
184
251
|
_iterator.f();
|
|
185
252
|
}
|
|
186
|
-
|
|
253
|
+
_context4.next = 16;
|
|
187
254
|
return this.postTx(tx, jwk);
|
|
188
255
|
case 16:
|
|
189
|
-
return
|
|
256
|
+
return _context4.abrupt("return", _context4.sent);
|
|
190
257
|
case 17:
|
|
191
258
|
case "end":
|
|
192
|
-
return
|
|
259
|
+
return _context4.stop();
|
|
193
260
|
}
|
|
194
|
-
},
|
|
261
|
+
}, _callee4, this);
|
|
195
262
|
}));
|
|
196
|
-
function post(
|
|
263
|
+
function post(_x4) {
|
|
197
264
|
return _post.apply(this, arguments);
|
|
198
265
|
}
|
|
199
266
|
return post;
|
|
@@ -201,43 +268,43 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
201
268
|
}, {
|
|
202
269
|
key: "postItems",
|
|
203
270
|
value: function () {
|
|
204
|
-
var _postItems = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
271
|
+
var _postItems = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(items, jwk) {
|
|
205
272
|
var err, _yield$this$checkWall2, _items, _iterator2, _step2, di, data_size, data_type, _iterator3, _step3, _t, owner, _item, bundle, tx;
|
|
206
|
-
return _regeneratorRuntime().wrap(function
|
|
207
|
-
while (1) switch (
|
|
273
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
274
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
208
275
|
case 0:
|
|
209
276
|
err = null;
|
|
210
|
-
|
|
277
|
+
_context5.next = 3;
|
|
211
278
|
return this.checkWallet({
|
|
212
279
|
jwk: jwk
|
|
213
280
|
});
|
|
214
281
|
case 3:
|
|
215
|
-
_yield$this$checkWall2 =
|
|
282
|
+
_yield$this$checkWall2 = _context5.sent;
|
|
216
283
|
err = _yield$this$checkWall2.err;
|
|
217
284
|
jwk = _yield$this$checkWall2.jwk;
|
|
218
285
|
if (!err) {
|
|
219
|
-
|
|
286
|
+
_context5.next = 8;
|
|
220
287
|
break;
|
|
221
288
|
}
|
|
222
|
-
return
|
|
289
|
+
return _context5.abrupt("return", {
|
|
223
290
|
err: err
|
|
224
291
|
});
|
|
225
292
|
case 8:
|
|
226
293
|
if (!(0, _ramda.is)(Array, items)) items = [items];
|
|
227
294
|
_items = [];
|
|
228
295
|
_iterator2 = _createForOfIteratorHelper(items);
|
|
229
|
-
|
|
296
|
+
_context5.prev = 11;
|
|
230
297
|
_iterator2.s();
|
|
231
298
|
case 13:
|
|
232
299
|
if ((_step2 = _iterator2.n()).done) {
|
|
233
|
-
|
|
300
|
+
_context5.next = 49;
|
|
234
301
|
break;
|
|
235
302
|
}
|
|
236
303
|
di = _step2.value;
|
|
237
|
-
|
|
304
|
+
_context5.next = 17;
|
|
238
305
|
return di.id;
|
|
239
306
|
case 17:
|
|
240
|
-
di._id =
|
|
307
|
+
di._id = _context5.sent;
|
|
241
308
|
data_size = Buffer.byteLength(di.rawData).toString();
|
|
242
309
|
data_type = "";
|
|
243
310
|
_iterator3 = _createForOfIteratorHelper(di.tags);
|
|
@@ -251,90 +318,90 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
251
318
|
} finally {
|
|
252
319
|
_iterator3.f();
|
|
253
320
|
}
|
|
254
|
-
|
|
321
|
+
_context5.next = 24;
|
|
255
322
|
return this.owner(di);
|
|
256
323
|
case 24:
|
|
257
|
-
owner =
|
|
258
|
-
|
|
324
|
+
owner = _context5.sent;
|
|
325
|
+
_context5.next = 27;
|
|
259
326
|
return this.mem.set({
|
|
260
327
|
key: di.owner,
|
|
261
328
|
address: owner
|
|
262
329
|
}, "addrmap", owner);
|
|
263
330
|
case 27:
|
|
264
|
-
|
|
331
|
+
_context5.t0 = {
|
|
265
332
|
size: data_size,
|
|
266
333
|
type: data_type
|
|
267
334
|
};
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
335
|
+
_context5.t1 = di.anchor;
|
|
336
|
+
_context5.t2 = di.signature;
|
|
337
|
+
_context5.t3 = di.target;
|
|
338
|
+
_context5.next = 33;
|
|
272
339
|
return di.id;
|
|
273
340
|
case 33:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
341
|
+
_context5.t4 = _context5.sent;
|
|
342
|
+
_context5.t5 = di;
|
|
343
|
+
_context5.t6 = owner;
|
|
344
|
+
_context5.t7 = di.tags;
|
|
345
|
+
_context5.t8 = di.data;
|
|
279
346
|
_item = {
|
|
280
|
-
_data:
|
|
281
|
-
anchor:
|
|
282
|
-
signature:
|
|
283
|
-
recipient:
|
|
284
|
-
id:
|
|
285
|
-
item:
|
|
286
|
-
owner:
|
|
287
|
-
tags:
|
|
288
|
-
data:
|
|
347
|
+
_data: _context5.t0,
|
|
348
|
+
anchor: _context5.t1,
|
|
349
|
+
signature: _context5.t2,
|
|
350
|
+
recipient: _context5.t3,
|
|
351
|
+
id: _context5.t4,
|
|
352
|
+
item: _context5.t5,
|
|
353
|
+
owner: _context5.t6,
|
|
354
|
+
tags: _context5.t7,
|
|
355
|
+
data: _context5.t8
|
|
289
356
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
357
|
+
_context5.t9 = this.mem;
|
|
358
|
+
_context5.t10 = _item;
|
|
359
|
+
_context5.next = 43;
|
|
293
360
|
return di.id;
|
|
294
361
|
case 43:
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return
|
|
362
|
+
_context5.t11 = _context5.sent;
|
|
363
|
+
_context5.next = 46;
|
|
364
|
+
return _context5.t9.set.call(_context5.t9, _context5.t10, "txs", _context5.t11);
|
|
298
365
|
case 46:
|
|
299
366
|
_items.push(_item);
|
|
300
367
|
case 47:
|
|
301
|
-
|
|
368
|
+
_context5.next = 13;
|
|
302
369
|
break;
|
|
303
370
|
case 49:
|
|
304
|
-
|
|
371
|
+
_context5.next = 54;
|
|
305
372
|
break;
|
|
306
373
|
case 51:
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
_iterator2.e(
|
|
374
|
+
_context5.prev = 51;
|
|
375
|
+
_context5.t12 = _context5["catch"](11);
|
|
376
|
+
_iterator2.e(_context5.t12);
|
|
310
377
|
case 54:
|
|
311
|
-
|
|
378
|
+
_context5.prev = 54;
|
|
312
379
|
_iterator2.f();
|
|
313
|
-
return
|
|
380
|
+
return _context5.finish(54);
|
|
314
381
|
case 57:
|
|
315
|
-
|
|
382
|
+
_context5.next = 59;
|
|
316
383
|
return (0, _arbundles.bundleAndSignData)(items, new _arbundles.ArweaveSigner(jwk));
|
|
317
384
|
case 59:
|
|
318
|
-
bundle =
|
|
319
|
-
|
|
385
|
+
bundle = _context5.sent;
|
|
386
|
+
_context5.next = 62;
|
|
320
387
|
return this.mem.arweave.createTransaction({
|
|
321
388
|
data: bundle.binary
|
|
322
389
|
}, jwk);
|
|
323
390
|
case 62:
|
|
324
|
-
tx =
|
|
391
|
+
tx = _context5.sent;
|
|
325
392
|
tx.addTag("Bundle-Format", "binary");
|
|
326
393
|
tx.addTag("Bundle-Version", "2.0.0");
|
|
327
|
-
|
|
394
|
+
_context5.next = 67;
|
|
328
395
|
return this.postTx(tx, jwk, _items);
|
|
329
396
|
case 67:
|
|
330
|
-
return
|
|
397
|
+
return _context5.abrupt("return", _context5.sent);
|
|
331
398
|
case 68:
|
|
332
399
|
case "end":
|
|
333
|
-
return
|
|
400
|
+
return _context5.stop();
|
|
334
401
|
}
|
|
335
|
-
},
|
|
402
|
+
}, _callee5, this, [[11, 51, 54, 57]]);
|
|
336
403
|
}));
|
|
337
|
-
function postItems(
|
|
404
|
+
function postItems(_x5, _x6) {
|
|
338
405
|
return _postItems.apply(this, arguments);
|
|
339
406
|
}
|
|
340
407
|
return postItems;
|
|
@@ -342,7 +409,7 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
342
409
|
}, {
|
|
343
410
|
key: "postTx",
|
|
344
411
|
value: function () {
|
|
345
|
-
var _postTx = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
412
|
+
var _postTx = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(tx, jwk) {
|
|
346
413
|
var _last;
|
|
347
414
|
var items,
|
|
348
415
|
err,
|
|
@@ -368,90 +435,90 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
368
435
|
_txs,
|
|
369
436
|
blocks,
|
|
370
437
|
owner,
|
|
371
|
-
|
|
372
|
-
return _regeneratorRuntime().wrap(function
|
|
373
|
-
while (1) switch (
|
|
438
|
+
_args6 = arguments;
|
|
439
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
440
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
374
441
|
case 0:
|
|
375
|
-
items =
|
|
442
|
+
items = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : [];
|
|
376
443
|
err = null;
|
|
377
|
-
|
|
444
|
+
_context6.next = 4;
|
|
378
445
|
return this.checkWallet({
|
|
379
446
|
jwk: jwk
|
|
380
447
|
});
|
|
381
448
|
case 4:
|
|
382
|
-
_yield$this$checkWall3 =
|
|
449
|
+
_yield$this$checkWall3 = _context6.sent;
|
|
383
450
|
err = _yield$this$checkWall3.err;
|
|
384
451
|
jwk = _yield$this$checkWall3.jwk;
|
|
385
452
|
if (!err) {
|
|
386
|
-
|
|
453
|
+
_context6.next = 9;
|
|
387
454
|
break;
|
|
388
455
|
}
|
|
389
|
-
return
|
|
456
|
+
return _context6.abrupt("return", {
|
|
390
457
|
err: err
|
|
391
458
|
});
|
|
392
459
|
case 9:
|
|
393
460
|
res = null;
|
|
394
461
|
if (tx.id) {
|
|
395
|
-
|
|
462
|
+
_context6.next = 13;
|
|
396
463
|
break;
|
|
397
464
|
}
|
|
398
|
-
|
|
465
|
+
_context6.next = 13;
|
|
399
466
|
return this.mem.arweave.transactions.sign(tx, jwk);
|
|
400
467
|
case 13:
|
|
401
|
-
|
|
468
|
+
_context6.next = 15;
|
|
402
469
|
return this.mem.get("height");
|
|
403
470
|
case 15:
|
|
404
|
-
|
|
405
|
-
height =
|
|
406
|
-
|
|
471
|
+
_context6.t0 = _context6.sent;
|
|
472
|
+
height = _context6.t0 + 1;
|
|
473
|
+
_context6.next = 19;
|
|
407
474
|
return this.mem.set(height, "height");
|
|
408
475
|
case 19:
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
476
|
+
_context6.t1 = tx.id;
|
|
477
|
+
_context6.t2 = Date.now();
|
|
478
|
+
_context6.t3 = height;
|
|
479
|
+
_context6.t5 = _ramda.last;
|
|
480
|
+
_context6.next = 25;
|
|
414
481
|
return this.mem.get("blocks");
|
|
415
482
|
case 25:
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
if (!
|
|
420
|
-
|
|
483
|
+
_context6.t6 = _context6.sent;
|
|
484
|
+
_context6.t7 = _last = (0, _context6.t5)(_context6.t6);
|
|
485
|
+
_context6.t4 = _context6.t7 !== null;
|
|
486
|
+
if (!_context6.t4) {
|
|
487
|
+
_context6.next = 30;
|
|
421
488
|
break;
|
|
422
489
|
}
|
|
423
|
-
|
|
490
|
+
_context6.t4 = _last !== void 0;
|
|
424
491
|
case 30:
|
|
425
|
-
if (!
|
|
426
|
-
|
|
492
|
+
if (!_context6.t4) {
|
|
493
|
+
_context6.next = 34;
|
|
427
494
|
break;
|
|
428
495
|
}
|
|
429
|
-
|
|
430
|
-
|
|
496
|
+
_context6.t8 = _last;
|
|
497
|
+
_context6.next = 35;
|
|
431
498
|
break;
|
|
432
499
|
case 34:
|
|
433
|
-
|
|
500
|
+
_context6.t8 = "";
|
|
434
501
|
case 35:
|
|
435
|
-
|
|
436
|
-
|
|
502
|
+
_context6.t9 = _context6.t8;
|
|
503
|
+
_context6.t10 = [];
|
|
437
504
|
block = {
|
|
438
|
-
id:
|
|
439
|
-
timestamp:
|
|
440
|
-
height:
|
|
441
|
-
previous:
|
|
442
|
-
txs:
|
|
505
|
+
id: _context6.t1,
|
|
506
|
+
timestamp: _context6.t2,
|
|
507
|
+
height: _context6.t3,
|
|
508
|
+
previous: _context6.t9,
|
|
509
|
+
txs: _context6.t10
|
|
443
510
|
};
|
|
444
511
|
msg = null;
|
|
445
512
|
if (!items) {
|
|
446
|
-
|
|
513
|
+
_context6.next = 68;
|
|
447
514
|
break;
|
|
448
515
|
}
|
|
449
516
|
_iterator4 = _createForOfIteratorHelper(items);
|
|
450
|
-
|
|
517
|
+
_context6.prev = 41;
|
|
451
518
|
_iterator4.s();
|
|
452
519
|
case 43:
|
|
453
520
|
if ((_step4 = _iterator4.n()).done) {
|
|
454
|
-
|
|
521
|
+
_context6.next = 60;
|
|
455
522
|
break;
|
|
456
523
|
}
|
|
457
524
|
item = _step4.value;
|
|
@@ -485,24 +552,24 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
485
552
|
}
|
|
486
553
|
block.txs.push(item.id);
|
|
487
554
|
_txs2.block = block.id;
|
|
488
|
-
|
|
555
|
+
_context6.next = 58;
|
|
489
556
|
return this.mem.set({
|
|
490
557
|
bundle: tx.id
|
|
491
558
|
}, "txs", item.id);
|
|
492
559
|
case 58:
|
|
493
|
-
|
|
560
|
+
_context6.next = 43;
|
|
494
561
|
break;
|
|
495
562
|
case 60:
|
|
496
|
-
|
|
563
|
+
_context6.next = 65;
|
|
497
564
|
break;
|
|
498
565
|
case 62:
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
_iterator4.e(
|
|
566
|
+
_context6.prev = 62;
|
|
567
|
+
_context6.t11 = _context6["catch"](41);
|
|
568
|
+
_iterator4.e(_context6.t11);
|
|
502
569
|
case 65:
|
|
503
|
-
|
|
570
|
+
_context6.prev = 65;
|
|
504
571
|
_iterator4.f();
|
|
505
|
-
return
|
|
572
|
+
return _context6.finish(65);
|
|
506
573
|
case 68:
|
|
507
574
|
_tags = [];
|
|
508
575
|
_iterator6 = _createForOfIteratorHelper(tx.tags);
|
|
@@ -521,48 +588,48 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
521
588
|
}
|
|
522
589
|
__tags = (0, _utils.tags)(_tags);
|
|
523
590
|
if (!(__tags.Type === "Module")) {
|
|
524
|
-
|
|
591
|
+
_context6.next = 75;
|
|
525
592
|
break;
|
|
526
593
|
}
|
|
527
|
-
|
|
594
|
+
_context6.next = 75;
|
|
528
595
|
return this.mem.set({
|
|
529
596
|
data: Buffer.from(tx.data, "base64"),
|
|
530
597
|
format: __tags["Module-Format"]
|
|
531
598
|
}, "wasms", tx.id);
|
|
532
599
|
case 75:
|
|
533
600
|
tx.tags = _tags;
|
|
534
|
-
|
|
601
|
+
_context6.next = 78;
|
|
535
602
|
return this.arweave.wallets.jwkToAddress({
|
|
536
603
|
n: tx.owner
|
|
537
604
|
});
|
|
538
605
|
case 78:
|
|
539
|
-
tx.owner =
|
|
606
|
+
tx.owner = _context6.sent;
|
|
540
607
|
_txs = tx;
|
|
541
608
|
block.txs.push(tx.id);
|
|
542
609
|
_txs.block = block.id;
|
|
543
|
-
|
|
610
|
+
_context6.next = 84;
|
|
544
611
|
return this.mem.set(_txs, "txs", tx.id);
|
|
545
612
|
case 84:
|
|
546
|
-
|
|
613
|
+
_context6.next = 86;
|
|
547
614
|
return this.mem.get("blocks");
|
|
548
615
|
case 86:
|
|
549
|
-
blocks =
|
|
616
|
+
blocks = _context6.sent;
|
|
550
617
|
blocks.push(block.id);
|
|
551
|
-
|
|
618
|
+
_context6.next = 90;
|
|
552
619
|
return this.mem.set(blocks, "blocks");
|
|
553
620
|
case 90:
|
|
554
|
-
|
|
621
|
+
_context6.next = 92;
|
|
555
622
|
return this.mem.set(block, "blockmap", block.id);
|
|
556
623
|
case 92:
|
|
557
624
|
if (!jwk) {
|
|
558
|
-
|
|
625
|
+
_context6.next = 98;
|
|
559
626
|
break;
|
|
560
627
|
}
|
|
561
|
-
|
|
628
|
+
_context6.next = 95;
|
|
562
629
|
return this.arweave.wallets.jwkToAddress(jwk);
|
|
563
630
|
case 95:
|
|
564
|
-
owner =
|
|
565
|
-
|
|
631
|
+
owner = _context6.sent;
|
|
632
|
+
_context6.next = 98;
|
|
566
633
|
return this.mem.set({
|
|
567
634
|
address: owner,
|
|
568
635
|
key: jwk.n
|
|
@@ -580,18 +647,18 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
580
647
|
console.log("New Post:\t".concat(tx.id));
|
|
581
648
|
}
|
|
582
649
|
}
|
|
583
|
-
return
|
|
650
|
+
return _context6.abrupt("return", {
|
|
584
651
|
res: res,
|
|
585
652
|
err: err,
|
|
586
653
|
id: tx.id
|
|
587
654
|
});
|
|
588
655
|
case 101:
|
|
589
656
|
case "end":
|
|
590
|
-
return
|
|
657
|
+
return _context6.stop();
|
|
591
658
|
}
|
|
592
|
-
},
|
|
659
|
+
}, _callee6, this, [[41, 62, 65, 68]]);
|
|
593
660
|
}));
|
|
594
|
-
function postTx(
|
|
661
|
+
function postTx(_x7, _x8) {
|
|
595
662
|
return _postTx.apply(this, arguments);
|
|
596
663
|
}
|
|
597
664
|
return postTx;
|
|
@@ -599,21 +666,21 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
599
666
|
}, {
|
|
600
667
|
key: "tx",
|
|
601
668
|
value: function () {
|
|
602
|
-
var _tx = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
603
|
-
return _regeneratorRuntime().wrap(function
|
|
604
|
-
while (1) switch (
|
|
669
|
+
var _tx = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(id) {
|
|
670
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
671
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
605
672
|
case 0:
|
|
606
|
-
|
|
673
|
+
_context7.next = 2;
|
|
607
674
|
return this.mem.getTx(id);
|
|
608
675
|
case 2:
|
|
609
|
-
return
|
|
676
|
+
return _context7.abrupt("return", _context7.sent);
|
|
610
677
|
case 3:
|
|
611
678
|
case "end":
|
|
612
|
-
return
|
|
679
|
+
return _context7.stop();
|
|
613
680
|
}
|
|
614
|
-
},
|
|
681
|
+
}, _callee7, this);
|
|
615
682
|
}));
|
|
616
|
-
function tx(
|
|
683
|
+
function tx(_x9) {
|
|
617
684
|
return _tx.apply(this, arguments);
|
|
618
685
|
}
|
|
619
686
|
return tx;
|
|
@@ -621,11 +688,11 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
621
688
|
}, {
|
|
622
689
|
key: "data",
|
|
623
690
|
value: function () {
|
|
624
|
-
var _data2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function
|
|
691
|
+
var _data2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id, _string, log) {
|
|
625
692
|
var _tx$data;
|
|
626
693
|
var decode, string, tx, _data, isBuf, isStr;
|
|
627
|
-
return _regeneratorRuntime().wrap(function
|
|
628
|
-
while (1) switch (
|
|
694
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
695
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
629
696
|
case 0:
|
|
630
697
|
decode = true;
|
|
631
698
|
string = _string;
|
|
@@ -633,10 +700,10 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
633
700
|
if (!(0, _ramda.isNil)(_string.decode)) decode = _string.decode;
|
|
634
701
|
if (!(0, _ramda.isNil)(_string.string)) string = _string.string;
|
|
635
702
|
}
|
|
636
|
-
|
|
703
|
+
_context8.next = 5;
|
|
637
704
|
return this.mem.getTx(id);
|
|
638
705
|
case 5:
|
|
639
|
-
tx =
|
|
706
|
+
tx = _context8.sent;
|
|
640
707
|
_data = (_tx$data = tx === null || tx === void 0 ? void 0 : tx.data) !== null && _tx$data !== void 0 ? _tx$data : null;
|
|
641
708
|
if ((tx === null || tx === void 0 ? void 0 : tx.format) === 2 && _data) {
|
|
642
709
|
_data = Buffer.from(_data, "base64");
|
|
@@ -651,32 +718,32 @@ var AR = /*#__PURE__*/function (_MAR) {
|
|
|
651
718
|
isBuf = (0, _ramda.is)(Uint8Array, _data) || (0, _ramda.is)(ArrayBuffer, _data);
|
|
652
719
|
isStr = (0, _ramda.is)(String, _data);
|
|
653
720
|
if (!(decode === false)) {
|
|
654
|
-
|
|
721
|
+
_context8.next = 15;
|
|
655
722
|
break;
|
|
656
723
|
}
|
|
657
724
|
if (isStr) _data = new TextEncoder().encode(_data);
|
|
658
|
-
return
|
|
725
|
+
return _context8.abrupt("return", _base64url["default"].encode(_data));
|
|
659
726
|
case 15:
|
|
660
727
|
if (!(isBuf && string)) {
|
|
661
|
-
|
|
728
|
+
_context8.next = 19;
|
|
662
729
|
break;
|
|
663
730
|
}
|
|
664
|
-
return
|
|
731
|
+
return _context8.abrupt("return", _data.toString());
|
|
665
732
|
case 19:
|
|
666
733
|
if (!(isStr && string !== true)) {
|
|
667
|
-
|
|
734
|
+
_context8.next = 21;
|
|
668
735
|
break;
|
|
669
736
|
}
|
|
670
|
-
return
|
|
737
|
+
return _context8.abrupt("return", new TextEncoder().encode(_data));
|
|
671
738
|
case 21:
|
|
672
|
-
return
|
|
739
|
+
return _context8.abrupt("return", _data);
|
|
673
740
|
case 22:
|
|
674
741
|
case "end":
|
|
675
|
-
return
|
|
742
|
+
return _context8.stop();
|
|
676
743
|
}
|
|
677
|
-
},
|
|
744
|
+
}, _callee8, this);
|
|
678
745
|
}));
|
|
679
|
-
function data(
|
|
746
|
+
function data(_x10, _x11, _x12) {
|
|
680
747
|
return _data2.apply(this, arguments);
|
|
681
748
|
}
|
|
682
749
|
return data;
|